Beispiel #1
0
 private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index)
 {
     try
     {
         if (this.pagePara == null)
         {
             return;
         }
         if (GlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         pagePara.PageIndex = index;
         DistributorWithdrawRecordPage listPage = GlobalCache.ServerProxy.GetDistributorWithdrawRecordPage(this.pagePara);
         this.BindingScrapOrderSource(listPage);
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }
Beispiel #2
0
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                pagePara = new GetDistributorWithdrawRecordPagePara()
                {
                    DistributorID = skinComboBoxShopID.Text,
                    StartDate     = new Date(dateTimePicker_Start.Value),
                    EndDate       = new Date(dateTimePicker_End.Value),
                    PageIndex     = 0,
                    PageSize      = dataGridViewPagingSumCtrl.PageSize,
                    State         = (DistributorWithdrawRecordState)skinComboBoxState.SelectedValue
                };

                DistributorWithdrawRecordPage listPage = GlobalCache.ServerProxy.GetDistributorWithdrawRecordPage(this.pagePara);
                dataGridViewPagingSumCtrl.OrderPara = pagePara;
                this.dataGridViewPagingSumCtrl.Initialize(listPage);
                this.BindingScrapOrderSource(listPage);
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 绑定plenishOrderSource源到dataGridView中
        /// </summary>
        /// <param name="listPage"></param>
        private void BindingScrapOrderSource(DistributorWithdrawRecordPage listPage)
        {
            if (listPage != null && listPage.DistributorWithdrawRecords != null)
            {
                foreach (var item in listPage.DistributorWithdrawRecords)
                {
                    item.DistributorName = PfCustomerCache.GetUserNameWithPf(item.DistributorID);
                }
            }

            //   this.dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ToDataTable(listPage?.DistributorWithdrawRecords), null, listPage?.TotalEntityCount, listPage?.DistributorWithdrawRecordSum);
            this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.DistributorWithdrawRecords, null, listPage?.TotalEntityCount, listPage?.DistributorWithdrawRecordSum);
            //dataGridViewPagingSumCtrl.BindingDataSource<DistributorWithdrawRecord>(DataGridViewUtil.ToDataTable(listPage?.DistributorWithdrawRecords));
            this.skinSplitContainer1.Panel2Collapsed = true;
        }