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; } } } } } }
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; } } } } }
private void BindStores() { if (UserEntity != null) { _StoreBindList = new RelationBindingList <Store>(); if (!UserEntity.IsNew) { IList <Store> lst = ClientEnvironment.UserService.GetUserStores(UserEntity.ID); if ((lst != null) && (lst.Count > 0)) { foreach (Store store in lst) { _StoreBindList.Add(store); } } } lbStores.DataSource = _StoreBindList; } }
private void BindRegions() { if (UserEntity != null) { _RegionBindList = new RelationBindingList <Domain.Region>(); if (!UserEntity.IsNew) { IList <Domain.Region> lst = ClientEnvironment.UserService.GetUserRegions(UserEntity.ID); if ((lst != null) && (lst.Count > 0)) { foreach (Domain.Region region in lst) { _RegionBindList.Add(region); } } } lbRegions.DataSource = _RegionBindList; } }
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; } } } } }
private void BindCountries() { if (UserEntity != null) { if (!UserEntity.IsNew) { _CountryBindList = new RelationBindingList <Domain.Country>(); IList <Domain.Country> lst = ClientEnvironment.UserService.GetUserCountries(UserEntity.ID); if ((lst != null) && (lst.Count > 0)) { foreach (Domain.Country country in lst) { _CountryBindList.Add(country); } } } else { _CountryBindList = new RelationBindingList <Domain.Country>(); } lbCountries.DataSource = _CountryBindList; } }
private void BindStores() { if (UserEntity != null) { _StoreBindList = new RelationBindingList<Store>(); if (!UserEntity.IsNew) { IList<Store> lst = ClientEnvironment.UserService.GetUserStores(UserEntity.ID); if ((lst != null) && (lst.Count > 0)) { foreach (Store store in lst) { _StoreBindList.Add(store); } } } lbStores.DataSource = _StoreBindList; } }
private void BindRegions() { if (UserEntity != null) { _RegionBindList = new RelationBindingList<Domain.Region>(); if (!UserEntity.IsNew) { IList<Domain.Region> lst = ClientEnvironment.UserService.GetUserRegions(UserEntity.ID); if ((lst != null) && (lst.Count > 0)) { foreach (Domain.Region region in lst) { _RegionBindList.Add(region); } } } lbRegions.DataSource = _RegionBindList; } }
private void BindCountries() { if (UserEntity != null) { if (!UserEntity.IsNew) { _CountryBindList = new RelationBindingList<Domain.Country>(); IList<Domain.Country> lst = ClientEnvironment.UserService.GetUserCountries(UserEntity.ID); if ((lst != null) && (lst.Count > 0)) { foreach (Domain.Country country in lst) { _CountryBindList.Add(country); } } } else { _CountryBindList = new RelationBindingList<Domain.Country>(); } lbCountries.DataSource = _CountryBindList; } }