Exemplo n.º 1
0
    private inputReceiptItemCollectin GetPageData(inputReceiptItemCollectin objShouSchs)
    {
        inputReceiptItemCollectin inputReceiptItemCollectin = new inputReceiptItemCollectin();

        if (objShouSchs.Count > this.pageSize * (objShouSchs.Count / this.pageSize))
        {
            this.pc.PageCount = objShouSchs.Count / this.pageSize + 1;
        }
        else
        {
            this.pc.PageCount = objShouSchs.Count / this.pageSize;
        }
        if (objShouSchs.Count > this.pageSize * (this.pc.CurrentPageIndex - 1))
        {
            int num = this.pageSize * this.pc.CurrentPageIndex;
            if (objShouSchs.Count < this.pageSize * this.pc.CurrentPageIndex)
            {
                num = objShouSchs.Count;
            }
            for (int i = this.pageSize * (this.pc.CurrentPageIndex - 1); i < num; i++)
            {
                inputReceiptItemCollectin.Add(objShouSchs[i]);
            }
        }
        else
        {
            inputReceiptItemCollectin = objShouSchs;
        }
        return(inputReceiptItemCollectin);
    }
Exemplo n.º 2
0
        public inputReceiptItemCollectin GetPlanItemInfos(int MainID)
        {
            inputReceiptItemCollectin collectin = new inputReceiptItemCollectin();

            foreach (DataRow row in publicDbOpClass.DataTableQuary(string.Format("select * from Prj_IncomeDevotionPlanChild where MainID={0}", MainID)).Rows)
            {
                collectin.Add(this.FormatToItemModel(row));
            }
            return(collectin);
        }