public ActionResult ComputeAttendance(Att_AttendanceTableModel model)
 {
     var service = new RestServiceClient<Att_AttendanceTableModel>(UserLogin);
     service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
     var result = service.Post(_hrm_Hr_Service, "api/Att_ComputeAttendance/", model);
     return View(result);
 }
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Att_AttendanceTableModel Att_AttendanceTable)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Att_AttendanceTableModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
         var result = service.Put(_Hrm_Hre_Service, "api/Att_AttendanceTable/", Att_AttendanceTable);
         ViewBag.MsgUpdate = "Update success";
     }
     return View();
 }
        public ActionResult Create(Att_AttendanceTableModel model)
        {

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