Ejemplo n.º 1
0
        public ActionResult Create(Att_AnnualLeaveModel model)
        {

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Att_AnnualLeaveModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
                var result = service.Put(_Hrm_Hre_Service, "api/Att_AnnualLeave/", model);
                ViewBag.MsgInsert = "Insert success";
            }
            return View();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// [Hieu.Van] - Lấy dữ liệu theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Att_AnnualLeaveModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Att_AnnualLeaveModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Att_AnnualLeaveEntity>(id, ConstantSql.hrm_att_sp_get_AnnualLeaveById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Att_AnnualLeaveModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Ejemplo n.º 3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Att_AnnualLeaveModel AttAnnualLeave)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Att_AnnualLeaveModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
         var result = service.Put(_Hrm_Hre_Service, "api/Att_AnnualLeave/", AttAnnualLeave);
         //return Json(result);
         ViewBag.MsgUpdate = "Update success";
     }
     return View();
 }