/// <summary>
 /// [Son.Vo] - Lấy dữ liệu AppendixContract(Hre_AppendixContract) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Hre_AppendixContractModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Hre_AppendixContractModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetData<Hre_AppendixContractEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_AppendixContractById, ref status).FirstOrDefault();
     if (entity != null)
     {
         model = entity.CopyData<Hre_AppendixContractModel>();
     }
     model.ActionStatus = status;
     return model;
 }
 public ActionResult Create(Hre_AppendixContractModel model)
 {
     //var isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Hre_AppendixContract);
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_AppendixContractModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_AppendixContract/", model);
         ViewBag.MsgInsert = "Insert success";
     }
     return View();
 }
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Hre_AppendixContractModel AppendixContract)
 {
     //var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_AppendixContract);
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_AppendixContractModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_AppendixContract/", AppendixContract);
         ViewBag.MsgUpdate = "Update success";
     }
     return View();
 }