Пример #1
0
        public ActionResult Create(Sys_ProcessApprovedModel model)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Sys_ProcessApprovedModel>();
                service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
                var result = service.Put(_hrm_Sys_Service, "api/Sys_ProcessApproved/", model);
                ViewBag.MsgInsert = "Insert success";
            }
            return View();
        }
Пример #2
0
  public Sys_ProcessApprovedModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Sys_ProcessApprovedModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Sys_ProcessApprovedEntity>(id, ConstantSql.hrm_sys_sp_get_ProcessApprovedById, ref status);
     if (entity!=null)
     {
         model = entity.CopyData<Sys_ProcessApprovedModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Пример #3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sys_ProcessApprovedModel model)
 {
     var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sys_ProcessApproved);
     if (!isAccess)
     {
         return PartialView("AccessDenied");
     }
     var service = new RestServiceClient<Sys_ProcessApprovedModel>();
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Put(_hrm_Sys_Service, "api/Sys_ProcessApproved/", model);
     return Json(result);
 }
Пример #4
0
        public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sys_ProcessApprovedModel model)
        {

            var service = new RestServiceClient<Sys_ProcessApprovedModel>(UserLogin);
            service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
            var result = service.Put(_hrm_Sys_Service, "api/Sys_ProcessApproved/", model);
            return Json(result);
        }