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(); }
/// <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; }
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(); }