Ejemplo n.º 1
0
 private void btnActualiser_Click(object sender, EventArgs e)
 {
     Acces.Charger_ListeAttribut();
     Acces.Charger_ListeParametre();
     Acces.Charger_ListeTableValeur();
     Initialiser();
 }
Ejemplo n.º 2
0
        void Afficher_ListeAttribut()
        {
            lstAttribut.Items.Clear();
            Acces.Charger_ListeAttribut();

            foreach (Attribut a in Acces.ListeAttribut)
            {
                if (a.Element_Type == Acces.type_ACTION.ID && a.Libelle.Substring(0, 1) != "_")
                {
                    lstAttribut.Items.Add(a.Code + " : " + a.Libelle);
                }
            }
        }
Ejemplo n.º 3
0
        void Afficher_ListeAttribut()
        {
            DG_Attribut.DataSource = null;

            Acces.Charger_ListeAttribut();
            DG_Attribut.DataSource            = Acces.ListeAttribut;
            DG_Attribut.Columns["ID"].Visible = false;

            //Filtre par raport à la zone de recherche
            string recherche = lblRechercheAttribut.Text.Trim().ToUpper();

            if (recherche.Length > 0)
            {
                try
                {
                    for (int k = 0; k < DG_Attribut.Rows.Count; k++)
                    {
                        DG_Attribut.Rows[k].Visible =
                            DG_Attribut.Rows[k].Cells["Libelle"].Value.ToString().ToUpper().Contains(recherche) ||
                            DG_Attribut.Rows[k].Cells["Code"].Value.ToString().ToUpper().Contains(recherche);
                    }
                }
                catch { }
            }

            if (!(lstElement.SelectedIndex < 0))
            {
                for (int k = 0; k < DG_Attribut.Rows.Count; k++)
                {
                    try
                    {
                        DG_Attribut.Rows[k].Visible =
                            (DG_Attribut.Rows[k].Cells["element_type"].Value.ToString() == listeTypeElement[lstElement.SelectedIndex].ID.ToString());
                    }
                    catch { }
                }
            }

            for (int k = 0; k < DG_Attribut.Columns.Count; k++)
            {
                DG_Attribut.Columns[k].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            }
        }