private void button5_Click(object sender, EventArgs e) { ProcedimientosDeVerificacion proc1 = new ProcedimientosDeVerificacion(); if (textBox2.Text == "" || textBox5.Text == "") { MessageBox.Show("Verifique no dejar campos obligatorios vacios"); } else { try { estadoPruena = true; this.dataGridView1.DataSource = proc1.nombreproducto(Convert.ToInt32(textBox2.Text)); proc1.preciounitario(Convert.ToInt32(textBox2.Text)); textBox9.Text = proc1.preci; CRUDdetallefactura factu = new CRUDdetallefactura(); factu.TOTAL(Convert.ToInt32(textBox6.Text)); if (estadoPruena) { button1.Enabled = true; } // textBox12.Text = factu.total; } catch (Exception ex) { MessageBox.Show("error " + ex); } } }
private void button4_Click(object sender, EventArgs e) { ProcedimientosDeVerificacion proc = new ProcedimientosDeVerificacion(); if (textBox10.Text == "") { textBox10.Text = "0"; } if (textBox1.Text == "") { MessageBox.Show("Verifique no dejar campos obligatorios vacios"); } try { this.dataGridView1.DataSource = proc.nombrecliente(Convert.ToInt32(textBox1.Text)); }catch (Exception ex) { MessageBox.Show("error " + ex); } }
private void button3_Click(object sender, EventArgs e) { try { if (textBox7.Text == "") { MessageBox.Show("Verifique no dejar campos vacios"); } else { ProcedimientosDeVerificacion proc = new ProcedimientosDeVerificacion(); proc.formapago(Convert.ToInt32(textBox7.Text)); this.dataGridView1.DataSource = proc.formapago(Convert.ToInt32(textBox7.Text)); label7.Visible = true; } } catch (Exception ex) { MessageBox.Show("error " + ex); } }