Ejemplo n.º 1
0
        public Agregar_Modificar_Turno(DataGridViewRow row, ABMTurno abm) //constructor modificar turno
        {
            this.abm = abm;
            bd       = new BaseDeDatos();
            conexion = bd.getCon();
            InitializeComponent();
            button1.Hide();                                        //boton alta
            textBox1.Text         = row.Cells[0].Value.ToString();
            textBox1.ReadOnly     = true;                          //no poder modificar la descripcion del turno
            textBox2.Text         = row.Cells[1].Value.ToString(); //hora inicio
            horarioInicioAnterior = Decimal.Parse(row.Cells[1].Value.ToString());
            horarioFinAnterior    = Decimal.Parse(row.Cells[2].Value.ToString());
            textBox3.Text         = row.Cells[2].Value.ToString(); //hora fin
            textBox4.Text         = row.Cells[3].Value.ToString(); //precio base
            textBox5.Text         = row.Cells[4].Value.ToString(); //valor por km
            label6.Visible        = true;
            comboBox1.Visible     = true;                          //estado turno

            if (row.Cells[5].Value.ToString().Equals("I"))
            {
                comboBox1.Text = "Inhabilitado";
            }
            else
            {
                comboBox1.Text = "Habilitado";
            }
        }
Ejemplo n.º 2
0
 public Agregar_Modificar_Turno(ABMTurno abm) //constructor alta turno
 {
     this.abm = abm;
     bd       = new BaseDeDatos();
     conexion = bd.getCon();
     InitializeComponent();
     button2.Hide();                //boton modificar
     label6.Visible        = false;
     comboBox1.Visible     = false; //estado
     textBox1.ReadOnly     = false; //descripcion
     horarioInicioAnterior = 45680;
     horarioFinAnterior    = 45680;
 }
Ejemplo n.º 3
0
 private void ABMTurnoBut_Click(object sender, EventArgs e)
 {
     Abm_Turno.ABMTurno abmTurno = new Abm_Turno.ABMTurno();
     abmTurno.Show();
 }