public LoanTypesAddViewModel(ILoanTypeService service, IEventAggregator eventAggregator)
 {
     _service         = service;
     _eventAggregator = eventAggregator;
     LoanTypeItem     = new LoanTypeItem();
     CreateCommand    = new DelegateCommand(OnCreateExecute);
 }
 private void OnCreateExecute()
 {
     _service.AddLoanType(LoanTypeItem.Id, LoanTypeItem.TypeName);
     _eventAggregator.GetEvent <AfterCreateLoanTypeEvent>().Publish(new AfterCreateLoanTypeEventArgs());
     LoanTypeItem = new LoanTypeItem();
 }
Beispiel #3
0
 private void OnOpenLoanTypeDetailView(OpenLoanTypeDetailViewEventArgs obj)
 {
     LoanTypeItem = new LoanTypeItem(obj.Id, obj.TypeName);
 }