예제 #1
0
        private void btnAddRegion_Click(object sender, EventArgs e)
        {
            using (RegionSelectForm frm = new RegionSelectForm())
            {
                frm.ExcludeIds(_RegionBindList.GetIds());

                frm.ShowDialog();
                if (frm.DialogResult == DialogResult.OK)
                {
                    List <Domain.Region> regions = frm.SelectedRegions;
                    if (regions != null)
                    {
                        foreach (Domain.Region region in regions)
                        {
                            object exist = _RegionBindList.GetItemByID(region.ID);

                            if (null == exist)
                            {
                                _RegionBindList.Add(region);
                                Modified         = true;
                                _RegionsModified = true;
                            }
                        }
                    }
                }
            }
        }
예제 #2
0
 private void btnAddCountry_Click(object sender, EventArgs e)
 {
     using (CountrySelectFrm frm = new CountrySelectFrm())
     {
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             foreach (Domain.Country country in frm.SelectedCountries)
             {
                 if (_CountryBindList.GetItemByID(country.ID) == null)
                 {
                     _CountryBindList.Add(country);
                     Modified           = true;
                     _CountriesModified = true;
                 }
             }
         }
     }
 }
예제 #3
0
 private void btnAddStore_Click(object sender, EventArgs e)
 {
     using (StoreSelectFrm frm = new StoreSelectFrm())
     {
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             List <Store> stores = frm.SelectedStores;
             foreach (Store store in stores)
             {
                 if (_StoreBindList.GetItemByID(store.ID) == null)
                 {
                     _StoreBindList.Add(store);
                     Modified        = true;
                     _StoresModified = true;
                 }
             }
         }
     }
 }