public ActionResult Create(Cat_JobTitleModel model) { if (ModelState.IsValid) { var service = new RestServiceClient<Cat_JobTitleModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Hr_Service); var result = service.Put(_hrm_Hr_Service, "api/Cat_JobTitle/", model); ViewBag.MsgInsert = ConstantDisplay.HRM_Category_JobTitle_CreateSuccess.TranslateString(); } return View(); }
/// <summary> /// [Son.Vo] - Lấy dữ liệu JobTitle(Cat_JobTitle) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Cat_JobTitleModel GetById(Guid id) { string status = string.Empty; var model = new Cat_JobTitleModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore<Cat_JobTitleEntity>(id,ConstantSql.hrm_cat_sp_get_JobTitleById ,ref status); if (entity != null) { model = entity.CopyData<Cat_JobTitleModel>(); } model.ActionStatus = status; return model; }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Cat_JobTitleModel catJobTitle) { if (ModelState.IsValid) { var service = new RestServiceClient<Cat_JobTitleModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Hr_Service); var result = service.Put(_hrm_Hr_Service, "api/Cat_JobTitle/", catJobTitle); //return Json(result); ViewBag.MsgUpdate = ConstantDisplay.HRM_Category_JobTitle_UpdateSuccess.TranslateString(); } return View(); }