/// <summary> /// Refresh the subfamily ListView /// </summary> public void RefreshListViewSubFamily() { int NumSubFamily; List <SubFamily> ListSubFamilies = DaoFurniture.GetAllSubFamily(); Dialog_Basic.DialogBasic.ListViewBasic.Items.Clear(); // Show all the data on the ListView for (NumSubFamily = 0; NumSubFamily < ListSubFamilies.Count; NumSubFamily++) { ListViewItem Line = AddSubFamilyToListView(ListSubFamilies[NumSubFamily]); 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 subFamily /// </summary> /// <returns> The list of subFamily </returns> public static List <SubFamily> GetAllSubFamily() { return(DaoFurniture.GetAllSubFamily()); }