//关闭进度表 protected void ButtonPClose(object sender, EventArgs e) { Panel2.Visible = false; UpdatePanel2.Update(); Panel_Postpone.Visible = false; UpdatePanel_Postpone.Update(); Panel_Pschedule.Visible = false; UpdatePanel_Pschedule.Update(); Panel3.Visible = false; UpdatePanel3.Update(); Panel_WorkOrder.Visible = false; UpdatePanel_WorkOrder.Update(); Panel1.Visible = false; UpdatePanel1.Update(); }
//延期设置提交 protected void Button2_Sh(object sender, EventArgs e) { if (TextBox5.Text.ToString() == "") { ScriptManager.RegisterClientScriptBlock(UpdatePanel_Postpone, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true); return; } else { PRMProjectinfo.PRMPS_RelayDay = Convert.ToInt32(TextBox5.Text.ToString()); } if (TextBox6.Text.ToString() == "") { ScriptManager.RegisterClientScriptBlock(UpdatePanel_Postpone, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true); return; } else { PRMProjectinfo.PRMPS_RelayReason = TextBox6.Text.ToString(); } // this.label_projectstate.Text = "延期"; Guid gd = new Guid(label_projectid.Text.ToString()); PRMProjectinfo.PRMP_ID = gd; Guid prm = new Guid(Label_SchduleID.Text.ToString()); PRMProjectinfo.PRMPS_ID = prm; PRMProjectinfo.PRMPS_RelayMan = Session["UserName"].ToString().Trim(); ppm.InsertPRMProject_Postpone(PRMProjectinfo); //string hl=this.TextBox3.Text.ToString()+"延期"; string hl = "进度延期"; prp.UpdatePRMP_ProjectStates(gd, hl); Panel_Postpone.Visible = false; UpdatePanel_Postpone.Update(); TextBox5.Text = ""; TextBox6.Text = ""; UpdatePanel_ProjectInfo.Update(); PRMProjectinfo.PRMP_ID = new Guid(label_projectid.Text); BindGridview2(PRMProjectinfo); UpdatePanel2.Update(); string condition = " and PRMP_ProjectStates='" + "进度设置完成" + "'" + " or PRMP_ProjectStates='" + "进行中" + "'" + " or PRMP_ProjectStates='" + "进度延期" + "'" + " or PRMP_ProjectStates='" + "已完成" + "'"; BindGridView_Projectinfo(condition); UpdatePanel_ProjectInfo.Update(); }
//检索项目 protected void Button1_Sh(object sender, EventArgs e) { string Condition = GetCondition(); BindGridView_Projectinfo(Condition); Panel_ProjectInfo.Visible = true; UpdatePanel_ProjectInfo.Update(); Panel2.Visible = false; UpdatePanel2.Update(); Panel_Postpone.Visible = false; UpdatePanel_Postpone.Update(); Panel_Pschedule.Visible = false; UpdatePanel_Pschedule.Update(); Panel3.Visible = false; UpdatePanel3.Update(); Panel_WorkOrder.Visible = false; UpdatePanel_WorkOrder.Update(); Panel1.Visible = false; UpdatePanel1.Update(); }
//项目进度表 protected void Gridview2_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Lay")//延期 { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Gridview2.SelectedIndex = row.RowIndex; Label_SchduleID.Text = e.CommandArgument.ToString(); Guid gd = new Guid(Label_SchduleID.Text.ToString()); DataSet ds = pl.SelectPRMProjectSchedule_One(gd); DataTable dt = ds.Tables[0]; if (dt.Rows.Count > 0) { TextBox6.Text = dt.Rows[0][5].ToString(); } TextBox4.Text = Gridview2.Rows[row.RowIndex].Cells[2].Text.ToString().Trim().Replace(" ", ""); //this.TextBox2.Text = this.Gridview_ProjectInfo.Rows[row.RowIndex].Cells[1].Text.ToString().Trim().Replace(" ", ""); TextBox3.Text = Gridview2.Rows[row.RowIndex].Cells[1].Text.ToString().Trim().Replace(" ", ""); TextBox5.Text = Gridview2.Rows[row.RowIndex].Cells[10].Text.ToString().Trim().Replace(" ", ""); //this.TextBox6.Text = this.Gridview2.Rows[row.RowIndex].Cells[10].Text.ToString().Trim().Replace(" ", ""); Panel_Postpone.Visible = true; UpdatePanel_Postpone.Update(); Panel_Pschedule.Visible = false; UpdatePanel_Pschedule.Update(); Panel1.Visible = false; UpdatePanel1.Update(); Panel3.Visible = false; UpdatePanel3.Update(); Panel_WorkOrder.Visible = false; UpdatePanel_WorkOrder.Update(); } if (e.CommandName == "Protect")//维护 { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Gridview2.SelectedIndex = row.RowIndex; Label_SchduleID.Text = e.CommandArgument.ToString(); Guid gd = new Guid(Label_SchduleID.Text.ToString()); DataSet ds = pl.SelectPRMProjectSchedule_One(gd); DataTable dt = ds.Tables[0]; Panel_Pschedule.Visible = true; if (dt.Rows.Count > 0) { TextBox10.Text = dt.Rows[0][4].ToString(); TextBox11.Text = dt.Rows[0][6].ToString(); label_AccNum.Text = dt.Rows[0][7].ToString(); label_AccName.Text = dt.Rows[0][8].ToString(); Label_FilePath.Text = dt.Rows[0][9].ToString(); if (Label_FilePath.Text.ToString() != "") { LabelQ_SaveDirectory.Text = "上传"; } } TextBox7.Text = Gridview2.Rows[row.RowIndex].Cells[2].Text.ToString().Replace(" ", ""); TextBox8.Text = Gridview_ProjectInfo.Rows[Gridview_ProjectInfo.SelectedIndex].Cells[1].Text.ToString().Replace(" ", ""); TextBox9.Text = Gridview2.Rows[row.RowIndex].Cells[1].Text.ToString().Replace(" ", ""); DropDownList3.SelectedValue = Gridview2.Rows[row.RowIndex].Cells[5].Text.ToString().Replace(" ", ""); //this.TextBox14.Text = this.Gridview2.Rows[row.RowIndex].Cells[11].Text.ToString().Replace(" ", ""); //this.TextBox15.Text = this.Gridview2.Rows[row.RowIndex].Cells[12].Text.ToString().Replace(" ", ""); //this.TextBox10.Text = this.Gridview2.Rows[row.RowIndex].Cells[6].Text.ToString().Replace(" ", ""); //this.TextBox11.Text = this.Gridview2.Rows[row.RowIndex].Cells[5].Text.ToString().Replace(" ", ""); //ShowPanel(); UpdatePanel_Pschedule.Update(); Panel_Postpone.Visible = false; UpdatePanel_Postpone.Update(); Panel1.Visible = false; UpdatePanel1.Update(); } if (e.CommandName == "Look")//附件证明查看 { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Gridview2.SelectedIndex = row.RowIndex; Label_SchduleID.Text = e.CommandArgument.ToString(); } if (e.CommandName == "Follow")//随工单跟踪 { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Gridview2.SelectedIndex = row.RowIndex; Label_SchduleID.Text = e.CommandArgument.ToString(); string item = ""; Guid gd = new Guid(Label_SchduleID.Text.ToString()); DataSet ds = pl.SelectPRMProjectSchedule_One(gd); DataTable dt = ds.Tables[0]; string str = ""; if (dt.Rows.Count > 0) { str = dt.Rows[0][4].ToString(); } string[] sArray = Regex.Split(str, ";", RegexOptions.IgnoreCase); for (int i = 0; i < sArray.Length; i++) { if (i == 0) { item = "and WO_Num='" + sArray[0] + "'"; } else { item += " or WO_Num='" + sArray[i] + "'"; } } labelcondition.Text = item; BindGridview1(labelcondition.Text); Panel1.Visible = true; UpdatePanel1.Update(); Panel_Postpone.Visible = false; UpdatePanel_Postpone.Update(); Panel_Pschedule.Visible = false; UpdatePanel_Pschedule.Update(); Panel3.Visible = false; UpdatePanel3.Update(); Panel_WorkOrder.Visible = false; UpdatePanel_WorkOrder.Update(); } }
protected void Button2_Cancel(object sender, EventArgs e) { Panel_Postpone.Visible = false; UpdatePanel_Postpone.Update(); }