public ActionResult Add([Bind] Sys_GroupUserModel model) { var service = new RestServiceClient <Sys_GroupUserModel>(); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", model); return(Json(result)); }
public ActionResult Edit([Bind] Sys_GroupUserModel GroupUser1) { var service = new RestServiceClient <Sys_GroupUserModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", GroupUser1); return(View(result)); }
public ActionResult Create(Sys_GroupUserModel model) { if (ModelState.IsValid) { var service = new RestServiceClient <Sys_GroupUserModel>(); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", model); ViewBag.MsgInsert = "Insert success"; } return(View()); }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sys_GroupUserModel model) { //if (ModelState.IsValid) //{ var service = new RestServiceClient <Sys_GroupUserModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", model); //return Json(result); //ViewBag.MsgUpdate = "Update success"; //} return(Json(result)); }
public ActionResult Edit([Bind] Sys_GroupUserModel GroupUser1) { var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sys_GroupUser); if (!isAccess) { return(PartialView("AccessDenied")); } var service = new RestServiceClient <Sys_GroupUserModel>(); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", GroupUser1); return(View(result)); }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sys_GroupUserModel model) { var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sys_GroupUser); if (!isAccess) { return(PartialView("AccessDenied")); } //if (ModelState.IsValid) //{ var service = new RestServiceClient <Sys_GroupUserModel>(); service.SetCookies(this.Request.Cookies, _hrm_Sys_Service); var result = service.Put(_hrm_Sys_Service, "api/Sys_GroupUser/", model); //return Json(result); //ViewBag.MsgUpdate = "Update success"; //} return(Json(result)); }