Ejemplo n.º 1
0
 private bool Validar(Tarea tarea, CERol _entidad)
 {
     switch (tarea)
     {
     case Tarea.Registrar:
     case Tarea.Modificar:
     {
         if (_entidad != null)
         {
             string msjAlerta = "";
             if (_entidad.idrol == 0)
             {
                 msjAlerta += "\n• Id Rol";
             }
             if (String.IsNullOrEmpty(_entidad.rol))
             {
                 msjAlerta += "\n• Rol";
             }
         }
         else
         {
             OnMensajeAlerta("Mensaje del Sistema", "Revise nuevamente la información ingresada para continuar");
             return(false);
         }
     }
     break;
     }
     return(true);
 }
Ejemplo n.º 2
0
        private void OnCargarEntidad(CERol dato)
        {
            EntidadEventArgs <CERol> e = new EntidadEventArgs <CERol>(dato);

            if (CargarEntidad != null)
            {
                CargarEntidad(this, e);
            }
        }
Ejemplo n.º 3
0
        public Resultado <CERol> Listar(CERol dto)
        {
            Resultado <CEUsuario> Result = new Resultado <CEUsuario>();

            this._parametersValues = new DynamicParameters();

            this.QueryText = "USP_T_LISTAR_ROL";
            this.QueryType = CommandType.StoredProcedure;

            var _result = this.Listar <CERol>(this.QueryText, param: ParametersValues, commandType: this.QueryType, commandTimeout: 800000);

            if (_result.Hubo_Error)
            {
                _result.Mensaje_Error = "Se encontró un error al Listar Rol";
                return(_result);
            }
            else
            {
                _result.Entidad2 = dto;
            }

            return(_result);
        }
Ejemplo n.º 4
0
 public void AgregarParametros(CERol dtoConceptoPlastico)
 {
     this._entidad = dtoConceptoPlastico;
 }
Ejemplo n.º 5
0
 public void Iniciar(Tarea tarea)
 {
     _tarea   = tarea;
     _entidad = new CERol();
 }