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(); }
public void Edit(int id) { UserForm.UserForm editUserForm = new UserForm.UserForm(id); editUserForm.MdiParent = Program.MainForm; editUserForm.Show(); }
public void AddUser() { UserForm.UserForm addUserForm = new UserForm.UserForm(); addUserForm.Show(); }