private void ModifyUser() { UserEntityWindow userEntityWindow = new UserEntityWindow(UserEntityViewType.Modify, SelectUserEntity, DepartmemtList); userEntityWindow.Closed += userEntityWindow_Closed; userEntityWindow.Show(); }
void DoubleClickCommand() { UserEntityWindow userEntityWindow = new UserEntityWindow(UserEntityViewType.Modify, SelectUserEntity, DepartmemtList); userEntityWindow.Closed += userEntityWindow_Closed; userEntityWindow.Show(); }
void userEntityWindow_Closed(object sender, EventArgs e) { SelectUserEntity.RaisALL(); UserEntityWindow lUserEntityWindow = sender as UserEntityWindow; if (lUserEntityWindow.DialogResult == true) { OnSaveCommand(); } }
void AddUser_Closed(object sender, EventArgs e) { UserEntityWindow userEntityWindow = sender as UserEntityWindow; if (userEntityWindow.DialogResult == true) { UserList.Add(AddUserEntity); UserEntityDictionary.Add(AddUserEntity.UserName, null); systemManageDomainContext.users.Add(AddUserEntity.User); OnSaveCommand(); } }
private void OnAddUserCommand() { //InvokeOperation<int> loadMaxUserID = operationDomainComtext.GetMaxUserID(); //loadMaxUserID.Completed += loadMaxUserID_Completed; AddUserEntity = new UserEntity(); ProductManager.Web.Model.user user = new ProductManager.Web.Model.user(); AddUserEntity.User = user; AddUserEntity.UserNameDictionary = UserEntityDictionary; user.user_password = Cryptography.MD5CryptoServiceProvider.GetMd5String("123456"); AddUserEntity.Update(); UserEntityWindow userEntityWindow = new UserEntityWindow(UserEntityViewType.ADD, AddUserEntity, DepartmemtList); userEntityWindow.Closed += new EventHandler(AddUser_Closed); userEntityWindow.Show(); }