Beispiel #1
0
        private void InitializeDataSources()
        {
            db = new IsraelGeoDataCS();

            SplashScreen.SetStatus("Loading Cities");
            db.View_Cities.Load();
            db.Cities.Load();
            dataGridViewCities.DataSource = db.Cities.Local.ToBindingList();

            SplashScreen.SetStatus("Loading Streets");
            db.View_Streets.Load();
            db.Streets.Load();
            dataGridViewStreets.DataSource = db.Streets.Local.ToBindingList();

            SplashScreen.SetStatus("Loading Regions");
            db.Regions.Load();
            dataGridViewRegions.DataSource = db.Regions.Local.ToBindingList();

            SplashScreen.SetStatus("Loading Lishkot");
            db.Lishkot.Load();
            dataGridViewLishkot.DataSource = db.Lishkot.Local.ToBindingList();

            SplashScreen.SetStatus("Loading Muacot");
            db.Muacot.Load();
            dataGridViewMuacot.DataSource = db.Muacot.Local.ToBindingList();
        }
Beispiel #2
0
        private void InitializeBoxes(IsraelGeoDataCS db)
        {
            //Regions
            var cities = db.Cities.OrderBy(item => item.city_name);

            comboBoxCity.DisplayMember = "Text";
            comboBoxCity.ValueMember   = "Value";
            foreach (City c in cities)
            {
                comboBoxCity.Items.Add(new { Text = c.city_name, Value = c.city_code });
            }
            comboBoxCity.SelectedIndex = comboBoxCity.FindStringExact("לא רשום");
            //comboBoxCity.SelectedIndex = 0;

            textBoxNameStatus.Text = "official";
        }
Beispiel #3
0
        private void InitializeComboBoxes(IsraelGeoDataCS db)
        {
            //Regions db.Cities.OrderBy(item => item.city_name);
            var regions = db.Regions.OrderBy(item => item.region_name);

            comboBoxRegion.DisplayMember = "Text";
            comboBoxRegion.ValueMember   = "Value";
            foreach (Region r in regions)
            {
                comboBoxRegion.Items.Add(new { Text = r.region_name, Value = r.region_code });
            }
            comboBoxRegion.SelectedIndex = comboBoxRegion.FindStringExact("לא ידוע");
            //comboBoxRegion.SelectedIndex = 0;

            //Lishkot
            var lishkot = db.Lishkot.OrderBy(item => item.lishka);

            comboBoxLishka.DisplayMember = "Text";
            comboBoxLishka.ValueMember   = "Value";
            foreach (Lishka l in lishkot)
            {
                comboBoxLishka.Items.Add(new { Text = l.lishka, Value = l.lishkat_mana_code });
            }
            comboBoxLishka.SelectedIndex = comboBoxLishka.FindStringExact("");
            //comboBoxLishka.SelectedIndex = 0;

            //Muacot
            var muacot = db.Muacot.OrderBy(item => item.muaca_name);

            comboBoxMuaca.DisplayMember = "Text";
            comboBoxMuaca.ValueMember   = "Value";
            foreach (Muaca m in muacot)
            {
                comboBoxMuaca.Items.Add(new { Text = m.muaca_name, Value = m.muaca_ezorit_code });
            }
            comboBoxMuaca.SelectedIndex = comboBoxMuaca.FindStringExact("");
            //comboBoxMuaca.SelectedIndex = 0;
        }
Beispiel #4
0
 public FormCity(IsraelGeoDataCS db)
 {
     InitializeComponent();
     InitializeComboBoxes(db);
 }
Beispiel #5
0
 public FormStreet(IsraelGeoDataCS db)
 {
     InitializeComponent();
     InitializeBoxes(db);
 }