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"); } }
private void btnCliente_Click(object sender, EventArgs e) { frmListaClientes busquedaCliente = new frmListaClientes(this); busquedaCliente.formSiguiente = this; busquedaCliente.soloHabilitados = true; busquedaCliente.Show(); this.Hide(); }
//Ao chamar o form de clientes, informamos se é inclusão ou alteração, e o id da pessoa. Se for inclusão, não tem id, então informamos 0. public frmClientes(bool EhInclusao, int cliente_id) { Inclusao = EhInclusao; id = cliente_id; InitializeComponent(); //Inicializa instâncias das outras classes que serão usadas pelos métodos dessa classe classeClientes = new ClasseClientes(); frmListaClientes = new frmListaClientes(); }
//--------------------------------------------- BOTONES--------------------------------- private void btnChofer_Click(object sender, EventArgs e) { frmListaClientes listaClientes = new frmListaClientes(this); listaClientes.formSiguiente = this; listaClientes.soloHabilitados = true; buscaCliente = true; listaClientes.Show(); this.Hide(); }
private void MenuConsultarCliente_Click(object sender, EventArgs e) { frmListaClientes listaClientes = new frmListaClientes(); listaClientes.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { frmListaClientes frmListaClientes = new frmListaClientes(); frmListaClientes.ShowDialog(); }