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