ProjectImplement.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:171k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using com.etong.DBUtility;
- using com.etong.Inform;
- using com.etong.BusinessRule.Zwf;
- using com.etong.DAL;
- using com.etong.Model;
- using com.etong.Utility;
- using DocMergerComponent;
- using com.etong.Excel;
- public partial class Workflow_ProjectImplement : System.Web.UI.Page
- {
- protected int userid = -1;
- protected int wfid = -1;//当前工作流ID
- protected int MustChooseItem = -1;//必选项
- protected int ActivityID = -1;//活动ID
- protected int WFInstanceID = -1;//工作流实例ID
- protected int actinstanceid = -1;//活动实例ID
- protected int ActID = -1;//活动实例ID
- protected bool IsUntread = true;//是否回退
- protected int shuntFlag = 0;//分流标志(0、不分流;1、审核通过;2、审核不通过;3、全委托;4、外委;5、更改材料;6、不更改材料)
- protected int ConID = -1;
- protected string rolestr()
- {
- string rolestr = "";
- if (userid != -1)
- {
- EtongZwf etongzwf = new EtongZwf();
- DataView dvrole = etongzwf.RoleGetByID(userid);
- for (int i = 0; i < dvrole.Count; i++)
- {
- rolestr = rolestr + dvrole[i][0].ToString().Trim() + ",";
- }
- }
- return rolestr;
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- //------------------------------------------变量定义-----------------------------------------------
- DataView dv = null;
- CheckUserInfo cui=null;
- string MustChooseItemtxt = "";
- if (Request.QueryString["MustChooseItem"] != null)
- {
- MustChooseItemtxt = Request.QueryString["MustChooseItem"].ToString().Trim();
- MustChooseItem = Convert.ToInt16(MustChooseItemtxt);
- }
- string ActivityIDtxt="";
- if (Request.QueryString["ActivityID"] != null)
- {
- ActivityIDtxt = Request.QueryString["ActivityID"].ToString().Trim();
- ActivityID = Convert.ToInt32(ActivityIDtxt);
- }
- string WFInstanceIDtxt = "";
- if (Request.QueryString["WFInstanceID"] != null)
- WFInstanceIDtxt = Request.QueryString["WFInstanceID"].ToString().Trim();
- string WFIDtxt = "";
- if (Request.QueryString["WFID"] != null)
- {
- WFIDtxt = Request.QueryString["WFID"].ToString().Trim();
- wfid = Convert.ToInt16(WFIDtxt);
- }
- if (Request.QueryString["ActID"] != null)
- {
- actinstanceid = Convert.ToInt32(Request.QueryString["ActID"].ToString());
- }
-
- //----------------------------------------对象定义--------------------------------------------------
- if (Session["checkuserinfo"] != null)
- {
- cui = (CheckUserInfo)Session["checkuserinfo"];
- userid = cui.UserID;
- }
- if (ActivityIDtxt != "" && WFInstanceIDtxt != "")
- {
- if (Convert.ToInt32(ActivityIDtxt) != -1 && Convert.ToInt32(WFInstanceIDtxt) != -1)
- {
- WFInstanceID = Convert.ToInt32(WFInstanceIDtxt);
- string sql = "select * from [tb_WF_Instance] where [WFInstanceID]=" + WFInstanceID;
- dv = SqlServer.GetDataView(sql);
- if (dv.Count > 0)
- {
- wfid = Convert.ToInt32(dv[0][8].ToString().Trim());
- this.ConID = Convert.ToInt32(dv[0][9].ToString().Trim());
- }
- }
- }
- string path = Server.MapPath("doc").Replace("\", "\\"); //获取项目所在路径
- int tempStatus = WorkFolw.GetCurrentActivityInstanceStatus(this.actinstanceid);//当前活动实例状态
- if (!this.Page.IsPostBack)
- {
- if (Request.QueryString["ConID"] != null)
- {
- this.Panel_Back.Visible = true;
- int conid = Convert.ToInt32(Request.QueryString["ConID"]);
- dv = GetConstructInfo(conid);
- //SetAllPanelsVisibility(true, true, true, true, true, true, true, true, true, true, false);
- if (dv.Count > 0)
- {
- this.Panel_ReportMaterialPlan.Visible = (dv[0]["JcWZTransactor"].ToString() != "" ? true : false);
- this.Panel_MaterialStock.Visible = (dv[0]["WZTransactor"].ToString() != "" ? true : false);
- this.Panel_SetupExecution.Visible = (dv[0]["JcZTransactor"].ToString() != "" ? true : false);
- this.Panel_MonitorExecution.Visible = (dv[0]["ZgJdTransactor"].ToString() != "" ? true : false);
- this.Panel_ProjectPlan.Visible = false;
- this.Panel_MakeMonitorIdea.Visible = (dv[0]["ZgXdTransactor"].ToString() != "" ? true : false);
- this.Panel_ReportProjectSchedule.Visible = (dv[0]["JcSBTransactor"].ToString() != "" ? true : false);
- this.Panel_GatherProjectSchedule.Visible = (dv[0]["ZgHzTransactor"].ToString() != "" ? true : false);
- this.Panel_ProjectAnalysis.Visible = (dv[0]["GcglTransactor"].ToString() != "" ? true : false);
- this.Panel_TurnInOldMaterial.Visible = (dv[0]["JcSJTransactor"].ToString() != "" ? true : false);
- this.Panel_OldMaterialManagement.Visible = (dv[0]["WZFjTransactor"].ToString() != "" ? true : false);
- this.Panel_Button.Visible = false;
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ProjectAnalysis.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["GcglTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_TurnInOldMaterial.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcSJTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_OldMaterialManagement.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZFjTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
- this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
- this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
- this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
- this.TurnInOldMaterial.Value = dv[0]["JcSJFName"].ToString();
- this.TB_OldMaterialManagement.Text = dv[0]["WZFjFName"].ToString();
- this.TB_OldMaterialManagement.Enabled = false;
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'"+cui.EmpName+"');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
- this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value),'" + cui.EmpName + "';");
- this.BT_OpenDocument_ProjectAnalysis.Text = "浏览电子文档";
- this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_TurnInOldMaterial.Text = "浏览电子文档";
- this.BT_OpenDocument_TurnInOldMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('TurnInOldMaterial').value,'" + cui.EmpName + "');");
- }
- }
- if (tempStatus == 2)
- {
- string script = "<script language='javascript'>var MSG = new CLASS_MSN_MESSAGE('aa',200,120,'系统提示:','您有1条信息','当前活动为回退活动,请您重新审核资料再提交给上级部门!');MSG.speed = 3; MSG.step = 2; MSG.show();</script>";
- Common.RunScriptString(this.Page, script);
- }
- }
- switch (MustChooseItem)
- {
- /*==============================================================================================
- *
- * 工程项目实施开始
- *
- *=============================================================================================*/
- case 19:
- IsUntread = false;//不可回退
- SetAllPanelsVisibility(true, false, false, false, false, false, false, false, false, false, false, true);
- break;
- /*==============================================================================================
- *
- * 工程项目实施流程上报物资计划
- *
- *=============================================================================================*/
- case 20:
- // string path = System.IO.Directory.GetCurrentDirectory().ToString();
- //this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + path + "');</script>");
- IsUntread = false;//不可回退
- SetAllPanelsVisibility(true,true, false, false, false, false, false, false, false, false, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- }
- if (tempStatus == 2)
- {
- dv = GetConstructInfo(this.ConID);
- if (dv.Count > 0)
- {
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- }
- }
- else
- {
- if (!this.Page.IsPostBack)
- {
- string FileName_ReportMaterialPlan = GetDocumentFileName(this.ActivityID,1);
- string FileName_StartWorkReport = GetDocumentFileName(this.ActivityID,0);
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute + "</font></div>";
- //this.ReportMaterialPlan.Value = "物资计划表" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- this.ReportMaterialPlan.Value = MakeNewFileNameWithDate(FileName_ReportMaterialPlan);
- this.StartWorkReport.Value = MakeNewFileNameWithDate(FileName_StartWorkReport);
- if (!(Util.Copyfile(path + "\" + FileName_ReportMaterialPlan, path + "\DocTemplateCon\" + this.ReportMaterialPlan.Value) && Util.Copyfile(path + "\" + FileName_StartWorkReport, path + "\DocTemplateCon\" + this.StartWorkReport.Value)))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }
- }
- }
- break;
- /*==============================================================================================
- *
- * 物资采购
- *
- *=============================================================================================*/
- case 21:
- SetAllPanelsVisibility(true,false, true, false, false, false, false, false, false, false, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript: SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- if (tempStatus == 2)//回退活动
- {
- this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- }
- }
- if (!(tempStatus == 2))
- {
- if (!this.Page.IsPostBack)
- {
- this.IB_Collect.Visible = true;
- this.BT_OpenDocument_MaterialStock.Enabled = false;
- this.BT_OpenDocument_ProjectPlan.Enabled = false;
- //string FileName_MaterialStock = GetDocumentFileName(this.ActivityID);
- //this.MaterialStock.Value = "物资采购" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- /*this.MaterialStock.Value = MakeNewFileNameWithDate(FileName_MaterialStock);
- if (!Util.Copyfile(path + "\" + FileName_MaterialStock, path + "\DocTemplateCon\" + this.MaterialStock.Value))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }*/
- }
- }
- break;
- /*==============================================================================================
- *
- * 组织实施
- *
- *=============================================================================================*/
- case 22:
- SetAllPanelsVisibility(true, false, true, true, false, false, false, false, false, false, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
- //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- //this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
- if (tempStatus == 2)//回退活动
- {
- this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- }
- }
- if (!(tempStatus == 2))
- {
- if (!this.Page.IsPostBack)
- {
- this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
- string FileName_SetupExecution = GetDocumentFileName(this.ActivityID);
- //this.SetupExecution.Value = "开工报告" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- this.SetupExecution.Value = MakeNewFileNameWithDate(FileName_SetupExecution);
- if (!Util.Copyfile(path + "\" + FileName_SetupExecution, path + "\DocTemplateCon\" + this.SetupExecution.Value))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }
- }
- }
- break;
- /*==============================================================================================
- *
- * 监督实施
- *
- *=============================================================================================*/
- case 23:
- SetAllPanelsVisibility(true, false, true, false, true, false, false, false, false, false, false, true);
- this.BT_NotPass.Visible = true;
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- //this.MaterialStock.Value = dv[0]["WZFName"].ToString();//
- this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
- //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
- if (tempStatus == 2)//回退活动
- {
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- }
- }
- if (!this.Page.IsPostBack)
- {
- this.IB_Collect.Visible = true;
- this.TB_ZgJdIdea.Text = "同意";
- this.BT_OpenDocument_CollectSetupExecution.Enabled = false;
- }
- break;
- /*==============================================================================================
- *
- * 工程计划流程
- *
- *=============================================================================================*/
- case 30:
- SetAllPanelsVisibility(true, true, true, true, true, false, false, false, false, false, false, true);
- //this.BT_NotPass.Visible = true;
- this.Panel_ProjectPlan.Visible = true;
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- }
- break;
- /*==============================================================================================
- *
- * 下达监督意见
- *
- *=============================================================================================*/
- case 24:
- SetAllPanelsVisibility(true, false, true, false, true, true, false, false, false, false, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MonitorExecution.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'> " + dv[0]["ZgJdTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
- this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
- this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
- //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- if (tempStatus == 2)//回退活动
- {
- this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
- }
- }
- if (!(tempStatus == 2))
- {
- if (!this.Page.IsPostBack)
- {
- string FileName_MakeMonitorIdea = GetDocumentFileName(this.ActivityID);
- //this.MakeMonitorIdea.Value = "监督意见" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- this.MakeMonitorIdea.Value = MakeNewFileNameWithDate(FileName_MakeMonitorIdea);
- if (!Util.Copyfile(path + "\" + FileName_MakeMonitorIdea, path + "\DocTemplateCon\" + this.MakeMonitorIdea.Value))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }
- }
- }
- break;
- /*==============================================================================================
- *
- * 基层单位上报本单位工程进度
- *
- *=============================================================================================*/
- case 25:
- SetAllPanelsVisibility(true, false, true, false, true, true, true, false, false, false, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
- this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_CollectSetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_CollectSetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('CollectSetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
- this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
- this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
- this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
- this.BT_OpenDocument_CollectSetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_CollectSetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('CollectSetupExecution').value,'" + cui.EmpName + "');");
- if (tempStatus == 2)
- {
- this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
- }
- }
- if (!(tempStatus == 2))
- {
- if (!this.Page.IsPostBack)
- {
- string FileName_ReportProjectSchedule = GetDocumentFileName(this.ActivityID);
- //this.ReportProjectSchedule.Value = "工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- this.ReportProjectSchedule.Value = MakeNewFileNameWithDate(FileName_ReportProjectSchedule);
- if (!Util.Copyfile(path + "\" + FileName_ReportProjectSchedule, path + "\DocTemplateCon\" + this.ReportProjectSchedule.Value))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }
- }
- }
- break;
- /*==============================================================================================
- *
- * 汇总工程进度
- *
- *=============================================================================================*/
- case 26:
- SetAllPanelsVisibility(true, false, true, false, true, true, false, true, false, false, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
- this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('GatherProjectSchedule').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ShowOperatorAndTime_MonitorExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgJdTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
- //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
- this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
- this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
- this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
- if (tempStatus == 2)
- {
- this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
- }
- }
- if (!(tempStatus == 2))
- {
- if (!this.Page.IsPostBack)
- {
- /*string FileName_GatherProjectSchedule = GetDocumentFileName(this.ActivityID);
- //this.GatherProjectSchedule.Value = "汇总工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- this.GatherProjectSchedule.Value = MakeNewFileNameWithDate(FileName_GatherProjectSchedule);
- if (!Util.Copyfile(path + "\" + FileName_GatherProjectSchedule, path + "\DocTemplateCon\" + this.GatherProjectSchedule.Value))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }*/
- this.BT_OpenDocument_GatherProjectSchedule.Enabled = false;
- this.IB_Collect.Visible = true;
- }
- }
- break;
- /*==============================================================================================
- *
- * 项目实施情况分析、上报
- *
- *=============================================================================================*/
- case 27:
- SetAllPanelsVisibility(true, false, true, false, true, true, false, true, true, false, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_CollectSetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_CollectSetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('CollectSetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
- this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MonitorExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgJdTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
- //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
- this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
- this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
- this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
- //this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
- this.GatherProjectSchedule.Value = GetEmpTypeDocument_ProjectPlan();
- this.ProjectMaterial.Value = GetEmpTypeDocument_MaterialPlan();
- this.BT_OpenDocument_ProjectMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectMaterial').value,'" + cui.EmpName + "');");
- this.ProjectAnalysis.Value = GetEmpTypeDocument_ProjectPlan();
- this.BT_OpenDocument_ProjectAnalysis.Attributes.Add ("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
- if (tempStatus == 2)
- {
- this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
- }
- }
- if (!(tempStatus == 2))
- {
- if (!this.Page.IsPostBack)
- {
- this.BT_OpenDocument_ProjectAnalysis.Enabled = false;
- this.IB_Collect.Visible = true;
- /*string FileName_ProjectAnalysis = GetDocumentFileName(this.ActivityID);
- //this.ProjectAnalysis.Value = "工程进度调整计划、问题和解决方案" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- this.ProjectAnalysis.Value = MakeNewFileNameWithDate(FileName_ProjectAnalysis);
- if (!Util.Copyfile(path + "\" + FileName_ProjectAnalysis, path + "\DocTemplateCon\" + this.ProjectAnalysis.Value))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }*/
- }
- }
- break;
- /*==============================================================================================
- *
- * 上缴废旧物资
- *
- *=============================================================================================*/
- /* case 28:
- SetAllPanelsVisibility(true, true, true, true, true, true, true, true, true, true, false, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
- this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_ProjectAnalysis.Text = "浏览电子文档";
- this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
- this.BT_OpenDocument_TurnInOldMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('TurnInOldMaterial').value,'" + cui.EmpName + "');");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ProjectAnalysis.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["GcglTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
- this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
- this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
- this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
- if (tempStatus == 2)
- {
- this.TurnInOldMaterial.Value = dv[0]["JcSJFName"].ToString();
- }
- }
- if (!(tempStatus == 2))
- {
- if (!this.Page.IsPostBack)
- {
- string FileName_TrunInOldMaterial = GetDocumentFileName(this.ActivityID);
- //this.TurnInOldMaterial.Value = "废旧物资" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- this.TurnInOldMaterial.Value = MakeNewFileNameWithDate(FileName_TrunInOldMaterial);
- if (!Util.Copyfile(path + "\" + FileName_TrunInOldMaterial, path + "\DocTemplateCon\" + this.TurnInOldMaterial.Value))
- {
- Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- return;
- }
- }
- }
- break;*/
- /*==============================================================================================
- *
- * 废旧物资管理流程
- *
- *=============================================================================================*/
- /*case 29:
- SetAllPanelsVisibility(true, true, true, true, true, true, true, true, true, true, true);
- this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value);");
- this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
- this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value);");
- this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
- this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value);");
- this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
- this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value);");
- this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
- this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value);");
- this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value);");
- this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
- this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value);");
- this.BT_OpenDocument_ProjectAnalysis.Text = "浏览电子文档";
- this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value);");
- this.BT_OpenDocument_TurnInOldMaterial.Text = "浏览电子文档";
- this.BT_OpenDocument_TurnInOldMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('TurnInOldMaterial').value);");
- //this.BT_OpenDocument_OldMaterialManagement.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('OldMaterialManagement').value);");
- dv = GetConstructInfo(this.ConID);
- if (dv != null && dv.Count > 0)
- {
- this.TB_ConName.Text = dv[0]["ConName"].ToString();
- this.TB_ConName.Enabled = false;
- this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["WZTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcZTransactor"].ToString() + "</font></div>";
- this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
- this.TB_ZgJdIdea.Enabled = false;
- this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_ProjectAnalysis.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["GcglTransactor"].ToString() + "</font></div>";
- this.ShowOperatorAndTime_TurnInOldMaterial.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'> " + dv[0]["JcSJTransactor"].ToString() + "</font></div>";
- this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
- this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
- this.MaterialStock.Value = dv[0]["WZFName"].ToString();
- this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
- this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
- this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
- this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
- this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
- this.TurnInOldMaterial.Value = dv[0]["JcSJFName"].ToString();
- }
- if (!this.Page.IsPostBack)
- {
- //string FileName_OldMaterialManagement = GetDocumentFileName(this.ActivityID);
- ////this.OldMaterialManagement.Value = "剩余材料统计" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
- //this.OldMaterialManagement.Value = MakeNewFileNameWithDate(FileName_OldMaterialManagement);
- //if (!Util.Copyfile(path + "\" + FileName_OldMaterialManagement, path + "\DocTemplateCon\" + this.OldMaterialManagement.Value))
- //{
- // Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
- // return;
- //}
- this.TB_OldMaterialManagement.Text = "同意";
- }
- break;*/
- }
- }
- protected DataView GetConstructInfo(int conid)
- {
- string sql = "select * from [Tb_Construct] where [ConID]=" + conid;
- DataView dv = SqlServer.GetDataView(sql);
- return dv;
- }
- /// <summary>
- /// 显示/隐藏各组面板
- /// </summary>
- /// <param name="flag_ReportMaterialPlan">上报物资计划面板标志</param>
- /// <param name="flag_MaterialStock">物资采购面板标志</param>
- /// <param name="flag_SetupExecution">组织实施面板标志</param>
- /// <param name="flag_MonitorExecution">监督实施面板标志</param>
- /// <param name="flag_MakeMonitorIdea">下达监督意见面板标志</param>
- /// <param name="flag_ReportProjectSchedule">上报本单位工程进度面板标志</param>
- /// <param name="flag_GatherProjectSchedule">汇总工程进度面板标志</param>
- /// <param name="flag_ProjectAnalysis">项目实施情况分析、上报面板标志</param>
- /// <param name="flag_TurnInOldMaterial">上缴废旧物资面板标志</param>
- /// <param name="flag_OldMaterialManagement">废旧物资管理流程面板标志</param>
- /// <param name="flag_Button">操作面板面板标志</param>
- private void SetAllPanelsVisibility(bool flag_StartConstruct,bool flag_ReportMaterialPlan,
- bool flag_MaterialStock, bool flag_SetupExecution, bool flag_MonitorExecution,
- bool flag_MakeMonitorIdea, bool flag_ReportProjectSchedule, bool flag_GatherProjectSchedule,
- bool flag_ProjectAnalysis, bool flag_TurnInOldMaterial, bool flag_OldMaterialManagement,
- bool flag_Button)
- {
- this.Panel_StartConstruct.Visible = flag_StartConstruct;
- this.Panel_ReportMaterialPlan.Visible = flag_ReportMaterialPlan;
- this.Panel_MaterialStock.Visible = flag_MaterialStock;
- this.Panel_SetupExecution.Visible = flag_SetupExecution;
- this.Panel_MonitorExecution.Visible = flag_MonitorExecution;
- this.Panel_MakeMonitorIdea.Visible = flag_MakeMonitorIdea;
- this.Panel_ReportProjectSchedule.Visible = flag_ReportProjectSchedule;
- this.Panel_GatherProjectSchedule.Visible = flag_GatherProjectSchedule;
- this.Panel_ProjectAnalysis.Visible = flag_ProjectAnalysis;
- this.Panel_TurnInOldMaterial.Visible = flag_TurnInOldMaterial;
- this.Panel_OldMaterialManagement.Visible = flag_OldMaterialManagement;
- this.Panel_Button.Visible = flag_Button;
- }
- protected void BT_Untread_Click(object sender, ImageClickEventArgs e)
- {
- if (IsUntread == false)
- {
- Common.RunScript(this.Page, "起始活动不可回退!");
- return;
- }
- else
- {
- EtongZwf etongzwf = new EtongZwf();
- bool ReActInsValue = false;
- string ActIDtxt = Request.QueryString["ActID"].ToString().Trim();
- ActID = Convert.ToInt32(ActIDtxt);
- //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + ActID.ToString() + "');</script>");
- //return;
- ReActInsValue = etongzwf.WFActInsUpdata(ActID, userid, 3);
- if (ReActInsValue == true)
- {
- //产生回退活动事例
- // 注:Status状态(0、正常;1、完成;2、回退;3、回退并完成;4、作废)
- int ReActInsValue2 = 0;
- DataView dvAct = etongzwf.ActivityGetByActInsId(ActID);
- // DataView dvAct = etongzwf.ColonyUserGetByAct(ActivityID);
- int PreviousActID = -1;
- int PreviousUserID = -1;
- int PreviousRoleID = -1;
- if (dvAct != null)
- {
- PreviousActID = Convert.ToInt16(dvAct[0]["PreviousActID"].ToString().Trim());
- PreviousUserID = Convert.ToInt16(dvAct[0]["PreviousUserID"].ToString().Trim());
- PreviousRoleID = Convert.ToInt16(dvAct[0]["PreviousRoleID"].ToString().Trim());
- }
- WFActInsInfo wfactinsinfo2 = new WFActInsInfo(-1, PreviousActID, Convert.ToDateTime(DateTime.Now.ToShortDateString()), Convert.ToDateTime(DateTime.Now.ToShortDateString()),
- 2, Convert.ToDateTime(DateTime.Now.ToShortDateString()), WFInstanceID, "", PreviousUserID, PreviousRoleID);
- ReActInsValue2 = etongzwf.WFActInsADD(wfactinsinfo2);
- if (ReActInsValue2 != 0)
- ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:回退成功!');top.location.href='../Main.aspx';</script>");
- else
- ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:回退失败!');top.location.href='../Main.aspx';</script>");
- }
- }
- }
- protected void BT_Pass_Click(object sender, ImageClickEventArgs e)
- {
- ProjectImplment projectImplment = new ProjectImplment();
- //int startEnd = 1;//一般任务
- string path = Server.MapPath("doc").Replace("\", "\\"); //获取项目所在路径
- //int tempStatus = WorkFolw.GetCurrentActivityInstanceStatus(this.actinstanceid);//当前活动实例状态
-
- CheckUserInfo cui = (CheckUserInfo)Session["checkuserinfo"];
- string consort = ProjectImplment.GetEmpType(cui.EmpID);
- //******************************************************施工开始*************************************************************
- if (MustChooseItem == 19)
- {
- EtongZwf etongzwf = new EtongZwf();
- if (etongzwf.CheckUpActCompleteActIns(ActivityID, WFInstanceID, false, "") == false)//当前不存在代办任务;
- {
- string conname = this.TB_ConName.Text.Trim();
- int tempStatus = WorkFolw.GetCurrentActivityInstanceStatus(this.actinstanceid);//当前活动实例状态
- if (tempStatus == 0 || tempStatus == 1)//当状态为0、正常;1、完成(审核通过)时检查项目名称
- {
- string sql = "select * from [tb_construct] where [ConName]='" + conname + "'";
- DataView dv = SqlServer.GetDataView(sql);
- if (dv.Count > 0)
- {
- Common.RunScript(this.Page, "工程项目施工名称不能重复!");
- return;
- }
- }
- if (tempStatus == 2)
- {
- WFInstADD("您已审核通过!", false);
- }
- else
- {
- string materialxml = "MaterialDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- string startworkxml = "StartWorkDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- ConstructInfo constructinfo = new ConstructInfo(conname, "-1", startworkxml, "", materialxml, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 1, "");
- int ConID = projectImplment.AddConstruct(constructinfo);
- if (ConID > 0)
- {
- XML xml = new XML();
- if (xml.CreateXMLDocument(path + "\DocTemplateCon\" + materialxml) && xml.CreateXMLDocument(path + "\DocTemplateCon\" + startworkxml))
- WorkFlowOperation(ConID, false);
- else
- Common.RunScript(this.Page, "XML文档创建失败,请检查相关设置");
- }
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }
- }
- }
- else//存在代办任务
- {
- consort = GetConstructInfo(this.ConID)[0]["Consort"].ToString();
- if (consort != "")
- {
- string sql = "select [ActivityID],[RoleID] from [tb_Colony_User] where [ParentActID]=" + this.ActivityID + " and [RoleID] in (select [OpID] from [Tb_Sys_OpRole] where [OrgDesc]='" + consort + "')";
- DataView dv = SqlServer.GetDataView(sql);
- WorkFolw workflow = new WorkFolw();
- string nextCheckDepartment = "";
- if (workflow.WFActInsUpdata(this.actinstanceid, 1, this.userid))
- {
- if (dv.Count > 0)
- {
- for (int i = 0; i < dv.Count; i++)//找到所有部门
- {
- int ParentRoleID = Convert.ToInt32(dv[i]["RoleID"].ToString().Trim());
- ProjectImplment pi = new ProjectImplment();
- //DataTable dt = pi.GetDepartmentByID(ParentRoleID);
- DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
- nextCheckDepartment += dt.Rows[0]["OpName"].ToString() + "、";
- }
- for (int i = 0; i < dv.Count; i++)
- {
- //int CurrentRoleID = Convert.ToInt32(dv[i]["CurrentRoleID"].ToString().Trim());
- int ParentActID = Convert.ToInt32(dv[i]["ActivityID"].ToString().Trim());
- int ParentRoleID = Convert.ToInt32(dv[i]["RoleID"].ToString().Trim());
- NextColonyRole(ParentActID, ParentRoleID, "您已审核通过!", nextCheckDepartment, false);
- }
- }
- }
- }
- else
- {
- WFInstADD("您已审核通过!", false);
- }
- }
- }
- //******************************************************上报物资计划及开工报告*************************************************************
- if (MustChooseItem == 20)
- {
- string JcKgName = this.StartWorkReport.Value;
- string JcWZTransactor = cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
- //string JcWZName = "物资计划表"+DateTime.Now.Year+DateTime.Now.Month+DateTime.Now.Day+DateTime.Now.Hour+DateTime.Now.Minute+DateTime.Now.Second+".doc"; //基层单位上报物资计划(电子文档名称) -----待续
- //string JcWZName = this.ReportMaterialPlan.Value;
- //ConstructInfo constructinfo = new ConstructInfo(conname, consort, JcWZName, JcWZTransactor, JcKgName, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 1);
- //string WZFName = "MaterialDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- //int ConID = projectImplment.AddConstruct(constructinfo);
- string sql = "update [Tb_Construct] set [JcWZTransactor]='" + JcWZTransactor + "' where [ConID]=" + this.ConID;
-
- if (SqlServer.RunSql(sql))
- {
- DataView dv = GetConstructInfo(this.ConID);
- string materialxmlname = dv[0]["JcWZFName"].ToString();
- string startworkxmlname = dv[0]["JcKgName"].ToString();
- string materialfilename = this.ReportMaterialPlan.Value;
- string startworkfilename = this.StartWorkReport.Value;
- string checker = cui.EmpName;
- string time = DateTime.Now.ToString();
- string type = ProjectImplment.GetEmpType(cui.EmpID);
- XML xml1 = new XML(path + "\DocTemplateCon\" + materialxmlname);
- xml1.AddXmlNode(new DocumentNode(materialfilename, checker, time, type));//将基层上报的文档信息写入XML文档
- XML xml2 = new XML(path + "\DocTemplateCon\" + startworkxmlname);
- xml2.AddXmlNode(new DocumentNode(startworkfilename, checker, time, type));//将基层上报的文档信息写入XML文档
- string mastermaterialxmlname = dv[0]["WZFName"].ToString();
- string masterstartworkfilename = dv[0]["DocumentXml"].ToString();
- if (mastermaterialxmlname == "" && masterstartworkfilename == "")////如果汇总的XML文档不存在,则创建,否则不创建
- {
- mastermaterialxmlname = "MasterMaterialCollectDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- masterstartworkfilename = "MasterStartWorkCollectDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- sql = "update [Tb_Construct] set [WZFName]='" + mastermaterialxmlname + "',[DocumentXml]='" + masterstartworkfilename + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- if ((xml1.CreateXMLDocument(path + "\DocTemplateCon\" + mastermaterialxmlname) == false) && (xml2.CreateXMLDocument(path + "\DocTemplateCon\" + masterstartworkfilename) == false))
- {
- Common.RunScript(this.Page, "XML文档创建失败,请检查相关设置");
- }
- }
- }
- //if (CheckEmpTypeIsEqualBlockReason() == false)
- if(IsExsitNextWaitActivity()==false)
- {
- WFInstADD("您已审核通过!", false);
- }
- else
- {
- WorkFolw workflow = new WorkFolw();
- if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
- {
- EtongZwf etongzwf = new EtongZwf();
- dv = etongzwf.ColonyUserGetByActId(ActivityID);
- int ParentRoleID = -1;
- if (dv.Count > 0)
- {
- ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
- ProjectImplment pi = new ProjectImplment();
- DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
- string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
- ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
- }
- }
- }
- }
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }
- }
- //******************************************************物资采购*************************************************************
- if (MustChooseItem == 21)
- {
- if (this.BT_OpenDocument_MaterialStock.Enabled == false && this.BT_OpenDocument_ProjectPlan.Enabled == false)
- {
- Common.RunScript(this.Page, "请确认汇总后再审核!");
- return;
- }
- string WZTransactor = cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
- string xmlImplement = "ProjectScheduleDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- //string WZFName = "物资采购" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc"; //物资部门提交时间进度和负责人表(电子文档名称) -----待续
- //string WZFName = this.MaterialStock.Value;
- //string sql = "update [Tb_Construct] set [WZTransactor]='" + WZTransactor + "',[WZFName]='" + WZFName + "' where [ConID]=" + this.ConID;
- string sql = "update [Tb_Construct] set [WZTransactor]='" + WZTransactor + "',[JcZFName]='" + xmlImplement + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- //WorkFlowOperation(this.ConID, "您已审核通过!",true);
- XML xml = new XML();
- if (xml.CreateXMLDocument(path + "\DocTemplateCon\" + xmlImplement))
- {
- WorkFlowOperation(this.ConID, false);
- WorkFolw workflow = new WorkFolw();
- workflow.WFActInsUpdata(actinstanceid, 1, userid);
- //if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
- //{
- // EtongZwf etongzwf = new EtongZwf();
- // dv = etongzwf.ColonyUserGetByActId(ActivityID);
- // int ParentRoleID = -1;
- // if (dv.Count > 0)
- // {
- // ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
- // ProjectImplment pi = new ProjectImplment();
- // DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
- // string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
- //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
- // }
- //}
- }
- else
- {
- Common.RunScript(this.Page, "XML文档创建失败,请检查相关设置");
- }
- }
-
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }
- }
- //******************************************************组织实施*************************************************************
- if (MustChooseItem == 22)
- {
- string JczTransaction = cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
- //string JcZFName = "开工报告" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc"; //基层单位组织实施,并填写开工报告(电子文档名称) -----待续
- string JcZFName = this.SetupExecution.Value;
- string sql = "update [Tb_Construct] set [JcZTransactor]='" + JczTransaction + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- string xmlfilename = GetConstructInfo(this.ConID)[0]["JcZFName"].ToString();
- if (xmlfilename != "")
- {
- string filename = this.SetupExecution.Value;
- string checker = cui.EmpName;
- string time = DateTime.Now.ToString();
- string type = ProjectImplment.GetEmpType(cui.EmpID);
- XML xml1 = new XML(path + "\DocTemplateCon\" + xmlfilename);
- xml1.AddXmlNode(new DocumentNode(filename, checker, time, type));//将基层上报的文档信息写入XML文档
- }
- string ZgJdDocumentXml = GetConstructInfo(this.ConID)[0]["ZgJdDocumentXml"].ToString();
- if (ZgJdDocumentXml == "")
- {
- ZgJdDocumentXml ="ProjectScheduleCollectDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- sql = "update [Tb_Construct] set [ZgJdDocumentXml]='" + ZgJdDocumentXml + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- XML xml = new XML();
- xml.CreateXMLDocument(path + "\DocTemplateCon\" + ZgJdDocumentXml);
- }
- }
- //WorkFlowOperation(ConID, "您已审核通过!",true);
- if (CheckEmpTypeIsEqualBlockReason() == false)//基层单位类型在数据库中不存在!
- {
- WFInstADD("您已审核通过!", true);
- }
- else
- {
- WorkFolw workflow = new WorkFolw();
- if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
- {
- EtongZwf etongzwf = new EtongZwf();
- DataView dv = etongzwf.ColonyUserGetByActId(ActivityID);
- int ParentRoleID = -1;
- if (dv.Count > 0)
- {
- ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
- ProjectImplment pi = new ProjectImplment();
- DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
- string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
- ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
- }
- }
- }
- }
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }
- }
- //******************************************************监督实施*************************************************************
- if (MustChooseItem == 23)
- {
- if (this.BT_OpenDocument_CollectSetupExecution.Enabled == false)
- {
- Common.RunScript(this.Page, "请确认汇总后再审核!");
- return;
- }
- //string ZgJdTransaction = cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
- string ZgJdTransactor = cui.EmpName;
- if (this.TB_ZgJdIdea.Text.Length == 0)
- {
- Common.RunScript(this.Page, "须给出意见");
- return;
- }
- string ZgJdIdea = this.TB_ZgJdIdea.Text.Trim() + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;//主管部门监督实施审核意见和审核时间
- string sql = "update [Tb_Construct] set [ZgJdTransactor]='" + ZgJdTransactor + "',[ZgJdIdea]='" + ZgJdIdea + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- WorkFlowOperation(ConID, "您已审核通过!",true);
- }
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }
- }
- //******************************************************下达监督意见*************************************************************
- if (MustChooseItem == 24)
- {
- string ZgXdTransactor = cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
- //string ZgXdIdea = "监督意见" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";//主管部门下达监督意见(电子文档)-----待续
- string ZgXdIdea = this.MakeMonitorIdea.Value;
- string sql = "update [Tb_Construct] set [ZgXdTransactor]='" + ZgXdTransactor + "',[ZgXdIdea]='" + ZgXdIdea + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- string JcSBDocumentXml = GetConstructInfo(this.ConID)[0]["JcSBFName"].ToString();
- if (JcSBDocumentXml == "")
- {
- JcSBDocumentXml = "ProjectPlanDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- sql = "update [Tb_Construct] set [JcSBFName]='" + JcSBDocumentXml + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- XML xml = new XML();
- xml.CreateXMLDocument(path + "\DocTemplateCon\" + JcSBDocumentXml);
- }
- }
- WorkFlowOperation(ConID,false);
- WorkFolw workflow = new WorkFolw();
- workflow.WFActInsUpdata(this.actinstanceid, 1, this.userid);
- }
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }
- }
- //******************************************************上报本单位工程进度*************************************************************
- if (MustChooseItem == 25)
- {
- /*string JcSBTransactor = cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
- //string JcSBFName = "工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";//基层部门上报本单位工程进度说明书(电子文档)-----待续
- string JcSBFName = this.ReportProjectSchedule.Value;
- string sql = "update [Tb_Construct] set [JcSBTransactor]='" + JcSBTransactor + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- WorkFlowOperation(ConID, "您已审核通过!",true);
- }
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }*/
- string xmlfilename = GetConstructInfo(this.ConID)[0]["JcSBFName"].ToString();
- if (xmlfilename != "")
- {
- string filename = this.ReportProjectSchedule.Value;
- string checker = cui.EmpName;
- string time = DateTime.Now.ToString();
- string type = ProjectImplment.GetEmpType(cui.EmpID);
- XML xml1 = new XML(path + "\DocTemplateCon\" + xmlfilename);
- xml1.AddXmlNode(new DocumentNode(filename, checker, time, type));//将基层上报的文档信息写入XML文档
- }
- /*创建XML文档*/
- string ZgHzDocumentXml = GetConstructInfo(this.ConID)[0]["ZgHzFName"].ToString();
- if (ZgHzDocumentXml == "")
- {
- ZgHzDocumentXml = "ProjectPlanCollectDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- string sql = "update [Tb_Construct] set [ZgHzFName]='" + ZgHzDocumentXml + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- XML xml = new XML();
- xml.CreateXMLDocument(path + "\DocTemplateCon\" + ZgHzDocumentXml);
- }
- }
- xmlfilename = GetConstructInfo(this.ConID)[0]["GcglFName"].ToString();
- if (xmlfilename == "")
- {
- string GcglFileName = "ProjectPlanTotalCollectDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
- string sql = "update [Tb_Construct] set [GcglFName]='" + GcglFileName + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- XML xml = new XML();
- xml.CreateXMLDocument(path + "\DocTemplateCon\" + GcglFileName);
- }
- }
- //WorkFlowOperation(ConID, "您已审核通过!",true);
- if (CheckEmpTypeIsEqualBlockReason() == false)//基层单位类型在数据库中不存在!
- {
- WFInstADD("您已审核通过!", true);
- }
- else
- {
- WorkFolw workflow = new WorkFolw();
- if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
- {
- EtongZwf etongzwf = new EtongZwf();
- DataView dv = etongzwf.ColonyUserGetByActId(ActivityID);
- int ParentRoleID = -1;
- if (dv.Count > 0)
- {
- ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
- ProjectImplment pi = new ProjectImplment();
- DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
- string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
- ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
- }
- }
- }
- }
- //**********************************************************汇总工程进度*******************************************************************
- if (MustChooseItem == 26)
- {
- if (this.BT_OpenDocument_GatherProjectSchedule.Enabled == false)
- {
- Common.RunScript(this.Page, "请确认汇总后再审核!");
- return;
- }
- string ZgHzTransactor = cui.EmpName + " " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
- //string ZgHzFName = "汇总工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";//主管部门汇总工程进度表(电子文档)-----待续
- string ZgHzFName = this.GatherProjectSchedule.Value;
- string sql = "update [Tb_Construct] set [ZgHzTransactor]='" + ZgHzTransactor + "' where [ConID]=" + this.ConID;
- if (SqlServer.RunSql(sql))
- {
- //WorkFlowOperation(ConID, "您已审核通过!",false);
- //WFInstADD("您已审核通过!", true);
- if (IsExsitNextWaitActivity() == false)
- {
- WFInstADD("您已审核通过!", false);
- }
- else
- {
- WorkFolw workflow = new WorkFolw();
- if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
- {
- EtongZwf etongzwf = new EtongZwf();
- DataView dv = etongzwf.ColonyUserGetByActId(ActivityID);
- int ParentRoleID = -1;
- if (dv.Count > 0)
- {
- ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
- ProjectImplment pi = new ProjectImplment();
- DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
- string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
- ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
- }
- }
- }
- }
- else
- {
- Common.RunScript(this.Page, "操作失败,请检查数据!");
- }
- }
- //******************************************************项目实施情况分析、上报***********************************************************
- if (MustChooseItem == 27)
- {
- if (this.BT_OpenDocument_ProjectAnalysis.Enabled == false)
- {
- Common.RunScript(this.Page, "请确认汇总后再审核!");
- return;
- }