private ProgressEvaluateCollection GetPageData(ProgressEvaluateCollection objShouSchs) { ProgressEvaluateCollection progressEvaluateCollection = new ProgressEvaluateCollection(); if (objShouSchs.Count > this.pageSize * (progressEvaluateCollection.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++) { progressEvaluateCollection.Add(objShouSchs[i]); } } else { progressEvaluateCollection = objShouSchs; } return(progressEvaluateCollection); }
public ProgressEvaluateCollection GetEvaluateInfos(string MainId) { string sqlString = string.Format("select * from Prj_ProgressPlan_Appraise where ParentMainID='{0}'", MainId); ProgressEvaluateCollection evaluates = new ProgressEvaluateCollection(); foreach (DataRow row in publicDbOpClass.DataTableQuary(sqlString).Rows) { evaluates.Add(this.FormatToEvaModel(row)); } return(evaluates); }