Exemple #1
0
        /// <summary>
        /// Refresh the family ListView
        /// </summary>
        public void RefreshListViewFamily()
        {
            int           NumFamily;
            List <Family> ListFamilies = DaoFurniture.GetAllFamily();

            Dialog_Basic.DialogBasic.ListViewBasic.Items.Clear();

            // Show all the data on the ListView
            for (NumFamily = 0; NumFamily < ListFamilies.Count; NumFamily++)
            {
                ListViewItem Line = AddFamilyToListView(ListFamilies[NumFamily]);
                Dialog_Basic.DialogBasic.ListViewBasic.Items.Add(Line);
            }

            // Autoresize widths of columns
            foreach (ColumnHeader ColumnHeader in Dialog_Basic.DialogBasic.ListViewBasic.Columns)
            {
                // Width changes with the texts as well as headers
                ColumnHeader.Width = -2;
            }
        }
 /// <summary>
 /// Get list of all family
 /// </summary>
 /// <returns> The list of family </returns>
 public static List <Family> GetAllFamily()
 {
     return(DaoFurniture.GetAllFamily());
 }