public void EditExecute() { try { if (Manager != null) { ManagerEditFormView form = new ManagerEditFormView(Manager); form.ShowDialog(); ManagerList = managers.ViewAllManager(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public ManagerEditFormViewModel(ManagerEditFormView managerView, vwClinicManager managerToEdit) { this.managerView = managerView; ClinicManager = managerToEdit; GenderList = genders.GetGenders(); OldManager = new vwClinicManager { Citizenship = managerToEdit.Citizenship, DateOfBirth = managerToEdit.DateOfBirth, Gender = managerToEdit.Gender, IdentityCardNumber = managerToEdit.IdentityCardNumber, NameAndSurname = managerToEdit.NameAndSurname, Password = managerToEdit.Password, Username = managerToEdit.Username, Floor = managerToEdit.Floor, MaximumNumberOfSupervisedDoctors = managerToEdit.MaximumNumberOfSupervisedDoctors, MinimumNumberOfSupervisedRooms = managerToEdit.MinimumNumberOfSupervisedRooms, NumberOfOmissions = managerToEdit.NumberOfOmissions }; }