/// <summary> /// Tạo mới một Cat_KPIBonus /// </summary> /// <param name="model"></param> /// <returns></returns> public ActionResult Create([Bind] Cat_KPIBonusModel model) { var service = new RestServiceClient <Cat_KPIBonusModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Hr_Service); var result = service.Put(_hrm_Hr_Service, "api/Cat_KPIBonus/", model); return(Json(result)); }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, Cat_KPIBonusModel user) { var service = new RestServiceClient <Cat_KPIBonusModel>(UserLogin); service.SetCookies(this.Request.Cookies, _hrm_Hr_Service); var result = service.Put(_hrm_Hr_Service, "api/Cat_KPIBonus/", user); return(Json(result)); }
public Cat_KPIBonusModel Post([Bind] Cat_KPIBonusModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_KPIBonusModel>(model, "Cat_KPIBonus", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Cat_KPIBonusEntity, Cat_KPIBonusModel>(model)); }
/// <summary> /// [T Lấy dữ liệu Thương Hiệu(Cat_KPIBonus) theo Id /// </summary> /// <param name="id"></param> /// <returns></returns> public Cat_KPIBonusModel GetById(Guid id) { string status = string.Empty; var model = new Cat_KPIBonusModel(); var service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Cat_KPIBonusEntity>(id, ConstantSql.hrm_cat_sp_get_KPIBonusIds, ref status); if (entity != null) { model = entity.CopyData <Cat_KPIBonusModel>(); } model.ActionStatus = status; return(model); }