예제 #1
0
 private void CustomersInformation_Load(object sender, EventArgs e)
 {
     db = new dbModel();
     //customerBindingSource.DataSource = db.Customers.ToList();
     customerBindingSource.DataSource = db.Customersses.ToList();
     cityBindingSource.DataSource     = db.Cities.ToList();
 }
        private void addNewCustomer_Load(object sender, EventArgs e)
        {
            comboCity.DisplayMember = "CityName";
            comboCity.ValueMember   = "CityId";
            //comboPackage.DisplayMember = "PackageName";
            //comboPackage.ValueMember = "PackageId";


            using (dbModel db = new dbModel())
            {
                comboCity.DataSource = db.Cities.ToList();
                //comboPackage.DataSource = db.Packages.ToList();
            }
        }