private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } if (this.pagePara == null) { return; } pagePara.PageIndex = index; PurchaseCostumePage listPage = GlobalCache.ServerProxy.GetPurchaseCostumePage(this.pagePara); this.BindingPurchaseOrderSource(listPage); } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { GlobalUtil.UnLockPage(this); } }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } string orderID = string.IsNullOrEmpty(this.skinTextBox_OrderID.SkinTxt.Text) ? null : this.skinTextBox_OrderID.SkinTxt.Text; this.pagePara = new PurchaseCostumePagePara() { PurchaseOrderID = orderID, IsOpenDate = true, StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, ShopID = ValidateUtil.CheckEmptyValue(this.skinComboBoxShopID.SelectedValue), CostumeID = ValidateUtil.CheckEmptyValue(skinTextBox_costumeID.SkinTxt.Text) }; PurchaseCostumePage listPage = GlobalCache.ServerProxy.GetPurchaseCostumePage(this.pagePara); dataGridViewPagingSumCtrl.OrderPara = pagePara; this.dataGridViewPagingSumCtrl.Initialize(listPage); this.BindingPurchaseOrderSource(listPage); } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { GlobalUtil.UnLockPage(this); } }
/// <summary> /// 绑定plenishOrderSource源到dataGridView中 /// </summary> /// <param name="listPage"></param> private void BindingPurchaseOrderSource(PurchaseCostumePage listPage) { if (listPage != null && listPage.PurchaseOrderList != null && listPage.PurchaseOrderList.Count > 0) { List <PurchaseOrder> details = listPage.PurchaseOrderList; foreach (var item in details) { if (!String.IsNullOrEmpty(item.DestShopID)) { item.ShopName = GlobalCache.GetShopName(item.DestShopID); item.UserName = GlobalCache.GetUserName(item.AdminUserID); } } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PurchaseOrderList, null, listPage?.TotalEntityCount, listPage?.PurchaseOrderSum); this.skinSplitContainer1.Panel2Collapsed = true; }