Ejemplo n.º 1
0
        public Principal(USUARIO objUsuario)
        {
            InitializeComponent();

            //Si el usuario llega en null, se inicializa la variable y se ponen valores por defecto
            if (objUsuario == null)
            {
                objUsuario = new USUARIO();
                objUsuario.id = 0;
                objUsuario.nombre = "Sin identificar";
                objUsuario.idRol = 0;

                objUsuario.ROL = new ROL();
                objUsuario.ROL.rol1 = "";
            }

            this.usuario = objUsuario;
            CGlobal.IdUsuario = this.usuario.id;
            this.lblUsuario.Text = "Usuario: " + this.usuario.nombre;

            //Se obtienen los ids de las puertas que enturnan y desenturnan
            EnturnadorLIB.Enturnador.Configuracion objConfig = new EnturnadorLIB.Enturnador.Configuracion();
            CGlobal.ID_PUERTA_E1 = Convert.ToInt32(objConfig.GetValorConfig(LLAVE_PUERTA_E1));
            CGlobal.ID_PUERTA_E2 = Convert.ToInt32(objConfig.GetValorConfig(LLAVE_PUERTA_E2));

            this.cboReporte.SelectedIndex = 0;
        }
Ejemplo n.º 2
0
        private void Monitor_Load(object sender, EventArgs e)
        {   
            //Se maximiza el formulario         
            WindowState = FormWindowState.Maximized;
            this.UbicarGrillas();
            
            //Se obtiene la lista de tipos de cargue
            EnturnadorLIB.Enturnador.Lista objLista = new EnturnadorLIB.Enturnador.Lista();
            this.listaTipoCargue = objLista.GetListaTipoCargue();

            //Se inicia en 0 el indice del tipo de lista
            this.indiceLista = 0;

            //Se obtienen valores de configuracion inicial
            EnturnadorLIB.Enturnador.Configuracion objConfig = new EnturnadorLIB.Enturnador.Configuracion();
            this.cantidadLista = Convert.ToInt32(objConfig.GetValorConfig(CGlobal.CANTIDAD_LISTA));
            int tiempoLista = Convert.ToInt32(objConfig.GetValorConfig(CGlobal.TIEMPO_LISTA));
            this.paginaActual = 1;


            this.objCola = new EnturnadorLIB.Enturnador.Cola();
            this.ProcesarTickLista();
            this.timerLista.Interval = tiempoLista * 1000;
            this.timerLista.Enabled = true;                           
            //this.ProcesarTickLista();

            
            //Se cargan las noticias
            this.objNoticia = new EnturnadorLIB.Enturnador.Noticia();
            this.GetNoticias();
            this.timer1.Enabled = true;

        }
Ejemplo n.º 3
0
        private void Monitor_Load(object sender, EventArgs e)
        {
            //Se maximiza el formulario
            WindowState = FormWindowState.Maximized;
            this.UbicarGrillas();

            //Se obtiene la lista de tipos de cargue
            EnturnadorLIB.Enturnador.Lista objLista = new EnturnadorLIB.Enturnador.Lista();
            this.listaTipoCargue = objLista.GetListaTipoCargue();

            //Se inicia en 0 el indice del tipo de lista
            this.indiceLista = 0;

            //Se obtienen valores de configuracion inicial
            EnturnadorLIB.Enturnador.Configuracion objConfig = new EnturnadorLIB.Enturnador.Configuracion();
            this.cantidadLista = Convert.ToInt32(objConfig.GetValorConfig(CGlobal.CANTIDAD_LISTA));
            int tiempoLista = Convert.ToInt32(objConfig.GetValorConfig(CGlobal.TIEMPO_LISTA));

            this.paginaActual = 1;


            this.objCola = new EnturnadorLIB.Enturnador.Cola();
            this.ProcesarTickLista();
            this.timerLista.Interval = tiempoLista * 1000;
            this.timerLista.Enabled  = true;
            //this.ProcesarTickLista();


            //Se cargan las noticias
            this.objNoticia = new EnturnadorLIB.Enturnador.Noticia();
            this.GetNoticias();
            this.timer1.Enabled = true;
        }
Ejemplo n.º 4
0
        public Principal(USUARIO objUsuario)
        {
            InitializeComponent();

            //Si el usuario llega en null, se inicializa la variable y se ponen valores por defecto
            if (objUsuario == null)
            {
                objUsuario        = new USUARIO();
                objUsuario.id     = 0;
                objUsuario.nombre = "Sin identificar";
                objUsuario.idRol  = 0;

                objUsuario.ROL      = new ROL();
                objUsuario.ROL.rol1 = "";
            }

            this.usuario         = objUsuario;
            CGlobal.IdUsuario    = this.usuario.id;
            this.lblUsuario.Text = "Usuario: " + this.usuario.nombre;

            //Se obtienen los ids de las puertas que enturnan y desenturnan
            EnturnadorLIB.Enturnador.Configuracion objConfig = new EnturnadorLIB.Enturnador.Configuracion();
            CGlobal.ID_PUERTA_E1 = Convert.ToInt32(objConfig.GetValorConfig(LLAVE_PUERTA_E1));
            CGlobal.ID_PUERTA_E2 = Convert.ToInt32(objConfig.GetValorConfig(LLAVE_PUERTA_E2));

            this.cboReporte.SelectedIndex = 0;
        }
Ejemplo n.º 5
0
        private void Configuracion_Load(object sender, EventArgs e)
        {
            this.objConfig = new EnturnadorLIB.Enturnador.Configuracion();

            //se obtienen los valores actuales
            this.numCantidad.Value = Convert.ToInt32(this.objConfig.GetValorConfig(CGlobal.CANTIDAD_LISTA));
            this.numTiempo.Value = Convert.ToInt32(this.objConfig.GetValorConfig(CGlobal.TIEMPO_LISTA));
        }
Ejemplo n.º 6
0
        private void Configuracion_Load(object sender, EventArgs e)
        {
            this.objConfig = new EnturnadorLIB.Enturnador.Configuracion();

            //se obtienen los valores actuales
            this.numCantidad.Value = Convert.ToInt32(this.objConfig.GetValorConfig(CGlobal.CANTIDAD_LISTA));
            this.numTiempo.Value   = Convert.ToInt32(this.objConfig.GetValorConfig(CGlobal.TIEMPO_LISTA));
        }
Ejemplo n.º 7
0
        private void TurnoManual_Load(object sender, EventArgs e)
        {
            this.objCola = new EnturnadorLIB.Enturnador.Cola();            

            //Obtiene el id de la puerta para enturnar y para desenturnar
            EnturnadorLIB.Enturnador.Configuracion objConfig = new EnturnadorLIB.Enturnador.Configuracion();
            this.idPuertaEnturnar = CGlobal.ID_PUERTA_E1;
            this.idPuertaDesenturnar = CGlobal.ID_PUERTA_E2;
        }
Ejemplo n.º 8
0
        private void TurnoManual_Load(object sender, EventArgs e)
        {
            this.objCola = new EnturnadorLIB.Enturnador.Cola();

            //Obtiene el id de la puerta para enturnar y para desenturnar
            EnturnadorLIB.Enturnador.Configuracion objConfig = new EnturnadorLIB.Enturnador.Configuracion();
            this.idPuertaEnturnar    = CGlobal.ID_PUERTA_E1;
            this.idPuertaDesenturnar = CGlobal.ID_PUERTA_E2;
        }