public Cat_InsuranceConfigModel Post([Bind] Cat_InsuranceConfigModel model) { #region Validate string message = string.Empty; var checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Cat_InsuranceConfigModel>(model, "Cat_InsuranceConfig", ref message); if (!checkValidate) { model.ActionStatus = message; return(model); } #endregion ActionService service = new ActionService(UserLogin); return(service.UpdateOrCreate <Cat_InsuranceConfigEntity, Cat_InsuranceConfigModel>(model)); }
public Cat_InsuranceConfigModel GetById(Guid id) { string status = string.Empty; var model = new Cat_InsuranceConfigModel(); ActionService service = new ActionService(UserLogin); var entity = service.GetByIdUseStore <Cat_InsuranceConfigEntity>(id, ConstantSql.hrm_cat_sp_get_InsuranceConfigById, ref status); if (entity != null) { model = entity.CopyData <Cat_InsuranceConfigModel>(); } model.ActionStatus = status; return(model); }