Пример #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.w = ((HRManagerClient.ExpireTipWindow)(target));
                return;

            case 2:

            #line 82 "..\..\..\..\..\Content\EmployeeManagement\OnJobManagement\ExpireTipWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.IKnow_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.ExpiredCountTB = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.ExpireNearCountTB = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.LeaveCountTB = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #2
0
        private void ShowExpireTip()
        {
            int expiredCount = ModelSource.Employees.ToList().ConvertAll(e => e.ExpireDate)
                               .Count(dateStr => DateTime.Now.GetDateSpanDays(dateStr) == 0);
            int expireNearCount = ModelSource.Employees.ToList().ConvertAll(e => e.ExpireDate)
                                  .Count(dateStr => DateTime.Now.GetDateSpanDays(dateStr) < ModelSource.ExpireRemindDaySpan) - expiredCount;

            if (expiredCount > 0 || expireNearCount > 0)
            {
                ExpireTipWindow w = new ExpireTipWindow();
                w.ExpiredCount    = expiredCount;
                w.ExpireNearCount = expireNearCount;
                w.Show();
            }
        }