/// <summary> /// Refresh the brand ListView /// </summary> public void RefreshListViewBrand() { int NumBrand; List <Brand> ListBrands = DaoFurniture.GetAllBrands(); Dialog_Basic.DialogBasic.ListViewBasic.Items.Clear(); // Show all the data on the ListView for (NumBrand = 0; NumBrand < ListBrands.Count; NumBrand++) { ListViewItem Line = AddBrandToListView(ListBrands[NumBrand]); 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 brands /// </summary> /// <returns> The list of brands </returns> public static List <Brand> GetAllBrands() { return(DaoFurniture.GetAllBrands()); }