public NormalPaymentViewModel(NormalPaymentBussiness bussiness)
        {
            _bussiness     = bussiness;
            ItemCollection = new ObservableCollection <AccountItemViewModel>();
            AccountDate    = DateTime.Now;

            _bussiness.ItemsChangedEvent += items =>
            {
                ItemCollection.Clear();
                _currentItem = null;
                items.ForEach(i =>
                {
                    ItemCollection.Add(new AccountItemViewModel(i));
                    ItemCollection.Last().ItemSelectedEvent += item =>
                    {
                        _currentItem = item;
                        foreach (AccountItemViewModel accountItem in ItemCollection.Where(t => t.ItemID != item.ItemID))
                        {
                            accountItem.ChangeSelecState(false);
                        }
                    };
                });
            };
        }
Ejemplo n.º 2
0
 public PaymentManagementBussiness(BlockClassManagement block, RegularClassManagement regular, TraineeInfo trainee, NameCallingBussiness nameCalling)
 {
     PaymentDAL    = new PaymentInfo();
     ClassPayment  = new ClassPaymentBussiness(block, regular, trainee, PaymentDAL, nameCalling);
     NormalPayment = new NormalPaymentBussiness(PaymentDAL);
 }