/// <summary> /// Add a subfamily to ListView /// </summary> /// <param name="Brand"> A subfamily object </param> /// <returns> A line of the information of a subfamily </returns> public ListViewItem AddSubFamilyToListView(SubFamily SubFamily) { string SubFamilyName = SubFamily.GetSetSubFamilyName; int IdFamily = DaoFurniture.GetFamilyIdOfSubFamily(SubFamilyName); string FamilyName = DaoFurniture.GetFamilyName(IdFamily); ListViewItem Line = new ListViewItem(SubFamily.GetSetIdSubFamily.ToString()); Line.SubItems.Add(FamilyName); Line.SubItems.Add(SubFamilyName); return(Line); }
/// <summary> /// Get the name of the family of a subFamily /// </summary> /// <param name="SubFamily"> The name of the subFamily </param> /// <returns> The name of the family </returns> public string GetFamilyNameOfSubFamily(string SubFamily) { int IdFamilyName = DaoFurniture.GetFamilyIdOfSubFamily(SubFamily); return(DaoFurniture.GetFamilyName(IdFamilyName)); }