Esempio n. 1
0
 /// <summary>
 /// [Tin.Nguyen] - Lấy dữ liệu Quốc Gia(Cat_Country) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Cat_GradeAttendanceModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Cat_GradeAttendanceModel();
     ActionService service = new ActionService(UserLogin);
     //var entity = service.GetById<Cat_GradeAttendanceEntity>(id, ref status);
     var entity = service.GetByIdUseStore<Cat_GradeAttendanceEntity>(id, ConstantSql.hrm_cat_sp_get_Cat_GradeAttendanceById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Cat_GradeAttendanceModel>();
     }
     model.ActionStatus = status;
     return model;
 }
Esempio n. 2
0
 public ActionResult Create(Cat_GradeAttendanceModel model)
 {
    
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Cat_GradeAttendanceModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Cat_GradeAttendance/", model);
         ViewBag.MsgInsert = ConstantDisplay.HRM_Category_GradeAttendance_InsertSuccess.TranslateString();
     }
     return View();
 }
Esempio n. 3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Cat_GradeAttendanceModel Cat_GradeAttendance)
 {
    
     if(ModelState.IsValid)
     {
         var service = new RestServiceClient<Cat_GradeAttendanceModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Cat_GradeAttendance/", Cat_GradeAttendance);
         //return Json(result);
         ViewBag.MsgUpdate = ConstantDisplay.HRM_Category_GradeAttendance_UpdateSuccess.TranslateString();
     }
     return View();
 }