示例#1
0
    private DevelopmentInputCollectin GetPageData(DevelopmentInputCollectin objShouSchs)
    {
        DevelopmentInputCollectin developmentInputCollectin = new DevelopmentInputCollectin();

        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++)
            {
                developmentInputCollectin.Add(objShouSchs[i]);
            }
        }
        else
        {
            developmentInputCollectin = objShouSchs;
        }
        return(developmentInputCollectin);
    }
示例#2
0
        public DevelopmentInputCollectin GetMainInputInfos(string prjCode)
        {
            string sqlString = string.Format("select * from Prj_ScienceEmpolderDevotion where PrjCode='{0}'", prjCode);
            DevelopmentInputCollectin collectin = new DevelopmentInputCollectin();

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