public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Rec_TagModel user) { var service = new RestServiceClient <Rec_SourceAdsModel>(UserLogin); service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service); var result = service.Put(_Hrm_Hre_Service, "api/Rec_SourceAds/", user); return(Json(result)); }
/// <summary> /// Tạo mới một Rec_Tag /// </summary> /// <param name="model"></param> /// <returns></returns> public ActionResult Create([Bind] Rec_TagModel model) { var service = new RestServiceClient <Rec_TagModel>(UserLogin); service.SetCookies(this.Request.Cookies, _Hrm_Hre_Service); var result = service.Put(_Hrm_Hre_Service, "api/Rec_Tag/", model); return(Json(result)); }
public Rec_TagModel Post([Bind] Rec_TagModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Rec_TagModel>(model, "Rec_Tag", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Rec_TagEntity, Rec_TagModel>(model)); }
public Rec_TagModel GetById(Guid id) { string status = string.Empty; var model = new Rec_TagModel(); var service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Rec_TagEntity>(id, ConstantSql.hrm_rec_sp_get_TagById, ref status); if (entity != null) { model = entity.CopyData <Rec_TagModel>(); } model.ActionStatus = status; return(model); }