public Branches() { InitializeComponent(); cb_CarBrand.DataSource = city.SelectAll(); cb_CarBrand.DisplayMember = "CityName"; cb_CarBrand.ValueMember = "ID"; cb_CarBrand.SelectedIndex = -1; cb_area.DataSource = area.SelectAll(); cb_area.DisplayMember = "AreaName"; cb_area.ValueMember = "ID"; cb_area.SelectedIndex = -1; dataGridView1.DataSource = branch.SelectAll(); }
private void Fill() { #region cars brand cb_CarBrand.DataSource = brands.SelectAll(); cb_CarBrand.DisplayMember = "BrandName"; cb_CarBrand.ValueMember = "ID"; cb_CarBrand.SelectedIndex = -1; #endregion #region client Category // ComboBox cb_CarBrand = this.Owner.Controls.Find("cb_cat", true).First() as ComboBox; cb_cat.DataSource = cat.SelectAll(); cb_cat.DisplayMember = "Client_Category"; cb_cat.ValueMember = "ID"; cb_cat.SelectedIndex = -1; #endregion #region Colors cb_colors.DataSource = colors.SelectAll(); cb_colors.DisplayMember = "ColorName"; cb_colors.ValueMember = "ID"; cb_colors.SelectedIndex = -1; #endregion #region City cb_City.DataSource = city.SelectAll(); cb_City.DisplayMember = "CityName"; cb_City.ValueMember = "ID"; cb_City.SelectedValue = 2; cb_area.DataSource = area.SelectAllByCity(2); cb_area.DisplayMember = "AreaName"; cb_area.ValueMember = "ID"; cb_area.SelectedValue = 5; #endregion #region ads cmb_ads.DataSource = how.SelectAll(); cmb_ads.DisplayMember = "HowDidYouUS"; cmb_ads.ValueMember = "ID"; cmb_ads.SelectedIndex = -1; #endregion #region branches cb_branches.DataSource = branch.SelectAll(); cb_branches.DisplayMember = "BranchName"; cb_branches.ValueMember = "ID"; cb_branches.SelectedValue = 2; #endregion }
public NewOrder() { InitializeComponent(); //cb_status1.DataSource = orders.SelectAll(); //cb_status1.DisplayMember = "StatusOrder"; //cb_status1.ValueMember = "ID"; //cb_status1.SelectedIndex = -1; cb_Clients.DataSource = client.SelectAll(); cb_Clients.DisplayMember = "Client_Name"; cb_Clients.ValueMember = "ID"; cb_Clients.SelectedIndex = -1; cb_branches.DataSource = branches.SelectAll(); cb_branches.DisplayMember = "BranchName"; cb_branches.ValueMember = "ID"; cb_branches.SelectedIndex = -1; }