public ActionResult Create(Att_AttendanceTableItemModel model)
        {

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