private void DoSwitchShop() { try { String costumeID = costumeTextBox1.Text; if ((brand == null || brand.AutoID == -1) && String.IsNullOrEmpty(costumeID)) { isFilter = false; } else { isFilter = true; } if (brand == null) { brand = new Brand(); brand.AutoID = 0; } CostumeStoreInfoSum listPage = GlobalCache.ServerProxy.GetCostumeStores(shopID, costumeID, brand.AutoID); InitProgress(listPage.CostumeStores.Count); this.curInboundDetailList = listPage.CostumeStores; BindingSource(curInboundDetailList); } catch (Exception ex) { FailedProgress(ex); ShowError(ex); } finally { UnLockPage(); } }
private void BindingSource(CostumeStoreInfoSum listPage) { if (this.InvokeRequired) { this.BeginInvoke(new CbGeneric <CostumeStoreInfoSum>(this.BindingSource), listPage); } else { if (listPage != null) { foreach (var item in listPage.CostumeStores) { // item.CostumeName = CommonGlobalCache.GetCostumeName(item.CostumeID); item.ShopName = CommonGlobalCache.GetShopName(item.ShopID); } } dataGridViewPagingSumCtrl.BindingDataSource <CostumeStore>(DataGridViewUtil.ListToBindingList(listPage?.CostumeStores), true, listPage?.CostumeStoreSum); CompleteProgressForm(); } }