public ActionResult Create(Att_GradeModel model) { if (ModelState.IsValid) { var service = new RestServiceClient<Att_GradeModel>(UserLogin); service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service); var result = service.Put(_Hrm_Hre_Service, "api/Att_Grade/", model); ViewBag.MsgInsert = ConstantDisplay.HRM_Att_Grade_InsertSuccess.TranslateString(); } return View(); }
/// <summary> /// [Hieu.Van] - Lấy dữ liệu theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Att_GradeModel GetById(Guid id) { string status = string.Empty; var model = new Att_GradeModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore<Att_GradeEntity>(id, ConstantSql.hrm_att_sp_get_Att_GradeById, ref status); if (entity != null) { model = entity.CopyData<Att_GradeModel>(); } model.ActionStatus = status; return model; }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Att_GradeModel AttGrade) { if (ModelState.IsValid) { var service = new RestServiceClient<Att_GradeModel>(UserLogin); service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service); var result = service.Put(_Hrm_Hre_Service, "api/Att_Grade/", AttGrade); ViewBag.MsgUpdate = ConstantDisplay.HRM_Att_Grade_UpdateSuccess.TranslateString(); } return View(); }