Exemplo n.º 1
0
        public Eva_KPIBuildingModel GetById(Guid id)
        {
            string status  = string.Empty;
            var    model   = new Eva_KPIBuildingModel();
            var    service = new ActionService(UserLogin);
            var    entity  = service.GetByIdUseStore <Eva_KPIBuildingEntity>(id, ConstantSql.hrm_eva_sp_get_KPIById, ref status);

            if (entity != null)
            {
                model = entity.CopyData <Eva_KPIBuildingModel>();
            }
            model.ActionStatus = status;
            return(model);
        }
Exemplo n.º 2
0
        public Eva_KPIBuildingModel Post([Bind] Eva_KPIBuildingModel model)
        {
            #region Validate

            string message       = string.Empty;
            var    checkValidate = HRM.Business.Main.Domain.ValidatorService.OnValidateData <Eva_KPIBuildingModel>(model, "Eva_KPIBuilding360", ref message);
            if (!checkValidate)
            {
                model.ActionStatus = message;
                return(model);
            }

            #endregion
            ActionService service = new ActionService(UserLogin);
            return(service.UpdateOrCreate <Eva_KPIBuildingEntity, Eva_KPIBuildingModel>(model));
        }