private bool DoUpdate() { using (UserController controller = new UserController()) { UserItem.Password = ClientCommon.GetPassword(NewPasswordConfirm_TextEdit.Text); return(controller.UpdateUser(UserItem)); } }
private void Users_GridView_RowUpdated(object sender, RowObjectEventArgs e) { Users row = e.Row.CastTo <Users>(); if (!string.IsNullOrEmpty(row.NewPassword)) { row.Password = ClientCommon.GetPassword(row.NewPassword); } bool isNewRow = Users_GridView.IsNewItemRow(e.RowHandle); if (isNewRow) { row.Status = ModifyMode.Insert; return; } if (row.Status == ModifyMode.Insert) { return; } row.Status = ModifyMode.Update; }