Exemple #1
0
        private void Btncrear_Click(object sender, EventArgs e)
        {
            bool estaAbierto = MenuPrincipal.ValidarApertura("GestionTipoPlataforma");

            if (estaAbierto == true)
            {
                MessageBox.Show("EL FORMULARIO YA SE ENCUENTRA ABIERTO");
                Application.OpenForms["GestionTpoPlataforma"].Focus();
            }
            else
            {
                forms.GestionTpoPlataforma gestionTpoPlataforma = new forms.GestionTpoPlataforma();
                gestionTpoPlataforma.ShowDialog();
                CargaInicial();
            }
        }
Exemple #2
0
        private void Btnmodificar_Click(object sender, EventArgs e)
        {
            bool estaAbierto = MenuPrincipal.ValidarApertura("GestionTpoPlataforma");

            if (estaAbierto == true)
            {
                MessageBox.Show("EL FORMULARIO YA SE ENCUENTRA ABIERTO");
                Application.OpenForms["GestionTpoPlataforma"].Focus();
            }
            else
            {
                forms.GestionTpoPlataforma gestionTpoPlataforma = new forms.GestionTpoPlataforma();
                gestionTpoPlataforma.pIdTipoPlataforma = Int32.Parse(dgtipoplataforma.Rows[dgtipoplataforma.CurrentRow.Index].Cells[0].Value.ToString());
                gestionTpoPlataforma.pnombre           = dgtipoplataforma.Rows[dgtipoplataforma.CurrentRow.Index].Cells[1].Value.ToString();
                gestionTpoPlataforma.op_guardar        = 1;
                gestionTpoPlataforma.ShowDialog();
                CargaInicial();
            }
        }