예제 #1
0
        //CARGAR ELEMENTOS
        private void cargarCompetencias()
        {
            panelElements.Controls.Clear();
            panelElements.RowCount   = 1;
            panelElements.AutoScroll = false;
            panelUtil.AutoScroll     = false;
            panelUtil.AutoScroll     = true;

            List <Competencia> competencias = Competencia.ListaCompetencias();

            CCompetencia[] compC = new CCompetencia[competencias.Count];

            int c = 0;

            foreach (Competencia comp in competencias)
            {
                compC[c] = new CCompetencia(comp);
                panelElements.Controls.Add(compC[c], 0, c);
                panelElements.RowCount = panelElements.RowCount + 1;
                compC[c].Location      = new Point(compC[c].Location.X, (compC[c].Size.Height * c));

                //BOTON SOLICITAR
                Panel  panel   = (Panel)compC[c].Controls.Find("panel1", false)[0];
                Button bBorrar = (Button)panel.Controls.Find("bBorrar", false)[0];

                //PROGRAMACIÓN BOTONES
                bBorrar.Click += (sender, EventArgs) => { bBorrarCompT_Click(sender, EventArgs, comp); };

                c++;
            }
        }
예제 #2
0
 private void cargarCompetencias()
 {
     if (mod == 0)
     {
         foreach (Competencia c in Competencia.ListaCompetencias(p))
         {
             listCompetencias.Items.Add(c);
         }
         listCompetencias.DisplayMember = "nombreComp";
     }
     else
     {
         int index = 0;
         foreach (Competencia c in Competencia.ListaCompetencias())
         {
             listModiCompetencias.Items.Add(c);
             if (listCompetencias.Items.Contains(c))
             {
                 listModiCompetencias.SetSelected(index, true);
             }
             index++;
         }
         listModiCompetencias.DisplayMember = "nombreComp";
     }
 }
예제 #3
0
 private void cargarCompetencias()
 {
     foreach (Competencia c in Competencia.ListaCompetencias())
     {
         listCompetencias.Items.Add(c);
     }
     listCompetencias.DisplayMember = "nombreComp";
 }
예제 #4
0
파일: Filtros.cs 프로젝트: DeuneB07/APS
 private void CargarCompetencias()
 {
     listComp1.Items.Clear();
     foreach (Competencia c in Competencia.ListaCompetencias())
     {
         listComp1.Items.Add(c);
     }
 }
예제 #5
0
 private Boolean comprobarExistencia(string comp)
 {
     foreach (Competencia tt in Competencia.ListaCompetencias())
     {
         if (tt.NombreComp.ToLower().Equals(comp.ToLower()))
         {
             return(true);
         }
     }
     return(false);
 }
예제 #6
0
 public void cargarCompetencias()
 {
     listCompetencias.Items.Clear();
     if (comboGrado.SelectedItem != null)
     {
         Grado g = (Grado)comboGrado.SelectedItem;
         foreach (Competencia c in Competencia.ListaCompetencias(g))
         {
             listCompetencias.Items.Add(c);
         }
     }
     else
     {
         foreach (Competencia c in Competencia.ListaCompetencias())
         {
             listCompetencias.Items.Add(c);
         }
     }
     listCompetencias.DisplayMember = "nombreComp";
 }