public ActionResult Add(PermissionViewModel viewModel) { if (ModelState.IsValid) { OperationContext.ServiceSession.PermissionService.Add(viewModel.ToPOCO()); OperationContext.ServiceSession.SaveChange(); return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationSuccess, "", "", null); } else { return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationFailed, "Please enable javascript in browser.", "", null); } }
public ActionResult Modify(int id, PermissionViewModel viewmodel) { if (ModelState.IsValid) { viewmodel.PermissionId = id; OperationContext.ServiceSession.PermissionService.Update(viewmodel.ToPOCO(), "permissionParentID", "permissionName", "permissionRemark", "permissionAreaName", "permissionControllerName", "permissionActionName", "permissionFormMethod", "permissionOperationType", "permissionJSMethodName", "permissionIcon", "permissionIsLink", "permissionOrder", "permissionIsShow"); OperationContext.ServiceSession.SaveChange(); return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationSuccess, "", "", null); } return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationFailed, "Please enable javascript in the browser", "", null); }