public Agregar_Modificar_Cliente(DataGridViewRow row, ABMCliente abm) //constructor de modificacion { bd = new BaseDeDatos(); conexion = bd.getCon(); InitializeComponent(); button1.Hide(); //BOTON ALTA this.abm = abm; label12.Visible = true; comboBox1.Visible = true; monthCalendar1.MaxSelectionCount = 1; monthCalendar1.MaxDate = new DateTime(Configuracion.fechaAño() - 5, Configuracion.fechaMes(), Configuracion.fechaDia()); user = row.Cells[0].Value.ToString(); textBox1.Text = row.Cells[1].Value.ToString(); //Nombre textBox2.Text = row.Cells[2].Value.ToString(); //Apellido textBox3.Text = row.Cells[3].Value.ToString(); //DNI textBox4.Text = row.Cells[9].Value.ToString(); //Mail textBox5.Text = row.Cells[4].Value.ToString(); //Nacimiento textBox6.Text = row.Cells[10].Value.ToString(); //Telefono textBox7.Text = row.Cells[5].Value.ToString(); //Direccion textBox8.Text = row.Cells[6].Value.ToString(); //Piso textBox9.Text = row.Cells[7].Value.ToString(); //Depto textBox10.Text = row.Cells[8].Value.ToString(); //Cod Postal textBox11.Text = row.Cells[11].Value.ToString(); //Localidad telefonoViejo = row.Cells[10].Value.ToString(); if (row.Cells[12].Value.ToString().Equals("I")) //Texto a aparecer en combobox transformando el char en un string { comboBox1.Text = "Inhabilitado"; } else { comboBox1.Text = "Habilitado"; } }
public Agregar_Modificar_Cliente(ABMCliente abm) //constructor de alta { bd = new BaseDeDatos(); conexion = bd.getCon(); InitializeComponent(); label12.Visible = false; comboBox1.Visible = false; monthCalendar1.MaxSelectionCount = 1; monthCalendar1.MaxDate = new DateTime(Configuracion.fechaAño() - 5, Configuracion.fechaMes(), Configuracion.fechaDia()); button2.Hide(); //BOTON MODIFICAR this.abm = abm; }
private void ABMClienteBut_Click(object sender, EventArgs e) { Abm_Cliente.ABMCliente abmCliente = new Abm_Cliente.ABMCliente(); abmCliente.Show(); }