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