public ProgressPlanCollection GetEntProgressPlanInfos(string prjCode, string State) { string sqlString = "Select * from Prj_ProgressPlan where "; if (State == "Auditing") { sqlString = sqlString + " AuditState =2 "; } else if (State == "View") { sqlString = sqlString + " AuditState=4 "; } else if (State == "List") { sqlString = sqlString + " AuditState in(-1,1,3) "; } sqlString = sqlString + " and prjCode='" + prjCode + "'"; ProgressPlanCollection plans = new ProgressPlanCollection(); foreach (DataRow row in publicDbOpClass.DataTableQuary(sqlString).Rows) { plans.Add(this.FormatToInfo(row)); } return(plans); }
private void BindData() { ProgressPlanAction progressPlanAction = new ProgressPlanAction(); ProgressPlanCollection auditedProgressPlanInfos = progressPlanAction.GetAuditedProgressPlanInfos(this.prjCode); this.dgMain.DataSource = auditedProgressPlanInfos; this.dgMain.DataBind(); }
public ProgressPlanCollection GetEntProgressPlanInfos() { string sqlString = "Select * from Prj_ProgressPlan where AuditState>1"; ProgressPlanCollection plans = new ProgressPlanCollection(); foreach (DataRow row in publicDbOpClass.DataTableQuary(sqlString).Rows) { plans.Add(this.FormatToInfo(row)); } return(plans); }
public ProgressPlanCollection GetPpmProgressPlanInfos(string prjCode) { string sqlString = string.Format("select * from Prj_ProgressPlan where prjCode='{0}' order by CompletedDate desc", prjCode); ProgressPlanCollection plans = new ProgressPlanCollection(); foreach (DataRow row in publicDbOpClass.DataTableQuary(sqlString).Rows) { plans.Add(this.FormatToInfo(row)); } return(plans); }
public ProgressPlanCollection GetAuditedProgressPlanInfos(string prjCode) { string sqlString = "Select * from Prj_ProgressPlan where AuditState = 4"; ProgressPlanCollection plans = new ProgressPlanCollection(); if (prjCode != "") { sqlString = sqlString + " and prjCode='" + prjCode + "'"; } foreach (DataRow row in publicDbOpClass.DataTableQuary(sqlString).Rows) { plans.Add(this.FormatToInfo(row)); } return(plans); }
private void BindData() { this.setControl(); ProgressPlanCollection dataSource = new ProgressPlanCollection(); ProgressPlanAction progressPlanAction = new ProgressPlanAction(); if (this.Type == "Edit") { dataSource = progressPlanAction.GetPpmProgressPlanInfos(this.prjCode); this.dgList.Columns[1].Visible = false; } else { dataSource = progressPlanAction.GetEntProgressPlanInfos(this.prjCode, this.Type); } this.dgList.DataSource = dataSource; this.dgList.DataBind(); }