示例#1
0
 public ActionResult Create(Cat_GradePayrollModel model)
 {
    
     if (ModelState.IsValid)
     {
         var service = new RestServiceClient<Cat_GradePayrollModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Cat_GradePayroll/", model);
         ViewBag.MsgInsert = ConstantDisplay.HRM_Category_GradeAttendance_InsertSuccess.TranslateString();
     }
     return View();
 }
示例#2
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_GradePayrollModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Cat_GradePayrollModel();
     ActionService service = new ActionService(UserLogin);
     //var entity = service.GetById<Cat_GradeAttendanceEntity>(id, ref status);
     var entity = service.GetByIdUseStore<Cat_GradePayrollEntity>(id, ConstantSql.hrm_cat_sp_get_Cat_GradePayrollById, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Cat_GradePayrollModel>();
     }
     model.ActionStatus = status;
     return model;
 }
示例#3
0
 public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Cat_GradePayrollModel Cat_GradePayroll)
 {
   
     if(ModelState.IsValid)
     {
         var service = new RestServiceClient<Cat_GradePayrollModel>(UserLogin);
         service.SetCookies(this.Request.Cookies, _hrm_Hr_Service);
         var result = service.Put(_hrm_Hr_Service, "api/Cat_GradePayroll/", Cat_GradePayroll);
         //return Json(result);
         ViewBag.MsgUpdate = ConstantDisplay.HRM_Category_GradeAttendance_UpdateSuccess.TranslateString();
     }
     return View();
 }