public void EditUser(int id) { Data.DummyData.DummyDAO <User> DefaultUser = new Data.DummyData.DummyDAO <User>(); var CurrentUser = DefaultUser.Find(id); viewUserForm.Login = CurrentUser.Login; viewUserForm.Password = CurrentUser.Password; viewUserForm.FirstName = CurrentUser.Person.FirstName; viewUserForm.MiddleName = CurrentUser.Person.MiddleName; viewUserForm.LastName = CurrentUser.Person.LastName; viewUserForm.Role = CurrentUser.Role.Title; viewUserForm.Active = CurrentUser.IsActive; viewUserForm.Comments = (ICollection <Domain.Entities.Comments.Comment>)CurrentUser.Comments; UserForm.UserForm addUserForm = new UserForm.UserForm(); addUserForm.Show(); }
public void EditUser(int id) { Data.DummyData.DummyDAO<User> DefaultUser = new Data.DummyData.DummyDAO<User>(); var CurrentUser = DefaultUser.Find(id); viewUserForm.Login = CurrentUser.Login; viewUserForm.Password = CurrentUser.Password; viewUserForm.FirstName = CurrentUser.Person.FirstName; viewUserForm.MiddleName = CurrentUser.Person.MiddleName; viewUserForm.LastName = CurrentUser.Person.LastName; viewUserForm.Role = CurrentUser.Role.Title; viewUserForm.Active = CurrentUser.IsActive; viewUserForm.Comments = (ICollection<Domain.Entities.Comments.Comment>)CurrentUser.Comments; UserForm.UserForm addUserForm = new UserForm.UserForm(); addUserForm.Show(); }