예제 #1
0
        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
        }
예제 #2
0
        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();
        }
예제 #3
0
 public City()
 {
     InitializeComponent();
     dataGridView1.DataSource = brands.SelectAll();
 }