public PermissionSaveResponse Execute(PermissionSaveRequest request) { PermissionSaveResponse permissionSaveResponse = new PermissionSaveResponse(); if (request.PermissionId > 0) { PermissionInfo permission = ServiceHelper.LoadService <IUserService>().GetPermission(request.PermissionId); permission.PermissionName = request.PermissonName; permission.Remark = request.Remark; ServiceHelper.LoadService <IUserService>().Update(permission); } return(permissionSaveResponse); }
private void btnOK_Click(object sender, RoutedEventArgs e) { if (this.model == null) { return; } if (string.IsNullOrEmpty(this.model.PermissionName)) { int num = (int)MessageBox.Show("请输入名称", "提示"); } else { PermissionSaveResponse permissionSaveResponse = LocalApi.Execute( new PermissionSaveRequest() { PermissionId = this.model.PermissionId, PermissonName = this.model.PermissionName, Remark = this.model.Remark }); this.DialogResult = new bool?(true); this.Close(); } }