public PersonListVM() { ViewTitle = "لیست اشخاص"; GetAllCommand = new RelayCommand <List <KeyValuePair <string, string> > >(GetAllExecute); LoadedEventCommand = new RelayCommand(LoadedEventExecute); CreateEditCommand = new RelayCommand <Person>(CreateEditExecute); ChangeStatusCommand = new RelayCommand <Person>(ChangeStatusExecute); UpCommand = new RelayCommand <Person>(UpExecute); DownCommand = new RelayCommand <Person>(DownExecute); accountingUow = new AccountingUow(); businessSet = new PersonBusinessSet((PersonRepository)accountingUow.PersonRepository, accountingUow.Logger); }
public PersonCreateVM(AccountingUow uow, Person model = null) { SubmitCommand = new RelayCommand(SubmitExecute); if (model == null) { ViewTitle = "افزودن شخص"; Model = new Person(); } else { isEdit = true; ViewTitle = "ویرایش شخص"; Model = model; Messenger.Default.Send(Model.PersonId, "PersonListView_SaveItemId"); } accountingUow = uow; businessSet = new PersonBusinessSet((PersonRepository)accountingUow.PersonRepository, accountingUow.Logger); Model.Exclude(new string[] { "UserId", "CreateDate", "RecordStatusId" }); }