Beispiel #1
0
        public Agregar_Modificar_Chofer(DataGridViewRow row, ABMChofer abm) //constructor modificar
        {
            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"))
            {
                comboBox1.Text = "Inhabilitado";
            }
            else
            {
                comboBox1.Text = "Habilitado";
            }
        }
Beispiel #2
0
 public Agregar_Modificar_Chofer(ABMChofer abm) //constructor 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;
 }
Beispiel #3
0
 private void ABMChoferBut_Click(object sender, EventArgs e)
 {
     Abm_Chofer.ABMChofer abmChofer = new Abm_Chofer.ABMChofer();
     abmChofer.Show();
 }