private void btContinuar_Click(object sender, EventArgs e)
        {
            try
            {
                if (Convert.ToInt32(this.cbxTurno.SelectedValue) == -1)
                {
                    this.lbMensaje.Text = "Seleccione un Turno.";
                    this.cbxTurno.Focus();
                }
                else if (Convert.ToInt32(this.cbxProcesos.SelectedValue) == -1)
                {
                    this.lbMensaje.Text = "Seleccione un Proceso.";
                    this.cbxProcesos.Focus();
                }
                else if (Convert.ToInt32(this.cbxOpcion.SelectedValue) == -1)
                {
                    this.lbMensaje.Text = "Seleccione una Opción.";
                    this.cbxOpcion.Focus();
                }
                else
                {
                    this.lu.Fecha      = this.dtpFecha.Value;
                    this.lu.CodTurno   = Convert.ToInt32(this.cbxTurno.SelectedValue);
                    this.lu.DesTurno   = this.cbxTurno.Text;
                    this.lu.CodProceso = Convert.ToInt32(this.cbxProcesos.SelectedValue);
                    this.lu.DesProceso = this.cbxProcesos.Text;

                    Form frmObj = null;
                    switch (Convert.ToInt32(this.cbxOpcion.SelectedValue))
                    {
                    case 1:
                        frmObj = new a04_Vaciado01(this.lu);
                        break;

                    case 2:
                        frmObj = new a05_ArmadoCarroSecador(this.lu);
                        break;

                    case 3:
                        frmObj = new a06_EntradaCarroSecador(this.lu);
                        break;
                    }
                    frmObj.Show();
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
            }
        }
Esempio n. 2
0
        private void btContinuar_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.lu.CodSupervisor == -1)
                {
                    this.lbMensaje.Text = "Ingrese Clave Supervisor valida";
                    this.txSupervisor.SelectAll();
                    this.txSupervisor.Focus();
                    return;
                }
                if (this.lu.CodCentroTrabajo == -1)
                {
                    this.lbMensaje.Text = "Seleccione Centro Trab.";
                    this.cbxCentroTrabajo.Focus();
                    return;
                }
                if (this.lu.CodMaquina == -1)
                {
                    this.lbMensaje.Text = "Seleccione " + this.lu.DesTipoMaquina;
                    this.cbxMaquina.Focus();
                    return;
                }

                switch (this.lu.DesProceso)
                {
                case "Vaciado":
                    if (this.lu.PosInicial == -1)
                    {
                        this.lbMensaje.Text = "Ingrese Pos. Inicial valida";
                        this.txPosicionInicial.SelectAll();
                        this.txPosicionInicial.Focus();
                        return;
                    }
                    if (!this.rbAscendente.Checked && !this.rbDescendente.Checked)
                    {
                        this.lbMensaje.Text = "Seleccione Direccion";
                        this.rbAscendente.Focus();
                        return;
                    }
                    break;

                case "Secado":
                    break;

                case "Revisado":
                    break;

                case "Esmaltado":
                    if (this.lu.CodColor == -1)
                    {
                        this.lbMensaje.Text = "Seleccione Color";
                        this.cbxColor.Focus();
                        return;
                    }
                    break;

                case "Quemado":
                    if (this.lu.CodCarro == -1)
                    {
                        this.lbMensaje.Text = "Ingrese Numero de Carro";
                        this.txCarro.SelectAll();
                        this.txCarro.Focus();
                        return;
                    }
                    break;
                }

                this.oDA.ActualizarConfigHandHeld(this.lu.CodSupervisor,
                                                  this.lu.CodConfigBanco,
                                                  this.lu.CodConfigHandHeld);

                Form frmObj = null;
                switch (this.lu.DesProceso)
                {
                case "Vaciado":
                    frmObj = new a05_CapturaVaciado(this.lu);
                    break;

                case "Secado":
                    frmObj = new a06_EntradaCarroSecador(this.lu);
                    break;

                case "Revisado":
                    frmObj = new a07_CapturaRevisado(this.lu);
                    break;

                case "Esmaltado":
                    frmObj = new a08_CapturaEsmaltado(this.lu);
                    break;

                case "Quemado":
                    frmObj = new a09_CapturaQuemado(this.lu);
                    break;
                }
                frmObj.Show();
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
            }
        }
        private void btContinuar_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.lu.Fecha == DateTime.MinValue)
                {
                    this.lbMensaje.Text = "Seleccione Fecha valida";
                    this.dtpFecha.Focus();
                }
                else if (this.lu.CodTurno == -1)
                {
                    this.lbMensaje.Text = "Seleccione Turno";
                    this.cbxTurno.Focus();
                }
                else if (this.lu.CodProceso == -1)
                {
                    this.lbMensaje.Text = "Seleccione Proceso";
                    this.cbxProceso.Focus();
                }
                else if (this.lu.CodPantalla == -1)
                {
                    this.lbMensaje.Text = "Seleccione Opción";
                    this.cbxOpcion.Focus();
                }
                else
                {
                    DataTable dtObj = this.oDA.ObtenerSigCodConfigHandHeld();
                    this.lu.CodConfigHandHeld = Convert.ToInt64(dtObj.Rows[0]["CodConfigHandHeld"]);
                    this.oDA.InsertarConfigHandHeld(this.lu.CodConfigHandHeld,
                                                    this.lu.CodUsuario,
                                                    this.lu.CodEmpleado,
                                                    this.lu.CodSupervisor,
                                                    this.lu.Fecha,
                                                    this.lu.CodTurno,
                                                    this.lu.CodPlanta,
                                                    this.lu.CodProceso);

                    Form frmObj = null;
                    switch (this.lu.CodPantalla)
                    {
                    case 1:
                    case 4:
                    case 5:
                    case 6:
                        frmObj = new a04_CapturaInicial(this.lu);
                        break;

                    case 2:
                        frmObj = new a05_ArmadoCarroSecador(this.lu);
                        break;

                    case 3:
                        frmObj = new a06_EntradaCarroSecador(this.lu);
                        break;
                    }
                    frmObj.Show();
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
            }
        }