/// <summary>
        /// 绑定plenishOrderSource源到dataGridView中
        /// </summary>
        /// <param name="listPage"></param>
        private void BindingReturnOrderSource(PfOrderPage listPage)
        {
            if (listPage != null && listPage.PfOrders != null && listPage.PfOrders.Count > 0)
            {
                List <PfOrder> details = listPage.PfOrders;
                foreach (var item in details)
                {
                    item.PfCustomerName = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
                    item.AdminUserName  = CommonGlobalCache.GetUserName(item.AdminUserID);
                }
            }

            this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PfOrders, null, listPage?.TotalEntityCount, listPage?.PfOrderSum);
            this.skinSplitContainer1.Panel2Collapsed = true;
        }
 private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index)
 {
     try
     {
         if (this.pagePara == null)
         {
             return;
         }
         pagePara.PageIndex = index;
         PfOrderPage listPage = GlobalCache.ServerProxy.GetPfOrderPage(this.pagePara);
         this.BindingReturnOrderSource(listPage);
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
 }
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                if ((pfCustomer.ID == null || pfCustomer.ID == "" || pfCustomer == null) && skinComboBox_PfCustomer.Text != "所有")
                {
                    ShowMessage("客户不存在,请重新选择!");
                    skinComboBox_PfCustomer.Focus();
                    return;
                }

                string orderID = string.IsNullOrEmpty(this.skinTextBox_OrderID.SkinTxt.Text) ? null : this.skinTextBox_OrderID.SkinTxt.Text;
                this.pagePara = new GetPfOrderPagePara()
                {
                    PfOrderID    = orderID,
                    StartDate    = new CJBasic.Date(this.dateTimePicker_Start.Value),
                    EndDate      = new CJBasic.Date(this.dateTimePicker_End.Value),
                    PageIndex    = 0,
                    PageSize     = this.dataGridViewPagingSumCtrl.PageSize,
                    PfCustomerID = pfCustomer.ID,
                    //  SupplierID = ValidateUtil.CheckEmptyValue(this.skinComboBox_PfCustomer.SelectedValue),
                    CostumeID        = ValidateUtil.CheckEmptyValue(skinTextBox_costumeID.SkinTxt.Text),
                    PfOrderState     = (PfOrderState)pfType.SelectedValue,
                    PfOrderStateEnum = (PfOrderStateEnum)skinComboBox_State.SelectedValue
                };
                PfOrderPage listPage = GlobalCache.ServerProxy.GetPfOrderPage(this.pagePara);
                dataGridViewPagingSumCtrl.OrderPara = pagePara;
                dataGridViewPagingSumCtrl.Initialize(listPage);
                BindingReturnOrderSource(listPage);
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
        public WholesaleOrderDetailCtrl(String orderID)
        {
            InitializeComponent();


            dataGridViewPagingSumCtrl = new DataGridViewPagingSumCtrl(dataGridView1, new String[] {
                xSDataGridViewTextBoxColumn.DataPropertyName,
                sDataGridViewTextBoxColumn.DataPropertyName,
                mDataGridViewTextBoxColumn.DataPropertyName,
                lDataGridViewTextBoxColumn.DataPropertyName,
                xLDataGridViewTextBoxColumn.DataPropertyName,
                xL2DataGridViewTextBoxColumn.DataPropertyName,
                xL3DataGridViewTextBoxColumn.DataPropertyName,
                xL4DataGridViewTextBoxColumn.DataPropertyName,
                xL5DataGridViewTextBoxColumn.DataPropertyName,
                xL6DataGridViewTextBoxColumn.DataPropertyName,
                fDataGridViewTextBoxColumn.DataPropertyName,
                sumMoneyDataGridViewTextBoxColumn.DataPropertyName,
                sumCountDataGridViewTextBoxColumn.DataPropertyName
            });
            dataGridViewPagingSumCtrl.Initialize();
            GetPfOrderPagePara para = new GetPfOrderPagePara()
            {
                PfOrderID = orderID,
                PageIndex = 0,
                PageSize  = 1
            };
            PfOrderPage listPage = CommonGlobalCache.ServerProxy.GetPfOrderPage(para);

            if (listPage != null && listPage.PfOrders.Count == 1)
            {
                //获取order
                this.curReturnOrder = listPage.PfOrders[0];
            }


            this.Initialize();
        }