public BalanceDateEditorViewModel(
                 IBankAccountRepository bankAccountRepository,
                 IBalanceDateRepository balanceDateRepository,
                 BalanceDate entity
                 )
 {
     this.bankAccountRepository = bankAccountRepository;
     this.balanceDateRepository = balanceDateRepository;
     this.entity = entity;
 }
Esempio n. 2
0
        public int Add()
        {
            int id = 0;

            var entity = new BalanceDate();

            var editor = this.balanceDateEditorViewModelFactory.Create(entity);

            editor.InitializeForAddEdit(true);

            while (this.dialogService.ShowDialogView(editor))
            {
                id = this.balanceDateRepository.Add(entity);

                if (id > 0)
                {
                    break;
                }
            }

            this.balanceDateEditorViewModelFactory.Release(editor);

            return id;
        }
 public BalanceDateItemViewModel(BalanceDate entity)
 {
     this.entity = entity;
 }