/// <summary>
 /// [Son.Vo] - Lấy dữ liệu Trình độ chuyên môn(Hre_Qualification) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Hre_ProfileComputingLevelModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Hre_ProfileComputingLevelModel();
     ActionService service = new ActionService(UserLogin);
     //var entity = service.GetByIdUseStore<Hre_QualificationEntity>(id,ConstantSql.hrm_hr_sp_get_QualificationById, ref status);
     var entity = service.GetData<Hre_ProfileComputingLevelEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_ProfileComputingById, ref status).FirstOrDefault();
     if (entity != null)
     {
         model = entity.CopyData<Hre_ProfileComputingLevelModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Example #2
0
 public ActionResult Create(Hre_ProfileComputingLevelModel model)
 {
     //var isAccess = CheckPermission(UserId, PrivilegeType.Create, ConstantPermission.Hre_Qualification);
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_ProfileComputingLevelModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_ProfileComputing/", model);
         ViewBag.MsgInsert = ConstantDisplay.HRM_Hr_Qualification_CreateSuccess.TranslateString();
     }
     return View();
 }
Example #3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Hre_ProfileComputingLevelModel Qualification)
 {
     //var isAccess = CheckPermission(UserId, PrivilegeType.Modify, ConstantPermission.Hre_Qualification);
     //if (!isAccess)
     //{
     //    return PartialView("AccessDenied");
     //}
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_ProfileComputingLevelModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_ProfileComputing/", Qualification);
         //return Json(result);
         ViewBag.MsgUpdate = ConstantDisplay.HRM_Hr_Qualification_UpdateSuccess.TranslateString();
     }
     return View();
 }