Example #1
0
        private void btnModif_Click(object sender, EventArgs e)                     // Conocemos la "clase" a modificar => sabemos que form (listado) hay que mostrar para seleccionar
        {
            switch (tipo.ToUpper())
            {
            case "CLIENTES":
                FormsAdapter nuevo = new frmListaClientes(this);
                nuevo.formSiguiente = new frmCargaCliente(this);
                nuevo.Show();
                this.Hide();
                break;

            case "CHOFERES":
                nuevo = new frmListaChoferes(this);
                nuevo.formSiguiente = new frmCargaChofer(this);
                nuevo.Show();
                this.Hide();
                break;

            case "AUTOS":
                nuevo = new frmListaAutos(this);
                nuevo.formSiguiente = new frmCargaAuto(this);
                nuevo.Show();
                this.Hide();
                break;

            case "TURNOS":
                nuevo = new frmListaTurnos(this);
                nuevo.formSiguiente = new frmCargaTurno(this);
                nuevo.Show();
                this.Hide();
                break;

            default: throw new Exception("Error en menu modificacion");
            }
        }
Example #2
0
        private void btnTurno_Click(object sender, EventArgs e)
        {
            frmListaTurnos listaTurnos = new frmListaTurnos(this);

            listaTurnos.formSiguiente = this;
            listaTurnos.Show();
            this.Hide();
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmListaTurnos listaTurnos = new frmListaTurnos(this);

            listaTurnos.soloHabilitados = true;
            buscaTurno = true;
            listaTurnos.formSiguiente = this;
            listaTurnos.Show();
            this.Hide();
        }