コード例 #1
0
    private ProgressProceedCollection GetPageData(ProgressProceedCollection objShouSchs)
    {
        ProgressProceedCollection progressProceedCollection = new ProgressProceedCollection();

        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++)
            {
                progressProceedCollection.Add(objShouSchs[i]);
            }
        }
        else
        {
            progressProceedCollection = objShouSchs;
        }
        return(progressProceedCollection);
    }
コード例 #2
0
        public ProgressProceedCollection GetProceInfos(string prjCode)
        {
            string sqlString = string.Format("select * from Prj_TechnologyAdvancementIncome where prjCode='{0}'", prjCode);
            ProgressProceedCollection proceeds = new ProgressProceedCollection();

            foreach (DataRow row in publicDbOpClass.DataTableQuary(sqlString).Rows)
            {
                proceeds.Add(this.FormatToModel(row));
            }
            return(proceeds);
        }