예제 #1
0
 public Hre_StopWorkingModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Hre_StopWorkingModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetData<Hre_StopWorkingEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_StopWorkingById, ref status).FirstOrDefault();
     if (entity != null)
     {
         model = entity.CopyData<Hre_StopWorkingModel>();
     }
     model.ActionStatus = status;
     return model;
 }
예제 #2
0
 public string ValidateRegisterComeBack([DataSourceRequest] DataSourceRequest request, Hre_StopWorkingModel model)
 {
     string message = string.Empty;
     var checkValidate = ValidatorService.OnValidateData<Hre_StopWorkingModel>(model, "Hre_StopWorking_SusRegisterComeBack", ref message);
     if (!checkValidate)
     {
         return message;
     }
     else
     {
         return null;
     }
 }
예제 #3
0
 public ActionResult Create(Hre_StopWorkingModel model)
 {
     
     //model.DateOfIssuance = DateTime.Now;
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_StopWorkingModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_StopWorking/", model);
         ViewBag.MsgInsert = "Insert success";
     }
     return View();
 }
예제 #4
0
 public JsonResult GetResonRegisterByProfileID(Guid profileid)
 {
     var result = new Hre_StopWorkingModel();
     string status = string.Empty;
     if (profileid != Guid.Empty)
     {
         var actionService = new ActionService(UserLogin);
         result = actionService.GetData<Hre_StopWorkingModel>(Common.DotNetToOracle(profileid.ToString()), ConstantSql.hrm_hr_sp_get_StopWorkingByProId, ref status).OrderByDescending(s => s.DateStop).FirstOrDefault();
     }
     return Json(result, JsonRequestBehavior.AllowGet);
 }
예제 #5
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Hre_StopWorkingModel StopWorking)
 {
   
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_StopWorkingModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_StopWorking/", StopWorking);
         ViewBag.MsgUpdate = "Update success";
     }
     return View();
 }