private void Search() { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } PfCustomerStorePage listPage = GlobalCache.ServerProxy.GetPfCustomerStorePage(this.pagePara); SetColumnDisplay(); dataGridViewPagingSumCtrl.OrderPara = pagePara; this.dataGridViewPagingSumCtrl.Initialize(listPage); this.BindingCostumeStoreDataSource(listPage); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }
/// <summary> /// 绑定CostumeStore数据源 /// </summary> /// <param name="listPage"></param> private void BindingCostumeStoreDataSource(PfCustomerStorePage listPage) { this.dataGridView1.DataSource = null; this.costumeStoreList.Clear(); if (listPage != null && listPage.PfCustomerStores != null) { foreach (PfCustomerStore store in listPage.PfCustomerStores) { Costume costume = CommonGlobalCache.GetCostume(store.CostumeID); if (costume != null) { store.PfCustomerName = PfCustomerCache.GetPfCustomerName(store.PfCustomerID); store.CostumeName = costume.Name; store.Remarks = costume.Remarks; } this.costumeStoreList.Add(store); } if (this.costumeStoreList != null && this.costumeStoreList.Count > 0) { this.dataGridViewPagingSumCtrl.BindingDataSource <PfCustomerStore>(DataGridViewUtil.ToDataTable <PfCustomerStore>(costumeStoreList)); } } this.dataGridView1.Refresh(); }