private void BomTarea_Load(object sender, EventArgs e) { txtNroBom.Text = i + ii; txtEstilo.Text = iv; Bom.VerificarEstadoCierre(txtNroBom.Text, txtEstilo.Text, lblStatus, lblEtapa); Bom.CargarDatosPOH(txtNroBom.Text, txtEstilo.Text, txtHilos, txtPO, snotas, txtHilos); Bom.CargarDatosTarea(DtBOM, ii, i, iii); }
private void txtNroBom_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F3) { Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(18); frmBusqueda.ShowDialog(); if (frmBusqueda.dato != string.Empty && frmBusqueda.dato1 != string.Empty) { if (Bom.BuscarCurr(frmBusqueda.dato1)) { int estado; txtNroBom.Text = frmBusqueda.dato; txtEstilo.Text = frmBusqueda.dato1; Bom.VerificarEstadoCierre(txtNroBom.Text, txtEstilo.Text, lblStatus, lblEtapa); Bom.CargarDatosPOH(txtNroBom.Text, txtEstilo.Text, txtHilos, txtPO, snotas, txtHilos); Bom.CargarDatosC(DtBOM, frmBusqueda.dato, "N"); estado = Bom.VerificarEstadoHilos(txtNroBom.Text, txtEstilo.Text, "N"); flagEstado = estado; if (estado < 1) { pbEstadoThread.Image = Properties.Resources.estado0; } if (estado == 1) { pbEstadoThread.Image = Properties.Resources.estado2; } if (estado > 1) { pbEstadoThread.Image = Properties.Resources.estado3; } groupBox1.Enabled = true; } else if (Bom.BuscarCurr(frmBusqueda.dato1) == false) { int estado; txtNroBom.Text = frmBusqueda.dato; txtEstilo.Text = frmBusqueda.dato1; Bom.VerificarEstadoCierre(txtNroBom.Text, txtEstilo.Text, lblStatus, lblEtapa); Bom.CargarDatosPOH(txtNroBom.Text, txtEstilo.Text, txtHilos, txtPO, snotas, txtHilos); Bom.CargarDatosC(DtBOM, frmBusqueda.dato, "E"); estado = Bom.VerificarEstadoHilos(txtNroBom.Text, txtEstilo.Text, "E"); flagEstado = estado; if (estado < 1) { pbEstadoThread.Image = Properties.Resources.estado0; } if (estado == 1) { pbEstadoThread.Image = Properties.Resources.estado2; } if (estado > 1) { pbEstadoThread.Image = Properties.Resources.estado3; } groupBox1.Enabled = true; } } } }
private void txtNroBom_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F3) { Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(18); frmBusqueda.ShowDialog(); if (frmBusqueda.dato != string.Empty && frmBusqueda.dato1 != string.Empty) { if (Bom.BuscarCurr(frmBusqueda.dato1)) { int estado; txtNroBom.Text = frmBusqueda.dato; txtEstilo.Text = frmBusqueda.dato1; Bom.VerificarEstadoCierre(txtNroBom.Text, txtEstilo.Text, lblStatus, lblEtapa); TemporalStream = Bom.CargarDatosPOH(txtNroBom.Text, txtEstilo.Text, txtSPO, txtPO, snotas, txthilo); Bom.CargarDatos(DtBOM, frmBusqueda.dato, "N"); int idPod = 1; String Estilo = frmBusqueda.dato1.ToString(); Controlador.EstilosdeProduccionController Estilos = new Controlador.EstilosdeProduccionController(); Estilos.MostrarPLML(txtEstilo, lblDescr, LblCategoria, LblDivision, LblEstacion, LblCliente, LbLMarca, lblCategory2, txtEspec, LblFit, lblBody, LblLavado, lblInseam, Txtempaque, Estilo, idPod); estado = Bom.VerificarEstadoHilos(txtNroBom.Text, txtEstilo.Text, "N"); flagEstado = estado; if (estado < 1) { //pbEstadoThread.Image = Properties.Resources.estado0; } if (estado == 1) { //pbEstadoThread.Image = Properties.Resources.estado2; } if (estado > 1) { //pbEstadoThread.Image = Properties.Resources.estado3; } } else if (Bom.BuscarCurr(frmBusqueda.dato1) == false) { int estado; txtNroBom.Text = frmBusqueda.dato; txtEstilo.Text = frmBusqueda.dato1; Bom.VerificarEstadoCierre(txtNroBom.Text, txtEstilo.Text, lblStatus, lblEtapa); TemporalStream = Bom.CargarDatosPOH(txtNroBom.Text, txtEstilo.Text, txtSPO, txtPO, snotas, txthilo); Bom.CargarDatos(DtBOM, frmBusqueda.dato, "E"); estado = Bom.VerificarEstadoHilos(txtNroBom.Text, txtEstilo.Text, "E"); flagEstado = estado; if (estado < 1) { //pbEstadoThread.Image = Properties.Resources.estado0; } if (estado == 1) { //pbEstadoThread.Image = Properties.Resources.estado2; } if (estado > 1) { //pbEstadoThread.Image = Properties.Resources.estado3; } } btnGuardar.Visible = false; btnGuardarBOM.Visible = false; } } }