public ActionResult Create(Sal_SalaryDepartmentModel model)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Sal_SalaryDepartmentModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
                var result = service.Put(_hrm_Hr_Service, "api/Sal_SalaryDepartment/", model);
                ViewBag.MsgInsert = "Insert success";
            }
            return View();
        }
        public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Sal_SalaryDepartmentModel Contract)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Sal_SalaryDepartmentModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
                var result = service.Put(_hrm_Hr_Service, "api/Sal_SalaryDepartment/", Contract);
                ViewBag.MsgUpdate = "Update success";
            }
            return View();
        }
 public Sal_SalaryDepartmentModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Sal_SalaryDepartmentModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Sal_SalaryDepartmentEntity>(id, ConstantSql.hrm_sal_sp_get_SalDepartmentById, ref status);//note
     if (entity != null)
     {
         model = entity.CopyData<Sal_SalaryDepartmentModel>();
     }
     model.ActionStatus = status;
     return model;
 }