public TransferEditorViewModel( ITransferRepository transferRepository, IBankAccountRepository bankAccountRepository, IBankAccountAgent bankAccountAgent, IEnumerable<IScheduleFrequency> frequencyCalculators, Transfer entity ) { this.transferRepository = transferRepository; this.bankAccountRepository = bankAccountRepository; this.bankAccountAgent = bankAccountAgent; this.frequencyCalculators = frequencyCalculators; this.entity = entity; this.Amount.PropertyChanged += (s,e) => { base.Validate(); }; base.ValidationHelper.AddInstance(this.Amount); this.FrequencyEvery.PropertyChanged += (s, e) => { base.Validate(); NotifyPropertyChanged(() => this.FrequencyEveryLabel); }; base.ValidationHelper.AddInstance(this.FrequencyEvery); NewFromBankAccountCommand = base.AddNewCommand(new ActionCommand(this.NewFromBankAccount)); NewToBankAccountCommand = base.AddNewCommand(new ActionCommand(this.NewToBankAccount)); }
public TransferEditorViewModel( ITransferRepository transferRepository, IBankAccountRepository bankAccountRepository, IBankAccountAgent bankAccountAgent, IEnumerable <IScheduleFrequency> frequencyCalculators, Transfer entity ) { this.transferRepository = transferRepository; this.bankAccountRepository = bankAccountRepository; this.bankAccountAgent = bankAccountAgent; this.frequencyCalculators = frequencyCalculators; this.entity = entity; this.Amount.PropertyChanged += (s, e) => { base.Validate(); }; base.ValidationHelper.AddInstance(this.Amount); this.FrequencyEvery.PropertyChanged += (s, e) => { base.Validate(); NotifyPropertyChanged(() => this.FrequencyEveryLabel); }; base.ValidationHelper.AddInstance(this.FrequencyEvery); NewFromBankAccountCommand = base.AddNewCommand(new ActionCommand(this.NewFromBankAccount)); NewToBankAccountCommand = base.AddNewCommand(new ActionCommand(this.NewToBankAccount)); }
public BankAccountListViewModel( IBankAccountRepository bankAccountRepository, IBankAccountAgent bankAccountAgent ) { this.bankAccountRepository = bankAccountRepository; this.bankAccountAgent = bankAccountAgent; ReloadCommand = base.AddNewCommand(new ActionCommand(Reload)); AddCommand = base.AddNewCommand(new ActionCommand(Add)); EditCommand = base.AddNewCommand(new ActionCommand(Edit, CanEdit)); DeleteCommand = base.AddNewCommand(new ActionCommand(Delete, CanDelete)); }