Exemplo n.º 1
0
 private void Load_District(int id)
 {
     using (var database = new DonViHanhChinhEntities())
     {
         var table = from data in database.Districts.Cast <District>() where data.ProvinceId.Equals(id) select data;
         cbx_district.ItemsSource       = table.ToList().OrderBy(i => i.Name);
         cbx_district.DisplayMemberPath = "Name";
     }
 }
Exemplo n.º 2
0
 private void Load_Ward(int id)
 {
     using (var database = new DonViHanhChinhEntities())
     {
         var table = from data in database.Wards.Cast <Ward>() where data.DistrictID.Equals(id) select data;
         cbx_ward.ItemsSource       = table.ToList().OrderBy(i => i.Name);
         cbx_ward.DisplayMemberPath = "Name";
     }
 }
Exemplo n.º 3
0
 public void Load_Country()
 {
     using (var database = new DonViHanhChinhEntities())
     {
         var table = from data in database.Countries.Cast <Country>() select data;
         cbx_country.ItemsSource       = table.ToList().OrderBy(i => i.CommonName);
         cbx_country.DisplayMemberPath = "CommonName";
     }
 }