private void frm_divorcio_Load(object sender, EventArgs e) { this.cbx_cliente.DataSource = obcrud.consultar3("pr_clientes", "hidden= 0"); this.cbx_cliente.DisplayMember = "nombre"; this.cbx_cliente.ValueMember = "nombre"; this.cbx_cliente.Refresh(); this.cbx_abogado.DataSource = obcrud.consultar3("pr_abogados", "hidden= 0"); this.cbx_abogado.DisplayMember = "nombre"; this.cbx_abogado.ValueMember = "nombre"; this.cbx_abogado.Refresh(); this.cbx_juez.DataSource = obcrud.consultar3("pr_jueces", "hidden= 0"); this.cbx_juez.DisplayMember = "nombre"; this.cbx_juez.ValueMember = "nombre"; this.cbx_juez.Refresh(); this.cbx_procurador.DataSource = obcrud.consultar3("pr_procurador", "hidden= 0"); this.cbx_procurador.DisplayMember = "nombre"; this.cbx_procurador.ValueMember = "nombre"; this.cbx_procurador.Refresh(); maskedTextBox1.Select(); this.cbx_cliente.Enabled = false; this.cbx_abogado.Enabled = false; this.cbx_juez.Enabled = false; this.cbx_procurador.Enabled = false; this.cbx_razon.Enabled = false; this.txt_costo.Enabled = false; this.txt_abonos.Enabled = false; this.txt_impuesto.Enabled = false; this.richTextBox1.Enabled = false; MySqlConnection cn; MySqlCommand cmd; MySqlDataReader dr; try { cn = new MySqlConnection("server=localhost;user id=root; database=proyecto3; password="******"select cliente, abogado, juez, procurador, razon, costo, abonos, impuestos, notas from pr_divorcios where hidden = 0", cn); dr = cmd.ExecuteReader(); while (dr.Read()) { this.dataGridView1.Rows.Add(dr.GetValue(0), dr.GetValue(1), dr.GetValue(2), dr.GetValue(3), dr.GetValue(4), dr.GetValue(5), dr.GetValue(6), dr.GetValue(7), dr.GetValue(8)); } cn.Close(); } catch (Exception ex) { MessageBox.Show("Error" + ex.Message); } }
private void frm_jueces_Load(object sender, EventArgs e) { crud obcrud = new crud(); this.cbx_fiscalia.DataSource = obcrud.consultar3("pr_fiscalia", "hidden= 0"); this.cbx_fiscalia.DisplayMember = "nombre"; this.cbx_fiscalia.ValueMember = "nombre"; this.cbx_fiscalia.Refresh(); this.cbx_juzgado.DataSource = obcrud.consultar3("pr_juzgado_paz", "hidden= 0"); this.cbx_juzgado.DisplayMember = "circunscripcion"; this.cbx_juzgado.ValueMember = "circunscripcion"; this.cbx_juzgado.Refresh(); mtb_buscador.Select(); this.mtb_cedula.Enabled = false; this.txt_nombre.Enabled = false; this.txt_apellido.Enabled = false; this.txt_email.Enabled = false; this.cbx_jurisdiccion.Enabled = false; this.txt_telefono.Enabled = false; this.txt_celular.Enabled = false; this.cbx_juzgado.Enabled = false; this.cbx_fiscalia.Enabled = false; this.cbx_genero.Enabled = false; this.cbx_estado.Enabled = false; MySqlConnection cn; MySqlCommand cmd; MySqlDataReader dr; try { cn = new MySqlConnection("server=localhost;user id=root; database=proyecto3; password="******"select nombre, apellido, cedula, telefono, fizcalia, juzgado, jurisdiccion from pr_jueces where hidden =0", cn); dr = cmd.ExecuteReader(); while (dr.Read()) { this.dataGridView1.Rows.Add(dr.GetValue(0), dr.GetValue(1), dr.GetValue(2), dr.GetValue(3), dr.GetValue(4), dr.GetValue(5), dr.GetValue(6)); } cn.Close(); } catch (Exception ex) { MessageBox.Show("Error" + ex.Message); } }
private void frm_procurador_Load(object sender, EventArgs e) { this.cbx_procuraduria.DataSource = obcrud.consultar3("pr_procuraduria", "hidden= 0"); this.cbx_procuraduria.DisplayMember = "nombre"; this.cbx_procuraduria.ValueMember = "nombre"; this.cbx_procuraduria.Refresh(); txt_buscador.Select(); this.txt_cedula.Enabled = false; this.txt_nombre.Enabled = false; this.txt_apellido.Enabled = false; this.cbx_genero.Enabled = false; MySqlConnection cn; MySqlCommand cmd; MySqlDataReader dr; try { cn = new MySqlConnection("server=localhost;user id=root; database=proyecto3; password="******"select nombre, apellido, cedula, tipo_procurador, procu_id from pr_procurador where hidden =0", cn); dr = cmd.ExecuteReader(); while (dr.Read()) { this.dataGridView1.Rows.Add(dr.GetValue(0), dr.GetValue(1), dr.GetValue(2), dr.GetValue(3), dr.GetValue(4)); } cn.Close(); } catch (Exception ex) { MessageBox.Show("Error" + ex.Message); } }
private void rango_alquiler_Load(object sender, EventArgs e) { crud obcrud = new crud(); this.cbx_fiscalia.DataSource = obcrud.consultar3("pr_clientes", "hidden= 0"); this.cbx_fiscalia.DisplayMember = "nombre"; this.cbx_fiscalia.ValueMember = "nombre"; this.cbx_fiscalia.Refresh(); }
private void frm_add_sector_Load(object sender, EventArgs e) { crud obcrud = new crud(); this.cbx_provincias.DataSource = obcrud.consultar3("pr_provincias", "hidden= 0"); this.cbx_provincias.DisplayMember = "nombre"; this.cbx_provincias.ValueMember = "nombre"; this.cbx_provincias.Refresh(); }
private void frm_alquiler_Load(object sender, EventArgs e) { crud obcrud = new crud(); this.comboBox1.DataSource = obcrud.consultar3("pr_clientes", "hidden= 0"); this.comboBox1.DisplayMember = "nombre"; this.comboBox1.ValueMember = "nombre"; this.comboBox1.Refresh(); this.comboBox2.DataSource = obcrud.consultar3("pr_clientes", "hidden= 0"); this.comboBox2.DisplayMember = "nombre"; this.comboBox2.ValueMember = "nombre"; this.comboBox2.Refresh(); this.comboBox3.DataSource = obcrud.consultar3("pr_terceros", "hidden= 0"); this.comboBox3.DisplayMember = "nombre"; this.comboBox3.ValueMember = "nombre"; this.comboBox3.Refresh(); mtb_buscador.Select(); label1.Visible = true; label2.Visible = true; label16.Visible = true; label36.Visible = false; label37.Visible = false; label26.Visible = false; this.maskedTextBox1.Visible = false; this.maskedTextBox2.Visible = false; this.maskedTextBox3.Visible = false; this.mtb_cedula_c.Enabled = true; this.comboBox1.Enabled = false; this.txt_apellido_c.Enabled = false; this.cbx_genero_c.Enabled = false; this.txt_tel_c.Enabled = false; this.txt_celular_c.Enabled = false; this.txt_direccion_c.Enabled = false; this.cbx_estado_civil_c.Enabled = false; this.mtb_cedula_i.Enabled = true; this.comboBox2.Enabled = false; this.txt_apellido_i.Enabled = false; this.cbx_genero_i.Enabled = false; this.txt_tel_i.Enabled = false; this.txt_celular_i.Enabled = false; this.txt_direccion_i.Enabled = false; this.cbx_estado_civil_i.Enabled = false; this.mtb_cedula_g.Enabled = true; this.comboBox3.Enabled = false; this.txt_apellido_g.Enabled = false; this.cbx_genero_g.Enabled = false; this.txt_tel_g.Enabled = false; this.txt_celular_g.Enabled = false; this.txt_direccion_g.Enabled = false; this.cbx_estado_civil_g.Enabled = false; MySqlConnection cn; MySqlCommand cmd; MySqlDataReader dr; try { cn = new MySqlConnection("server=localhost;user id=root; database=proyecto3; password="******"select nombre_c, nombre_i, nombre_g, direccion, contrato, alquiler, notario from pr_alquiler where hidden=0", cn); dr = cmd.ExecuteReader(); while (dr.Read()) { this.dataGridView1.Rows.Add(dr.GetValue(0), dr.GetValue(1), dr.GetValue(2), dr.GetValue(3), dr.GetValue(4), dr.GetValue(5), dr.GetValue(6)); } cn.Close(); } catch (Exception ex) { MessageBox.Show("Error" + ex.Message); } }
private void frm_clientes_Load(object sender, EventArgs e) { crud obcrud = new crud(); this.cbx_fiscalia.DataSource = obcrud.consultar3("pr_fiscalia", "hidden= 0"); this.cbx_fiscalia.DisplayMember = "nombre"; this.cbx_fiscalia.ValueMember = "nombre"; this.cbx_fiscalia.Refresh(); this.cbx_procurador.DataSource = obcrud.consultar3("pr_procurador", "hidden= 0"); this.cbx_procurador.DisplayMember = "nombre"; this.cbx_procurador.ValueMember = "nombre"; this.cbx_procurador.Refresh(); this.cbx_provincia.DataSource = obcrud.consultar3("pr_provincias", "hidden= 0"); this.cbx_provincia.DisplayMember = "nombre"; this.cbx_provincia.ValueMember = "nombre"; this.cbx_provincia.Refresh(); this.cbx_sector.DataSource = obcrud.consultar3("pr_sectores", "hidden= 0"); this.cbx_sector.DisplayMember = "nombre"; this.cbx_sector.ValueMember = "nombre"; this.cbx_sector.Refresh(); this.cbx_oficialia.DataSource = obcrud.consultar3("pr_procuraduria", "hidden= 0"); this.cbx_oficialia.DisplayMember = "nombre"; this.cbx_oficialia.ValueMember = "nombre"; this.cbx_oficialia.Refresh(); mtb_buscador.Select(); this.mtb_pasaporte.Visible = false; this.btn_buscar.Visible = true; this.maskedTextBox1.Visible = false; this.label21.Visible = false; this.mtb_cedula.Enabled = false; this.txt_nombre.Enabled = false; this.txt_apellido.Enabled = false; this.txt_apodo.Enabled = false; this.txt_email.Enabled = false; this.txt_contacto.Enabled = false; this.txt_telefono.Enabled = false; this.txt_celular.Enabled = false; this.txt_trabajo.Enabled = false; this.txt_direccion.Enabled = false; this.txt_costo.Enabled = false; this.txt_empresa.Enabled = false; this.txt_tel_emp.Enabled = false; this.txt_costo.Enabled = false; this.txt_abonos.Enabled = false; this.txt_direc_emp.Enabled = false; this.cbx_fiscalia.Enabled = false; this.cbx_procurador.Enabled = false; this.cbx_sector.Enabled = false; this.cbx_provincia.Enabled = false; this.cbx_oficialia.Enabled = false; this.cbx_genero.Enabled = false; this.cbx_estado.Enabled = false; this.cbx_pais.Enabled = false; MySqlConnection cn; MySqlCommand cmd; MySqlDataReader dr; try { cn = new MySqlConnection("server=localhost;user id=root; database=proyecto3; password="******"select nombre, apellido, cedula, genero, telefono, direccion, trabajo_realizar, costo_servicio, fizcalia from pr_clientes where hidden=0", cn); dr = cmd.ExecuteReader(); while (dr.Read()) { this.dataGridView1.Rows.Add(dr.GetValue(0), dr.GetValue(1), dr.GetValue(2), dr.GetValue(3), dr.GetValue(4), dr.GetValue(5), dr.GetValue(6), dr.GetValue(7), dr.GetValue(8)); } cn.Close(); } catch (Exception ex) { MessageBox.Show("Error" + ex.Message); } }