Exemple #1
0
 public int ResetLastPage(string repID, int repCount)
 {
     int lastPage = this.GetLastPage(repID);
     if (lastPage < 0)
     {
         this.LastPageRemove(repID);
         return -1;
     }
     if (repCount > 0)
     {
         int num2 = lastPage % (repCount + 1);
         lastPage -= num2;
     }
     bool flag = false;
     if (this.LstLastPageInfo == null)
     {
         this.LstLastPageInfo = new List<LastPageInfo>();
     }
     for (int i = 0; i < this.LstLastPageInfo.Count; i++)
     {
         if (repID == this.LstLastPageInfo[i].Tbl)
         {
             this.LstLastPageInfo[i].Page = lastPage;
             flag = true;
             break;
         }
     }
     if (!flag)
     {
         LastPageInfo item = new LastPageInfo {
             Tbl = repID,
             Page = lastPage
         };
         this.LstLastPageInfo.Add(item);
     }
     return lastPage;
 }
Exemple #2
0
 private void MakeLstLastPageInfo()
 {
     for (int i = this.LstNaccsData.Count - 1; i >= 0; i--)
     {
         if (!(this.LstNaccsData[i].Tbl != tblComName) || (this.LstNaccsData[i].Data == ""))
         {
             continue;
         }
         bool flag = false;
         for (int j = 0; j < this.LstLastPageInfo.Count; j++)
         {
             if (this.LstLastPageInfo[j].Tbl == this.LstNaccsData[i].Tbl)
             {
                 flag = true;
                 if (this.LstLastPageInfo[j].Page < this.LstNaccsData[i].Page)
                 {
                     this.LstLastPageInfo[j].Page = this.LstNaccsData[i].Page;
                     break;
                 }
             }
         }
         if (!flag)
         {
             LastPageInfo item = new LastPageInfo {
                 Tbl = this.LstNaccsData[i].Tbl,
                 Page = this.LstNaccsData[i].Page
             };
             this.LstLastPageInfo.Add(item);
         }
     }
 }