Ejemplo n.º 1
0
 private void btnCatalogo_Click(object sender, EventArgs e)
 {
     if (cbxProceso.SelectedValue.Equals(-1))
     {
         this.encabezado.Mensaje = "Seleccione Proceso";
         cbxProceso.Focus();
     }
     else
     {
         a00_CargaDatos frmObj = new a00_CargaDatos(this.lu.CodPlanta, this.lu.CodProceso, true);
         frmObj.SetFormCalling(this);
         frmObj.ShowDialog();
         frmObj.Dispose();
         this.Show();
         CargaProcesoPorRol();
     }
 }
Ejemplo n.º 2
0
 private void btnTransaccional_Click(object sender, EventArgs e)
 {
     if (cbxProceso.SelectedValue.Equals(-1))
     {
         this.encabezado.Mensaje = "Seleccione Proceso";
         cbxProceso.Focus();
     }
     else
     {
         a00_CargaDatos frmObj = new a00_CargaDatos(this.lu.CodPlanta, this.lu.CodProceso, false);
         if (!isThreadActive)
         {
             frmObj.SetFormCalling(this);
             frmObj.ShowDialog();
             frmObj.Dispose();
             this.Show();
         }
     }
 }
Ejemplo n.º 3
0
        private void trActualizarDatosServidor_Tick(object sender, EventArgs e)
        {
            Timer trObj = (Timer)sender;

            try
            {
                trObj.Enabled = false;
                if (this.oDA0.EstaServicioDisponible())
                {
                    this.encabezado.Conexion = EstadoConexion.Online;

                    // Verificar si hay actualizacion en datos.
                    DateTime dtFechaUltimaActualizacion = this.oDA0.ObtenerFechaUltimaActualizacion(this.lu.CodProceso, this.lu.CodPantalla);
                    if (this.oDA0.ExisteCambioEnProcesoPantalla(this.lu.CodProceso, this.lu.CodPantalla, dtFechaUltimaActualizacion))
                    {
                        DialogResult drRes = MessageBox.Show("¿Desea actualizar?", "Existen datos actualizados", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                        if (drRes == DialogResult.Yes)
                        {
                            a00_CargaDatos frmObj = new a00_CargaDatos(this.lu.CodPlanta, this.lu.CodProceso, this.lu.CodPantalla);
                            frmObj.SetFormCalling(this);
                            frmObj.ShowDialog();
                            frmObj.Dispose();
                            this.Show();
                        }
                    }
                }
                else
                {
                    this.encabezado.Conexion = EstadoConexion.Offline;
                }
            }
            catch (Exception)
            {
            }
            finally
            {
                trObj.Interval = this.iPeriodoActualizacion;
                trObj.Enabled  = true;
            }
        }