public void Enable(List <ClassInfoForTeacherModel> details)
 {
     AccountRecordsCollection.Clear();
     foreach (ClassInfoForTeacherModel item in details)
     {
         AccountRecordsCollection.Add(new TeachingCountViewModel(item.ClassName, item.ClassDate));
     }
     PublicMathods.Sort(AccountRecordsCollection);
 }
Example #2
0
        public void Enable(List <AccountInfoModel> normalStatistic,
                           List <TeacherFeeModel> teacherFeeStatistic, List <ClassPaymentModel> classpaymentStatistic, Color statisticColor)
        {
            AccountRecordsCollection.Clear();
            if (normalStatistic != null)
            {
                foreach (AccountInfoModel item in normalStatistic)
                {
                    AccountRecordsCollection.Add(new FinanceRecordViewModel(item, statisticColor));
                    AccountRecordsCollection.Last().FinanceRecordSelectedEvent += OnFinanceRecordSelected;
                    AccountRecordsCollection.Last().DeleteRecordEvent          += OnDeleteRecord;
                }
            }

            if (teacherFeeStatistic != null)
            {
                foreach (TeacherFeeModel item in teacherFeeStatistic)
                {
                    AccountRecordsCollection.Add(new FinanceRecordViewModel(item, statisticColor, _bussiness));
                    AccountRecordsCollection.Last().FinanceRecordSelectedEvent += OnFinanceRecordSelected;
                    AccountRecordsCollection.Last().DeleteRecordEvent          += OnDeleteRecord;
                }
            }

            if (classpaymentStatistic != null)
            {
                foreach (ClassPaymentModel item in classpaymentStatistic)
                {
                    AccountRecordsCollection.Add(new FinanceRecordViewModel(item, statisticColor, _bussiness));
                    AccountRecordsCollection.Last().FinanceRecordSelectedEvent += OnFinanceRecordSelected;
                    AccountRecordsCollection.Last().DeleteRecordEvent          += OnDeleteRecord;
                }
            }

            PublicMathods.Sort(AccountRecordsCollection);
        }