private void buttonProveedores_Click(object sender, EventArgs e)
 {
     ComunidadesForms.OperacionesForms.FormOperacionesListadoProveedores nueva = new ComunidadesForms.OperacionesForms.FormOperacionesListadoProveedores(this, "FormInsertarContacto", idComunidad);
     nueva.ControlBox    = true;
     nueva.TopMost       = true;
     nueva.WindowState   = FormWindowState.Normal;
     nueva.StartPosition = FormStartPosition.CenterScreen;
     nueva.Show();
 }
Exemplo n.º 2
0
 private void buttonEspera_Click(object sender, EventArgs e)
 {
     //ENTIDAD
     if (comboBoxEspera.SelectedIndex == 0)
     {
         Entidades nueva = new Entidades(this, this.Name);
         nueva.ControlBox    = true;
         nueva.WindowState   = FormWindowState.Normal;
         nueva.StartPosition = FormStartPosition.CenterScreen;
         nueva.textBox_buscar_nombre.Select();
         nueva.Show();
     }
     //COMUNERO
     else if (comboBoxEspera.SelectedIndex == 1)
     {
         if (idComunidad == 0)
         {
             MessageBox.Show("Solo hay comuneros en una comunidad!");
         }
         else
         {
             ComunidadesForms.Comuneros nueva = new ComunidadesForms.Comuneros(this, "FormInsertarGestion", idComunidad.ToString());
             nueva.ControlBox    = true;
             nueva.WindowState   = FormWindowState.Normal;
             nueva.StartPosition = FormStartPosition.CenterScreen;
             nueva.Show();
         }
     }
     //PROVEEDOR
     else if (comboBoxEspera.SelectedIndex == 2)
     {
         if (idComunidad == 0)
         {
             MessageBox.Show("Solo hay proveedores en una comunidad!");
         }
         else
         {
             ComunidadesForms.OperacionesForms.FormOperacionesListadoProveedores nueva = new ComunidadesForms.OperacionesForms.FormOperacionesListadoProveedores(this, "FormInsertarGestion", idComunidad.ToString());
             nueva.ControlBox    = true;
             nueva.WindowState   = FormWindowState.Normal;
             nueva.StartPosition = FormStartPosition.CenterScreen;
             nueva.Show();
         }
     }
     //CARGOS GOBIERNO
     else if (comboBoxEspera.SelectedIndex == 3)
     {
         if (idComunidad == 0)
         {
             MessageBox.Show("Solo hay Organos de Gobierno en una comunidad!");
         }
         else
         {
             ComunidadesForms.CargosForms.FormCargos nueva = new ComunidadesForms.CargosForms.FormCargos(this, idComunidad.ToString());
             nueva.ControlBox    = true;
             nueva.WindowState   = FormWindowState.Normal;
             nueva.StartPosition = FormStartPosition.CenterScreen;
             nueva.Show();
         }
     }
     //CONTACTOS
     else if (comboBoxEspera.SelectedIndex == 4)
     {
         if (idTarea == null)
         {
             String sqlSelect = "SELECT exp_gestiones.IdTarea FROM exp_gestiones WHERE(((exp_gestiones.IdGestión) = " + idGestion + "))";
             idTarea = Persistencia.SentenciasSQL.select(sqlSelect).Rows[0][0].ToString();
         }
         FormVerContactos nueva = new FormVerContactos(this, "FormInsertarGestion", idTarea, idComunidad.ToString());
         nueva.ControlBox    = true;
         nueva.WindowState   = FormWindowState.Normal;
         nueva.StartPosition = FormStartPosition.CenterScreen;
         nueva.Show();
     }
     //ORGANOS GOBIERNO
     else if (comboBoxEspera.SelectedIndex == 5)
     {
         if (idTarea == null)
         {
             String sqlSelect = "SELECT exp_gestiones.IdTarea FROM exp_gestiones WHERE(((exp_gestiones.IdGestión) = " + idGestion + "))";
             idTarea = Persistencia.SentenciasSQL.select(sqlSelect).Rows[0][0].ToString();
         }
         ComunidadesForms.CargosForms.FormListadoOrganos nueva = new ComunidadesForms.CargosForms.FormListadoOrganos(this, idComunidad.ToString());
         nueva.ControlBox    = true;
         nueva.WindowState   = FormWindowState.Normal;
         nueva.StartPosition = FormStartPosition.CenterScreen;
         nueva.Show();
     }
 }