private void InitTextBoxSubFamily() { // Init SubFamily List <SubFamily> ListSubFamily = ControllerFurniture.GetAllSubFamilyOfFamily(ComboBoxFamily.Text); ComboBoxSubFamily.Items.Clear(); ComboBoxSubFamily.ResetText(); ComboBoxSubFamily.SelectedIndex = -1; foreach (SubFamily SubFamily in ListSubFamily) { ComboBoxSubFamily.Items.Add(SubFamily); } ComboBoxSubFamily.SelectedIndex = -1; }
public Dialog_AddEditArticle(string RefArticle, string Description, string Brand, string Family, string SubFamily, double Price, int Quantity) { InitializeComponent(); ControllerFurniture = new ControllerFurniture(); InitTextBox(); TextBoxRefArticle.Enabled = false; TextBoxRefArticle.Text = RefArticle; TextBoxDescription.Text = Description; ComboBoxBrand.SelectedIndex = ComboBoxBrand.FindStringExact(Brand); ComboBoxFamily.SelectedIndex = ComboBoxFamily.FindStringExact(Family); ComboBoxSubFamily.SelectedIndex = ComboBoxSubFamily.FindStringExact(SubFamily); TextBoxPrice.Text = Price.ToString(); TextBoxQuantity.Text = Quantity.ToString(); }