public Cat_ExchangeRateModel Post([Bind] Cat_ExchangeRateModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_ExchangeRateModel>(model, "Cat_ExchangeRate", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Cat_ExchangeRateEntity, Cat_ExchangeRateModel>(model)); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public Cat_ExchangeRateModel GetById(Guid id) { string status = string.Empty; var model = new Cat_ExchangeRateModel(); var service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Cat_ExchangeRateEntity>(id, ConstantSql.hrm_cat_sp_get_ExchangeRateByIds, ref status); if (entity != null) { model = entity.CopyData <Cat_ExchangeRateModel>(); } model.ActionStatus = status; return(model); }