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