protected void btnSave_Click(object sender, EventArgs e) { ProgressPlanInfo progressPlanInfo = new ProgressPlanInfo(); ProgressPlanAction progressPlanAction = new ProgressPlanAction(); progressPlanInfo.PlanCode = this.txtPlanCode.Text; progressPlanInfo.PlanId = this.planId; progressPlanInfo.ApplicationName = this.txtApplication.Text; if (this.txtCompletedDate.Text.Trim() != "") { progressPlanInfo.CompletedDate = DateTime.Parse(this.txtCompletedDate.Text); } progressPlanInfo.ResultsName = this.txtResultName.Text; progressPlanInfo.ResultsHolders = this.txtResultUint.Text; progressPlanInfo.PrjCode = this.prjCode; progressPlanInfo.PlanSort = ((EditDropDownList)this.lbPlanSort.FindControl("ddlPlanSort")).Text; progressPlanInfo.PlanSort = this.txtPlanSort.Text.Trim(); progressPlanInfo.Remark = this.txtNotes.Text.Trim().ToString(); progressPlanInfo.ProgressGuid = this.hdnProgressGuid.Value.Trim(); if (progressPlanAction.UpdatePlan(progressPlanInfo)) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_progressplanlist' });"); return; } this.js.Text = "alert(\"操作失败!\");"; }
private ProgressPlanInfo FormatToInfo(DataRow dr) { ProgressPlanInfo info = new ProgressPlanInfo { ApplicationName = dr["ApplicationName"].ToString(), AuditState = int.Parse(dr["AuditState"].ToString()), CompletedDate = DateTime.Parse(dr["CompletedDate"].ToString()), DeclareUnitView = dr["DeclareUnitView"].ToString(), PanelView = dr["PanelView"].ToString(), PermissionPeople = dr["PermissionPeople"].ToString(), PermissionView = dr["PermissionView"].ToString(), PlanId = dr["PlanId"].ToString(), PlanCode = dr["plancode"].ToString(), PlanSort = dr["PlanSort"].ToString(), PrjCode = dr["PrjCode"].ToString() }; string sqlString = string.Format("select PrjName from Prj_ProjectInfo where prjCode='{0}'", dr["PrjCode"].ToString()); info.PrjName = (publicDbOpClass.ExecuteScalar(sqlString) != null) ? publicDbOpClass.ExecuteScalar(sqlString).ToString() : ""; info.Remark = dr["Remark"].ToString(); info.ResultsHolders = dr["ResultsHolders"].ToString(); info.ResultsName = dr["ResultsName"].ToString(); info.VettingCommitteeView = dr["VettingCommitteeView"].ToString(); info.ProgressGuid = dr["ProgressGuid"].ToString(); return(info); }
public ProgressPlanInfo GetOnePlanInfo(string planId) { DataTable table = publicDbOpClass.DataTableQuary("select * from Prj_ProgressPlan where planid='" + planId + "'"); ProgressPlanInfo info = new ProgressPlanInfo(); if (table.Rows.Count != 0) { info = this.FormatToInfo(table.Rows[0]); } table.Dispose(); return(info); }
private void BindData() { ProgressPlanAction progressPlanAction = new ProgressPlanAction(); ProgressPlanInfo onePlanInfo = progressPlanAction.GetOnePlanInfo(this.planId); this.txtPermissionPeople.Text = onePlanInfo.PermissionPeople; this.txtPermissionView.Text = onePlanInfo.PermissionView; if (onePlanInfo.AuditState > 2) { this.ddlAuditState.SelectedValue = onePlanInfo.AuditState.ToString(); } }
private void BindData() { ProgressPlanAction progressPlanAction = new ProgressPlanAction(); ProgressPlanInfo onePlanInfo = progressPlanAction.GetOnePlanInfo(this.planId); this.txtResultUint.Text = onePlanInfo.ResultsHolders; this.txtCompletedDate.Text = onePlanInfo.CompletedDate.ToShortDateString(); this.txtApplication.Text = onePlanInfo.ApplicationName; this.txtPlanCode.Text = onePlanInfo.PlanCode; this.txtResultName.Text = onePlanInfo.ResultsName; this.txtNotes.Text = onePlanInfo.Remark; this.txtPlanSort.Text = ((onePlanInfo.PlanSort != null) ? onePlanInfo.PlanSort.Trim() : ""); this.hdnProgressGuid.Value = onePlanInfo.ProgressGuid; }
private void BindData() { ProgressPlanAction progressPlanAction = new ProgressPlanAction(); ProgressPlanInfo onePlanInfo = progressPlanAction.GetOnePlanInfo(this.planId); this.txtDeclareUnitView.Text = onePlanInfo.DeclareUnitView; this.txtPanelView.Text = onePlanInfo.PanelView; this.txtPlanCode.Text = onePlanInfo.PlanCode; this.txtRemark.Text = onePlanInfo.Remark; this.txtVettingCommitteeView.Text = onePlanInfo.VettingCommitteeView; if (onePlanInfo.AuditState < 3) { this.ddlAuditState.SelectedValue = onePlanInfo.AuditState.ToString(); } }
public bool PpmAuditPlan(ProgressPlanInfo objInfo) { string sqlString = ""; if (this.PlanIsAtDataBase(objInfo.PlanId)) { string str2 = "Update Prj_ProgressPlan set AuditState=" + objInfo.AuditState.ToString() + ",DeclareUnitView='" + objInfo.DeclareUnitView; string str3 = str2 + "',PanelView='" + objInfo.PanelView + "',VettingCommitteeView='" + objInfo.VettingCommitteeView; sqlString = str3 + "',Remark='" + objInfo.Remark + "' where planid='" + objInfo.PlanId + "'"; } else { sqlString = "insert into Prj_ProgressPlan(PlanId,AuditState,DeclareUnitView,PanelView,VettingCommitteeView,Remark)"; string str4 = sqlString; string str5 = str4 + " values('" + objInfo.PlanId + "'," + objInfo.AuditState.ToString() + ",'" + objInfo.DeclareUnitView + "','" + objInfo.PanelView; sqlString = str5 + "','" + objInfo.VettingCommitteeView + "','" + objInfo.Remark + "')"; } return(publicDbOpClass.NonQuerySqlString(sqlString)); }
public bool UpdatePlan(ProgressPlanInfo objInfo) { string sqlString = ""; if (this.PlanIsAtDataBase(objInfo.PlanId)) { string str2 = "Update Prj_ProgressPlan set PlanCode='" + objInfo.PlanCode + "',PrjCode='" + objInfo.PrjCode; string str3 = str2 + "',ResultsName='" + objInfo.ResultsName + "',ResultsHolders='" + objInfo.ResultsHolders; string str4 = str3 + "',ApplicationName='" + objInfo.ApplicationName + "',PlanSort='" + objInfo.PlanSort; sqlString = (str4 + "',CompletedDate = '" + objInfo.CompletedDate.ToShortDateString() + "' ,Remark='" + objInfo.Remark + "' where ") + " planid='" + objInfo.PlanId + "'"; } else { sqlString = "insert into Prj_ProgressPlan(PlanId,Remark,PlanCode,PrjCode,ResultsName,ResultsHolders,ApplicationName,PlanSort,CompletedDate,ProgressGuid)"; string str5 = sqlString; object obj2 = str5 + " values('" + objInfo.PlanId + "','" + objInfo.Remark + "','" + objInfo.PlanCode + "','" + objInfo.PrjCode + "','" + objInfo.ResultsName + "','" + objInfo.ResultsHolders; sqlString = string.Concat(new object[] { obj2, "','", objInfo.ApplicationName, "','", objInfo.PlanSort, "','", objInfo.CompletedDate, "','", objInfo.ProgressGuid, "')" }); } return(publicDbOpClass.NonQuerySqlString(sqlString)); }
public bool EntAuditPlan(ProgressPlanInfo objInfo) { string str2 = "Update Prj_ProgressPlan set AuditState=" + objInfo.AuditState.ToString() + ",PermissionView='" + objInfo.PermissionView; return(publicDbOpClass.NonQuerySqlString(str2 + "',PermissionPeople='" + objInfo.PermissionPeople + "' where planid='" + objInfo.PlanId + "'")); }