Пример #1
0
 /// <summary>
 /// [Son.Vo] - Lấy dữ liệu Reward(Hre_Reward) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Hre_RewardModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Hre_RewardModel();
     ActionService service = new ActionService(UserLogin);
     //var entity = service.GetByIdUseStore<Hre_RewardEntity>(id, ConstantSql.hrm_hr_sp_get_RewardById, ref status);
     var entity = service.GetData<Hre_RewardEntity>(Common.DotNetToOracle(id.ToString()), ConstantSql.hrm_hr_sp_get_RewardById, ref status).FirstOrDefault();
     if (entity != null)
     {
         model = entity.CopyData<Hre_RewardModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Пример #2
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Hre_RewardModel Reward)
 {
   
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_RewardModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_Reward/", Reward);
         //return Json(result);
         ViewBag.MsgUpdate = "Update success";
     }
     return View();
 }
Пример #3
0
 public ActionResult Create(Hre_RewardModel model)
 {
    
     //model.DateOfIssuance = DateTime.Now;
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Hre_RewardModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Hre_Reward/", model);
         ViewBag.MsgInsert = "Insert success";
     }
     return View();
 }