public GeneralViewModel(GeneralAndExportBussiness bussiness)
        {
            _bussiness = bussiness;
            _bussiness.CurrentCapitalChangedEvent += capital =>
            {
                CurrentCapital = capital.ToString();
                CapitalColor   = capital > 0 ? GlobalVariables.IncomeColor : GlobalVariables.ExpenseColor;
            };
            _bussiness.TraineeCountChangedEvent += count => TraineeCount = count.ToString();
            _bussiness.Init();

            YearCollection = new List <string>();
            for (int i = 2019; i < 2035; i++)
            {
                YearCollection.Add(i.ToString());
            }
            MonthCollection = new List <string>();
            for (int i = 1; i < 13; i++)
            {
                MonthCollection.Add(i.ToString());
            }
            SelectBillYear  = DateTime.Now.Year.ToString();
            SelectBillMonth = DateTime.Now.Month.ToString();

            Msg = new MessageViewModel(false);
            Msg.OnOperateEnableEvent(false, false);
        }
示例#2
0
 public StatisticManagementBussiness(PaymentInfo paymentDal, TraineeManagementBussiness trainees, BlockClassManagement blocks, RegularClassManagement regulars,
                                     NameCallingBussiness calling, TraineeInfo trainee, OverdueManagementBussiness overdue)
 {
     GeneralDal = new GeneralInfo();
     Finance    = new FinanceStatisticBussiness(paymentDal, trainees, blocks, regulars, GeneralDal);
     Teacher    = new TeachingStatisticBussiness(calling, regulars, blocks);
     Trainee    = new TraineeStatisticBussiness(trainees, regulars, new RegularTraineeBussiness(trainee), overdue, calling);
     General    = new GeneralAndExportBussiness(trainees.Dal, GeneralDal, blocks, regulars, trainees);
 }