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

            if (ModelState.IsValid)
            {
                var service = new RestServiceClient<Att_TimeSheetModel>(UserLogin);
                service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
                var result = service.Put(_Hrm_Hre_Service, "api/Att_TimeSheet/", model);
                ViewBag.MsgInsert = "Insert success";
            }
            return View();
        }
Ejemplo n.º 2
0
 public Att_TimeSheetModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Att_TimeSheetModel();
     var service = new ActionService(UserLogin);
     var entity = service.GetByIdUseStore<Att_TimeSheetEntity>(id, ConstantSql.hrm_att_sp_get_TimeSheetById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Att_TimeSheetModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Ejemplo n.º 3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Att_TimeSheetModel AttTimeSheet)
 {
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Att_TimeSheetModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service);
         var result = service.Put(_Hrm_Hre_Service, "api/Att_TimeSheet/", AttTimeSheet);
         //return Json(result);
         ViewBag.MsgUpdate = "Update success";
     }
     return View();
 }