Beispiel #1
0
        private void BindingSource(PfAccountRecordPage listPage)
        {
            if (listPage != null && listPage.PfAccountRecords != null && listPage.PfAccountRecords.Count > 0)
            {
                foreach (var item in listPage.PfAccountRecords)
                {
                    item.PfCustomerName  = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
                    item.AccountTypeName = GlobalUtil.GetPfAccountTypeName(item.AccountType);
                    //item.AdminUserName = PfCustomerCache.GetUserNameWithPf(item.AdminUserID);
                }
            }

            this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PfAccountRecords, null, listPage?.TotalEntityCount, listPage?.Sum);
        }
 private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index)
 {
     try
     {
         if (this.pagePara == null)
         {
             return;
         }
         this.pagePara.PageIndex = index;
         PfAccountRecordPage listPage = GlobalCache.ServerProxy.GetPfAccountRecordPage(this.pagePara);
         this.BindingSource(listPage);
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
 }
 public void Search(GetPfAccountRecordPagePara para)
 {
     try
     {
         if (GlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         PfAccountRecordPage listPage = GlobalCache.ServerProxy.GetPfAccountRecordPage(this.pagePara);
         dataGridViewPagingSumCtrl.OrderPara = pagePara;
         this.dataGridViewPagingSumCtrl.Initialize(listPage);
         this.BindingSource(listPage);
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }