/// <summary> /// [T Lấy dữ liệu Thương Hiệu(Cat_Brand) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Cat_UnitModel GetById(Guid id) { string status = string.Empty; var model = new Cat_UnitModel(); var service = new ActionService(UserLogin); var entity = service.GetByIdUseStore<Cat_UnitEntity>(id, ConstantSql.hrm_cat_sp_get_UnitById, ref status); if (entity != null) { model = entity.CopyData<Cat_UnitModel>(); } model.ActionStatus = status; return model; }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Cat_UnitModel user) { var service = new RestServiceClient<Cat_UnitModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Hr_Service); var result = service.Put(_hrm_Hr_Service, "api/Cat_Unit/", user); return Json(result); }