private void textBox5_TextChanged(object sender, EventArgs e) { try { string campo = "nombre"; DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); DataView dv; if (comboBox1.SelectedIndex != -1) { aviosdao.tipo = comboBox1.SelectedIndex; dv = new DataView(aviosdao.buscatipobodega()); } else { dv = new DataView(aviosdao.aviosbodega()); } dv.RowFilter = campo + " like '%" + textBox5.Text + "%'"; dataGridView5.DataSource = dv; } catch { } }
public void actualizatabla() { if (label1.Text == "Catalogo avios") { if (comboBox1.SelectedIndex >= 0) { DAO.AviosDAO aviosdao = new DAO.AviosDAO(); aviosdao.tipo = comboBox1.SelectedIndex; dataGridView1.DataSource = aviosdao.busca_aviosportipobase(); } else { DAO.AviosDAO aviosdao = new DAO.AviosDAO(); dataGridView1.DataSource = aviosdao.devuelveaviostipobase(); } } else { if (comboBox1.SelectedIndex >= 0) { DAO.AviosDAO aviosdao = new DAO.AviosDAO(); aviosdao.tipo = comboBox1.SelectedIndex; dataGridView1.DataSource = aviosdao.buscatipobodega(); } else { DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); dataGridView1.DataSource = aviosdao.aviosbodega(); } } }
private void textBox5_TextChanged(object sender, EventArgs e) { if (comboBox1.SelectedIndex >= 0) { DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); aviosdao.tipo = comboBox1.SelectedIndex; dataGridView1.DataSource = aviosdao.buscatipobodega(); } else { DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); dataGridView1.DataSource = aviosdao.aviosbodega(); } }
private void textBox5_TextChanged(object sender, EventArgs e) { //if (comboBox1.SelectedIndex == 0) //{ // campo = "nombre_prenda"; //} //else //{ // campo = "modelo"; //} string campo = "nombre"; DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); DataView dv; if (label1.Text == "Catalogo avios") { if (comboBox1.SelectedIndex != -1) { aviosdao.tipo = comboBox1.SelectedIndex; dv = new DataView(aviosdao.busca_aviosportipobase()); } else { dv = new DataView(aviosdao.devuelveaviostipobase()); } } else { if (comboBox1.SelectedIndex != -1) { aviosdao.tipo = comboBox1.SelectedIndex; dv = new DataView(aviosdao.buscatipobodega()); } else { dv = new DataView(aviosdao.aviosbodega()); } } dv.RowFilter = campo + " like '%" + textBox5.Text + "%'"; dataGridView1.DataSource = dv; }
private void Avios_captura_Load(object sender, EventArgs e) { DAO.ProduccionDAO producciondao = new GrupoSM_Recepcion.DAO.ProduccionDAO(); producciondao.id_produccion = int.Parse(label5.Text); int comprobacion; DAO.AviosDAO aviosdao1 = new GrupoSM_Recepcion.DAO.AviosDAO(); aviosdao1.idproduccion = int.Parse(label5.Text); dataGridView3.DataSource = aviosdao1.aviosproduc(); dataGridView5.DataSource = aviosdao1.aviosbodega(); comprobacion = aviosdao1.existe_produccionavios(); dataGridView6.DataSource = aviosdao1.devuelvetallasproduccion(); //if (comprobacion == 0) //{ // ingresaproducciontabla(); //} }
private void Avios_Asignacion_Load(object sender, EventArgs e) { DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); aviosdao.idproduccion = int.Parse(label6.Text); //aviosdao.id_ficha_avio = int.Parse(label7.Text); aviosdao.fecha = dateTimePicker1.Value; //aviosdao.verificaavios(); dataGridView1.DataSource = aviosdao.devuelveaviosasignaciones(); if (comboBox1.SelectedIndex >= 0) { aviosdao.tipo = comboBox1.SelectedIndex; dataGridView2.DataSource = aviosdao.buscatipobodega(); } else { dataGridView2.DataSource = aviosdao.aviosbodega(); } }
private void textBox2_TextChanged(object sender, EventArgs e) { string campo = "nombre"; DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); DataView dv; //if (comboBox1.SelectedIndex != -1) //{ // aviosdao.tipo = comboBox1.SelectedIndex; // dv = new DataView(aviosdao.buscatipobodega()); //} //else //{ dv = new DataView(aviosdao.aviosbodega()); //} dv.RowFilter = campo + " like '%" + textBox2.Text + "%'"; dataGridView1.DataSource = dv; }
private void button3_Click(object sender, EventArgs e) { GUI.Bodega.AviosControl aviosgui = new GrupoSM_Recepcion.GUI.Bodega.AviosControl(); aviosgui.textBox2.Text = "0"; aviosgui.textBox3.Text = "0"; aviosgui.textBox2.Enabled = false; aviosgui.textBox3.Enabled = false; aviosgui.checkBox1.Checked = true; aviosgui.checkBox1.Enabled = false; aviosgui.ShowDialog(); DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); if (comboBox1.SelectedIndex != -1) { aviosdao.tipo = comboBox1.SelectedIndex + 14; dataGridView1.DataSource = aviosdao.buscatipobodega(); } else { dataGridView1.DataSource = aviosdao.aviosbodega(); } }
private void AviosColorGrupos_Load(object sender, EventArgs e) { DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); dataGridView1.DataSource = aviosdao.aviosbodega(); actualizagridavioscolor(); }