private void button1_Click(object sender, EventArgs e) { GUI.Recepcion.TelasControl telasgui = new TelasControl(); telasgui.ShowDialog(); DAO.TelasDAO telasdao1 = new GrupoSM_Recepcion.DAO.TelasDAO(); //dataGridView1.DataSource = telasdao1.tablatelascosteo(); }
private void HojaCorte2_Load(object sender, EventArgs e) { DAO.Oden_ProduccionDAO ordendao = new GrupoSM_Recepcion.DAO.Oden_ProduccionDAO(); ordendao.idorden = this.idproduccion; //DAO.SalidasMaquilaDAO salidasdao = new GrupoSM_Recepcion.DAO.SalidasMaquilaDAO(); //salidasdao.idproduccion = this.idproduccion; DAO.PiezasDAO piezasdao = new GrupoSM_Recepcion.DAO.PiezasDAO(); piezasdao.idficha = this.idficha; DAO.AviosDAO aviosdao = new GrupoSM_Recepcion.DAO.AviosDAO(); aviosdao.id_ficha_avio = this.idficha; aviosdao.idproduccion = this.idproduccion; DAO.Ficha_tecnicaDAO fichasdao = new GrupoSM_Recepcion.DAO.Ficha_tecnicaDAO(); fichasdao.id_fichatecnica = this.idficha; DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.id_tela_produccion = this.idproduccion; GUI.PLANTILLAS.HojaCorte2 report = new GrupoSM_Recepcion.GUI.PLANTILLAS.HojaCorte2(); report.SetDataSource(piezasdao.devuelvepiezasfichas()); report.Subreports["AviosSubRPT"].SetDataSource(aviosdao.aviosimpresion()); report.Subreports["PiezasSubRPT"].SetDataSource(piezasdao.devuelvepiezasfichas()); //report.Subreports["FichaSubRPT"].SetDataSource(fichasdao.fichatecnicavista()); report.Subreports["TelasSubRpt"].SetDataSource(telasdao.vertelasproduccion()); report.Subreports["PellonesSubRPT"].SetDataSource(ordendao.devuelvepellones()); report.Subreports["ComposicionSubrpt"].SetDataSource(ordendao.devuelvepellones()); report.Subreports["MarcaSubrpt"].SetDataSource(ordendao.devuelvepellones()); crystalReportViewer1.ReportSource = report; crystalReportViewer1.Refresh(); }
private void button4_Click(object sender, EventArgs e) { GUI.Bodega.TelasControl guitelas = new TelasControl(); guitelas.ShowDialog(); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); dataGridView1.DataSource = telasdao.tablatelas(); }
private void Telas_Captura_Load(object sender, EventArgs e) { DAO.ProduccionDAO producciondao = new GrupoSM_Recepcion.DAO.ProduccionDAO(); producciondao.id_produccion = int.Parse(lbl_idorden.Text); dataGridView1.DataSource = producciondao.combinacionproduccion(); dataGridView2.DataSource = producciondao.vertelasproduccionsum(); double sumatoria = 0; foreach (DataGridViewRow row in dataGridView1.Rows) { sumatoria += Convert.ToDouble(row.Cells["cantidad_prendas"].Value); } tb_cantidad.Text = Convert.ToString(sumatoria); tb_metroforro.Text = Convert.ToString(double.Parse(tb_cantidad.Text) * double.Parse(lbl_consumoforro.Text)); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.produccion = int.Parse(lbl_idorden.Text); telasdao.tipo = 0; dataGridView3.DataSource = telasdao.vertelas_asignados(); telasdao.tipo = 1; dataGridView4.DataSource = telasdao.vertelas_asignados(); telasdao.tipo = 2; dataGridView5.DataSource = telasdao.vertelas_asignados(); }
private void button15_Click(object sender, EventArgs e) { try { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.cliente = int.Parse(lbl_cliente.Text); telasdao.fecha_entrada = Convert.ToDateTime(dataGridView5.CurrentRow.Cells["fecha_entrada"].Value); telasdao.proveedor = Convert.ToInt32(dataGridView5.CurrentRow.Cells["proveedor"].Value); telasdao.metros = Convert.ToDouble(dataGridView5.CurrentRow.Cells["metros"].Value); telasdao.nombre_descripcion = Convert.ToString(dataGridView5.CurrentRow.Cells["nombre_descripcion"].Value); telasdao.composicion = Convert.ToString(dataGridView5.CurrentRow.Cells["composicion"].Value); telasdao.color = Convert.ToString(dataGridView5.CurrentRow.Cells["color"].Value); telasdao.ancho = Convert.ToDouble(dataGridView5.CurrentRow.Cells["ancho"].Value); telasdao.tipo = 2; telasdao.insertatela(); telasdao.produccion = Convert.ToInt32(dataGridView5.CurrentRow.Cells["produccion"].Value); telasdao.elimina_entradatelaasignada(); DAO.TelasDAO telasdao2 = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao2.tipo = 2; telasdao2.produccion = Convert.ToInt32(dataGridView5.CurrentRow.Cells["produccion"].Value); dataGridView5.DataSource = telasdao2.vertelas_asignados(); } catch { MessageBox.Show("Error, escoga una tela, o agregue una"); } }
private void button5_Click(object sender, EventArgs e) { if ((tb_forro.Text != "") && (tb_metroforro.Text != "") && (tb_cantidad.Text != "")) { GUI.Bodega.Tela_Seleccion telasgui = new Tela_Seleccion(); telasgui.label1.Text = lbl_cliente.Text; telasgui.label2.Text = "2"; telasgui.label6.Text = label9.Text; telasgui.tb_combinacion.Text = tb_forro.Text; telasgui.label5.Visible = false; telasgui.tb_cantidadcombinacion.Visible = false; telasgui.label4.Visible = false; telasgui.tb_metroscombinacion.Visible = false; telasgui.label3.Text = lbl_idorden.Text; telasgui.ShowDialog(); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.produccion = int.Parse(lbl_idorden.Text); telasdao.tipo = 2; dataGridView5.DataSource = telasdao.vertelas_asignados(); } else { button5.Enabled = false; } }
private void Tela_Seleccion_Load(object sender, EventArgs e) { //DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); //telasdao.tipo = int.Parse(label2.Text); //telasdao.cliente = int.Parse(label1.Text); //dataGridView1.DataSource = telasdao.bodegastipo(); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); //dataGridView1.DataSource = telasdao.tablatelas(); }
private void Hoja_Corte_Load(object sender, EventArgs e) { DAO.ProduccionDAO producciondao = new GrupoSM_Recepcion.DAO.ProduccionDAO(); producciondao.id_produccion = int.Parse(textBox1.Text); dataGridView1.DataSource = producciondao.tallas_preliminaresproduccion(); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.id_tela_produccion = int.Parse(textBox1.Text); dataGridView2.DataSource = telasdao.vertelasproduccion(); }
private void button1_Click(object sender, EventArgs e) { if (button1.Text == "Aceptar") { if ((textBox1.Text != "") && (textBox2.Text != "") && (textBox3.Text != "") && (textBox4.Text != "") && (textBox5.Text != "") && (textBox6.Text != "") && (textBox7.Text != "") && (comboBox1.Text != "") && (comboBox1.SelectedIndex != -1)) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.produccion = int.Parse(label10.Text); telasdao.fecha_entrada_produccion = Convert.ToDateTime(dateTimePicker1.Value.ToShortDateString()); telasdao.proveedor = int.Parse(label11.Text); telasdao.metros = double.Parse(textBox3.Text); telasdao.nombre_descripcion = (textBox4.Text); telasdao.composicion = textBox5.Text; telasdao.color = textBox6.Text; telasdao.ancho = double.Parse(textBox7.Text); if (comboBox1.Text == "Tela") { telasdao.tipo = 1; } if (comboBox1.Text == "Combinacion") { telasdao.tipo = 2; } if (comboBox1.Text == "Forro") { telasdao.tipo = 3; } //if(telasdao.ingresatelaalmacen()==1) //{ // MessageBox.Show("Correcto"); //} //else //{ // MessageBox.Show("Hubo algun error"); //} this.Visible = false; this.Close(); } else { MessageBox.Show("Por favor, inserte todos los datos completos, o verifique su informacion"); } } }
private void button2_Click(object sender, EventArgs e) { if ((textBox1.Text != "") && (textBox2.Text != "") && (textBox3.Text != "") && (textBox4.Text != "") && (textBox5.Text != "") && (textBox6.Text != "") && (textBox7.Text != "") && (comboBox1.Text != "")) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.cliente = int.Parse(label10.Text); telasdao.fecha_entrada = dateTimePicker1.Value; telasdao.proveedor = int.Parse(label11.Text); telasdao.metros = double.Parse(textBox3.Text); telasdao.nombre_descripcion = (textBox4.Text); telasdao.composicion = textBox5.Text; telasdao.color = textBox6.Text; telasdao.ancho = double.Parse(textBox7.Text); if (comboBox1.Text == "Tela") { telasdao.tipo = 1; } if (comboBox1.Text == "Combinacion") { telasdao.tipo = 2; } if (comboBox1.Text == "Forro") { telasdao.tipo = 3; } //if(telasdao.ingresatelaalmacen()==1) //{ // MessageBox.Show("Correcto"); //} textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; textBox6.Text = ""; textBox7.Text = ""; } else { MessageBox.Show("Por favor, inserte todos los datos completos, o verifique su informacion"); } }
private void textBox5_TextChanged(object sender, EventArgs e) { if (comboBox1.SelectedIndex != -1) { if (comboBox1.SelectedIndex == 0) { string campo = "Nombre"; DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); DataView dv; dv = new DataView(telasdao.tablatelas()); dv.RowFilter = campo + " like '%" + textBox5.Text + "%'"; dataGridView1.DataSource = dv; } if (comboBox1.SelectedIndex == 1) { string campo = "Cliente"; DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); DataView dv; dv = new DataView(telasdao.tablatelas()); dv.RowFilter = campo + " like '%" + textBox5.Text + "%'"; dataGridView1.DataSource = dv; } if (comboBox1.SelectedIndex == 2) { string campo = "Proveedor"; DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); DataView dv; dv = new DataView(telasdao.tablatelas()); dv.RowFilter = campo + " like '%" + textBox5.Text + "%'"; dataGridView1.DataSource = dv; } } else { MessageBox.Show("Escoja una opcion de filtro primero"); } }
private void button1_Click(object sender, EventArgs e) { if (this.Text == "Modificar") { try { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.nombretelacosteo = textBox1.Text; telasdao.precio = double.Parse(textBox2.Text); telasdao.idtelacosteo = int.Parse(label3.Text); string s = telasdao.modificatelascosteo(); if (s == "Correcto") { this.Visible = false; this.Close(); } else { MessageBox.Show(s); } } catch { MessageBox.Show("Verifique sus datos"); } } else { if ((textBox1.Text != "") && (textBox2.Text != "")) { try { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.nombretelacosteo = textBox1.Text; telasdao.precio = double.Parse(textBox2.Text); //string s = telasdao.insertatelacosteo(); //if (s == "Correcto") //{ // this.Visible = false; // this.Close(); //} //else //{ // MessageBox.Show(s); //} } catch { MessageBox.Show("Verifique sus datos"); } } } }
private void textBox5_TextChanged(object sender, EventArgs e) { string campo = "Nombre"; DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); DataView dv; dv = new DataView(telasdao.tablatelas()); dv.RowFilter = campo + " like '%" + textBox5.Text + "%'"; dataGridView1.DataSource = dv; }
private void button11_Click(object sender, EventArgs e) { try { DAO.TelasDAO telasdao2 = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao2.tipo = 3; telasdao2.produccion = Convert.ToInt32(dataGridView5.CurrentRow.Cells["produccion"].Value); //telasdao2.borra_telasasignadas(); //dataGridView4.DataSource = telasdao2.vertelas_asignados(); } catch { MessageBox.Show("Error, escoga una tela, o agregue una"); } }
private void button3_Click(object sender, EventArgs e) { GUI.Bodega.Tela_Seleccion telasgui = new Tela_Seleccion(); telasgui.label1.Text = lbl_cliente.Text; telasgui.label2.Text = "0"; telasgui.label6.Text = label1.Text; telasgui.tb_combinacion.Text = tb_tela.Text; telasgui.label5.Text = "Color"; telasgui.tb_cantidadcombinacion.Text = Convert.ToString(dataGridView2.CurrentRow.Cells["color"].Value); telasgui.tb_metroscombinacion.Text = Convert.ToString(dataGridView2.CurrentRow.Cells["metros"].Value); telasgui.label3.Text = lbl_idorden.Text; telasgui.ShowDialog(); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.produccion = int.Parse(lbl_idorden.Text); telasdao.tipo = 0; dataGridView3.DataSource = telasdao.vertelas_asignados(); }
private void button2_Click(object sender, EventArgs e) { try { GUI.Recepcion.TelasControl telasgui = new TelasControl(); telasgui.textBox1.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["nombre"].Value); telasgui.textBox2.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["precio"].Value); telasgui.label3.Text = Convert.ToString(dataGridView1.CurrentRow.Cells["idtelas"].Value); telasgui.Text = "Modificar"; telasgui.ShowDialog(); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); // dataGridView1.DataSource = telasdao.tablatelascosteo(); } catch { MessageBox.Show("Elija una tela para modificar"); } }
private void button4_Click(object sender, EventArgs e) { GUI.Bodega.Tela_Seleccion telasgui = new Tela_Seleccion(); telasgui.label1.Text = lbl_cliente.Text; telasgui.label2.Text = "1"; telasgui.label6.Text = label1.Text; telasgui.tb_combinacion.Text = tb_tela.Text; telasgui.label5.Visible = false; telasgui.tb_cantidadcombinacion.Visible = false; telasgui.label4.Visible = false; telasgui.tb_metroscombinacion.Visible = false; telasgui.label3.Text = lbl_idorden.Text; telasgui.ShowDialog(); DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.produccion = int.Parse(lbl_idorden.Text); telasdao.tipo = 1; //dataGridView4.DataSource = telasdao.vertelas_asignados(); }
private void Hojarequisiciontelas_Load(object sender, EventArgs e) { DAO.Oden_ProduccionDAO ordendao = new GrupoSM_Recepcion.DAO.Oden_ProduccionDAO(); ordendao.idorden = this.idproduccion; DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.produccion = this.idproduccion; // GUI.PLANTILLAS.RequisicionTelas report = new PLANTILLAS.RequisicionTelas(); //report.SetDataSource(telasdao.telasrequisicion()); //report.Subreports[0].SetDataSource(ordendao.datosproduccionreporte()); //crystalReportViewer1.ReportSource = report; crystalReportViewer1.Refresh(); }
private void button3_Click(object sender, EventArgs e) { try { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); string s = Convert.ToString(dataGridView1.CurrentRow.Cells["nombre"].Value); telasdao.idtelacosteo = Convert.ToInt32(dataGridView1.CurrentRow.Cells["idtelas"].Value); DialogResult result = MessageBox.Show("¿Desea eliminar la tela " + s + "?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { telasdao.eliminatelascosteo(); DAO.TelasDAO telasdao1 = new GrupoSM_Recepcion.DAO.TelasDAO(); //dataGridView1.DataSource = telasdao1.tablatelascosteo(); } } catch { MessageBox.Show("Elija una tela para eliminar"); } }
private void button1_Click(object sender, EventArgs e) { try { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.id_tela_produccion = int.Parse(label12.Text); telasdao.largo_trazo = double.Parse(textBox4.Text); telasdao.paños = double.Parse(textBox5.Text); telasdao.utilizado_tela = double.Parse(textBox6.Text); telasdao.retazo_tela = double.Parse(textBox8.Text); telasdao.saldo_tela = double.Parse(textBox7.Text); telasdao.ancho = double.Parse(textBox9.Text); telasdao.faltante_tela = double.Parse(textBox10.Text); telasdao.actualizatelacorte(); button1.Visible = false; DAO.TelasDAO telasdao2 = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao2.produccion = int.Parse(label9.Text); dataGridView1.DataSource = telasdao2.telascorteproduccion(); } catch { MessageBox.Show("Error en la informacion"); } }
private void button2_Click(object sender, EventArgs e) { try { DialogResult result = MessageBox.Show("¿Desea eliminar la tela seleccionada?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.idtela_bodega = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value); MessageBox.Show(telasdao.borra_telasbodega()); DAO.TelasDAO telasdao1 = new GrupoSM_Recepcion.DAO.TelasDAO(); dataGridView1.DataSource = telasdao1.tablatelas(); } } catch { MessageBox.Show("Elija una tela para eliminar"); } }
// cliente int not null foreign key references clientes(idclientes), // proveedor int not null foreign key references proveedor(idproveedor), // fecha_entrada datetime, // nombre_descripcion varchar(max), // metros float, // composicion varchar(max), // color varchar(max), // ancho float private void button1_Click(object sender, EventArgs e) { if (button1.Text == "Aceptar") { if ((textBox1.Text != "") && (textBox2.Text != "") && (textBox3.Text != "") && (textBox4.Text != "") && (textBox5.Text != "") && (textBox6.Text != "") && (textBox7.Text != "") && (comboBox1.Text != "") && (comboBox1.SelectedIndex != -1)) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.cliente = int.Parse(label10.Text); telasdao.fecha_entrada = dateTimePicker1.Value; telasdao.proveedor = int.Parse(label11.Text); telasdao.metros = double.Parse(textBox3.Text); telasdao.nombre_descripcion = (textBox4.Text); telasdao.composicion = textBox5.Text; telasdao.color = textBox6.Text; telasdao.ancho = double.Parse(textBox7.Text); if (comboBox1.Text == "Tela") { telasdao.tipo = 1; } if (comboBox1.Text == "Combinacion") { telasdao.tipo = 2; } if (comboBox1.Text == "Forro") { telasdao.tipo = 3; } MessageBox.Show(telasdao.insertatela()); this.Visible = false; this.Close(); } else { MessageBox.Show("Por favor, inserte todos los datos completos, o verifique su informacion"); } } else { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.metros = double.Parse(textBox3.Text); telasdao.nombre_descripcion = (textBox4.Text); telasdao.composicion = textBox5.Text; telasdao.color = textBox6.Text; telasdao.ancho = double.Parse(textBox7.Text); if (comboBox1.Text == "Tela") { telasdao.tipo = 1; } if (comboBox1.Text == "Combinacion") { telasdao.tipo = 2; } if (comboBox1.Text == "Forro") { telasdao.tipo = 3; } telasdao.idtela_bodega = int.Parse(label10.Text); MessageBox.Show(telasdao.modifica_telascompleto()); this.Visible = false; this.Close(); } }
private void SeleccionarTela_Load(object sender, EventArgs e) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); dataGridView1.DataSource = telasdao.tablatelascosteo(); }
private void Telas_corte_Load(object sender, EventArgs e) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.produccion = int.Parse(label9.Text); dataGridView1.DataSource = telasdao.telascorteproduccion(); }
public void actualizagrid() { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); dataGridView1.DataSource = telasdao.tablatelas(); }
private void button1_Click(object sender, EventArgs e) { //string tela; //string color; //double metros; DialogResult result = MessageBox.Show("¿Desea Continuar con la seleccion hecha?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { if (textBox1.Text == "") { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.cliente = Convert.ToInt32(dataGridView1.CurrentRow.Cells["ClientesID"].Value); telasdao.proveedor = Convert.ToInt32(dataGridView1.CurrentRow.Cells["ProveedorID"].Value); telasdao.produccion = int.Parse(label3.Text); telasdao.fecha_entrada_produccion = Convert.ToDateTime(dataGridView1.CurrentRow.Cells["Fecha Entrada"].Value); telasdao.nombre_descripcion = Convert.ToString(dataGridView1.CurrentRow.Cells["Nombre"].Value); telasdao.metros = Convert.ToDouble(dataGridView1.CurrentRow.Cells["metros"].Value); telasdao.composicion = Convert.ToString(dataGridView1.CurrentRow.Cells["composicion"].Value); telasdao.color = Convert.ToString(dataGridView1.CurrentRow.Cells["color"].Value); telasdao.ancho = Convert.ToDouble(dataGridView1.CurrentRow.Cells["ancho"].Value); telasdao.tipo = Convert.ToInt16(label2.Text); telasdao.idtela_bodega = Convert.ToInt32(dataGridView1.CurrentRow.Cells["ID"].Value); try { // string RESPUESTA = telasdao.agregar_telaproduccion(); //if (RESPUESTA=="Correcto") //{ // MessageBox.Show("Correcto"); // //telasdao.borratelabodega(); // this.Visible = false; // this.Close(); //} //else //{ // MessageBox.Show("Hubo algun error, probablemente no selecciono ningunna tela, o no hay ninguna tela disponible"); // this.Visible = false; // this.Close(); //} } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } else { if ((Convert.ToDouble(dataGridView1.CurrentRow.Cells["metros"].Value) > double.Parse(textBox1.Text))) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao.cliente = Convert.ToInt32(dataGridView1.CurrentRow.Cells["ClientesID"].Value); telasdao.proveedor = Convert.ToInt32(dataGridView1.CurrentRow.Cells["ProveedorID"].Value); telasdao.produccion = int.Parse(label3.Text); telasdao.fecha_entrada_produccion = Convert.ToDateTime(dataGridView1.CurrentRow.Cells["Fecha Entrada"].Value); telasdao.nombre_descripcion = Convert.ToString(dataGridView1.CurrentRow.Cells["Nombre"].Value); telasdao.metros = (double.Parse(textBox1.Text)); //telasdao.metros = (Convert.ToDouble(dataGridView1.CurrentRow.Cells["metros"].Value)); telasdao.composicion = Convert.ToString(dataGridView1.CurrentRow.Cells["composicion"].Value); telasdao.color = Convert.ToString(dataGridView1.CurrentRow.Cells["color"].Value); telasdao.ancho = Convert.ToDouble(dataGridView1.CurrentRow.Cells["ancho"].Value); telasdao.tipo = Convert.ToInt16(label2.Text); //MessageBox.Show(telasdao.agregar_telaproduccion()); DAO.TelasDAO telasdao2 = new GrupoSM_Recepcion.DAO.TelasDAO(); telasdao2.idtela_bodega = Convert.ToInt32(dataGridView1.CurrentRow.Cells["ID"].Value); // /*telasdao2.metros = (Convert.double(dataGridView1.CurrentRow.Cells["metros"].Val*/ue) - double.Parse(textBox1.Text)); //telasdao2.modificatela_bodega(); //telasdao.borratelabodega(); this.Visible = false; this.Close(); } else { MessageBox.Show("Verifique que la cantidad esta correcta de tela"); } } } }
private void Telas_Load(object sender, EventArgs e) { DAO.TelasDAO telasdao = new GrupoSM_Recepcion.DAO.TelasDAO(); // dataGridView1.DataSource = telasdao.tablatelas(); }