public ActionResult EditGroup(RoleGroupDTO roleGroup) { if (roleGroup.Id == Guid.Empty) { _roleGroupService.Add(roleGroup); } else { _roleGroupService.Update(roleGroup); } return(Json(new AjaxResponse { Succeeded = true, ShowMessage = false, RedirectUrl = Url.Action("Index") })); }
public ActionResult EditGroup(RoleGroupDTO roleGroup) { return(HttpHandleExtensions.AjaxCallGetResult(() => { if (roleGroup.Id == Guid.Empty) { _roleGroupService.Add(roleGroup); this.JsMessage = MessagesResources.Add_Success; } else { _roleGroupService.Update(roleGroup); this.JsMessage = MessagesResources.Update_Success; } return Json(new AjaxResponse { Succeeded = true, RedirectUrl = Url.Action("Index") }); })); }
public async Task <ActionResult <int> > Add(InsertRoleGroupReq req) { return(Ok(await _roleGroupService.Add(UserId, req))); }