コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 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());
 }
コード例 #4
0
        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));
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        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));
        }