public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sys_ConditionApprovedModel model)
 {
     var service = new RestServiceClient<Sys_ConditionApprovedModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Put(_hrm_Sys_Service, "api/Sys_ConditionApproved/", model);
     return Json(result);
 }
        public ActionResult Create(Sys_ConditionApprovedModel model)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Sys_ConditionApprovedModel>();
                service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
                var result = service.Put(_hrm_Sys_Service, "api/Sys_ConditionApproved/", model);
                ViewBag.MsgInsert = "Insert success";
            }
            return View();
        }
  public Sys_ConditionApprovedModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Sys_ConditionApprovedModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Sys_ConditionApprovedEntity>(id, ConstantSql.hrm_sys_sp_get_ConditionApprovedById, ref status);
     if (entity!=null)
     {
         model = entity.CopyData<Sys_ConditionApprovedModel>();
     }
     model.ActionStatus = status;
     return model;
 }
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sys_ConditionApprovedModel model)
 {
     var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Sys_ConditionApproved);
     if (!isAccess)
     {
         return PartialView("AccessDenied");
     }
     var service = new RestServiceClient<Sys_ConditionApprovedModel>();
     service.SetCookies(this.Request.Cookies, _hrm_Sys_Service);
     var result = service.Put(_hrm_Sys_Service, "api/Sys_ConditionApproved/", model);
     return Json(result);
 }