Exemple #1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            frmNewBus frmNewBus = new frmNewBus(ie, "", null, "Agregar consultorio");

            frmNewBus.FormClosed += new FormClosedEventHandler(frmNewBus_FormClosed);
            frmNewBus.Show();
            Hide();
            ctb();
        }
Exemple #2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            int index = General.GetSelectedIndex(lstBuses);

            if (lstBuses.Items.Count == 0)
            {
                MessageBox.Show("No hay consultorios (Buses) a editar ...", "Aviso al usuario", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                btnQuitar.Enabled = btnEditar.Enabled = false;
                return;
            }

            //Cargar formulario
            frmNewBus frmNewBus = new frmNewBus(ie, busList[index]["Id_Bus"], busList[index], "Editar bus");

            frmNewBus.FormClosed += new FormClosedEventHandler(frmNewBus_FormClosed);
            frmNewBus.Show();
            Hide();
            ctb();
        }