ProjectImplement.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:171k
源码类别:

.net编程

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using com.etong.DBUtility;
  12. using com.etong.Inform;
  13. using com.etong.BusinessRule.Zwf;
  14. using com.etong.DAL;
  15. using com.etong.Model;
  16. using com.etong.Utility;
  17. using DocMergerComponent;
  18. using com.etong.Excel;
  19. public partial class Workflow_ProjectImplement : System.Web.UI.Page
  20. {
  21.     protected int userid = -1;
  22.     protected int wfid = -1;//当前工作流ID
  23.     protected int MustChooseItem = -1;//必选项
  24.     protected int ActivityID = -1;//活动ID
  25.     protected int WFInstanceID = -1;//工作流实例ID
  26.     protected int actinstanceid = -1;//活动实例ID
  27.     protected int ActID = -1;//活动实例ID
  28.     protected bool IsUntread = true;//是否回退
  29.     protected int shuntFlag = 0;//分流标志(0、不分流;1、审核通过;2、审核不通过;3、全委托;4、外委;5、更改材料;6、不更改材料)
  30.     protected int ConID = -1;
  31.     protected string rolestr()
  32.     {
  33.         string rolestr = "";
  34.         if (userid != -1)
  35.         {
  36.             EtongZwf etongzwf = new EtongZwf();
  37.             DataView dvrole = etongzwf.RoleGetByID(userid);
  38.             for (int i = 0; i < dvrole.Count; i++)
  39.             {
  40.                 rolestr = rolestr + dvrole[i][0].ToString().Trim() + ",";
  41.             }
  42.         }
  43.         return rolestr;
  44.     }
  45.     protected void Page_Load(object sender, EventArgs e)
  46.     {
  47.         //------------------------------------------变量定义-----------------------------------------------
  48.         DataView dv = null;
  49.          CheckUserInfo  cui=null;
  50.         string MustChooseItemtxt = "";
  51.         if (Request.QueryString["MustChooseItem"] != null)
  52.         {
  53.             MustChooseItemtxt = Request.QueryString["MustChooseItem"].ToString().Trim();
  54.             MustChooseItem = Convert.ToInt16(MustChooseItemtxt);
  55.         }
  56.         string ActivityIDtxt="";
  57.         if (Request.QueryString["ActivityID"] != null)
  58.         {
  59.             ActivityIDtxt = Request.QueryString["ActivityID"].ToString().Trim();
  60.             ActivityID = Convert.ToInt32(ActivityIDtxt);
  61.         }
  62.         string WFInstanceIDtxt = "";
  63.         if (Request.QueryString["WFInstanceID"] != null)
  64.             WFInstanceIDtxt = Request.QueryString["WFInstanceID"].ToString().Trim();
  65.         string WFIDtxt = "";
  66.         if (Request.QueryString["WFID"] != null)
  67.         {
  68.             WFIDtxt = Request.QueryString["WFID"].ToString().Trim();
  69.             wfid = Convert.ToInt16(WFIDtxt);
  70.         }
  71.         if (Request.QueryString["ActID"] != null)
  72.         {
  73.             actinstanceid = Convert.ToInt32(Request.QueryString["ActID"].ToString());
  74.         }
  75.         
  76.         //----------------------------------------对象定义--------------------------------------------------
  77.         if (Session["checkuserinfo"] != null)
  78.         {
  79.             cui = (CheckUserInfo)Session["checkuserinfo"];
  80.             userid = cui.UserID;
  81.         }
  82.         if (ActivityIDtxt != "" && WFInstanceIDtxt != "")
  83.         {
  84.             if (Convert.ToInt32(ActivityIDtxt) != -1 && Convert.ToInt32(WFInstanceIDtxt) != -1)
  85.             {
  86.                 WFInstanceID = Convert.ToInt32(WFInstanceIDtxt);
  87.                 string sql = "select * from [tb_WF_Instance] where [WFInstanceID]=" + WFInstanceID;
  88.                 dv = SqlServer.GetDataView(sql);
  89.                 if (dv.Count > 0)
  90.                 {
  91.                     wfid = Convert.ToInt32(dv[0][8].ToString().Trim());
  92.                     this.ConID = Convert.ToInt32(dv[0][9].ToString().Trim());
  93.                 }
  94.             }
  95.         }
  96.         string path = Server.MapPath("doc").Replace("\", "\\");      //获取项目所在路径
  97.         int tempStatus = WorkFolw.GetCurrentActivityInstanceStatus(this.actinstanceid);//当前活动实例状态
  98.         if (!this.Page.IsPostBack)
  99.         {
  100.             if (Request.QueryString["ConID"] != null)
  101.             {
  102.                 this.Panel_Back.Visible = true;
  103.                 int conid = Convert.ToInt32(Request.QueryString["ConID"]);
  104.                 dv = GetConstructInfo(conid);
  105.                 //SetAllPanelsVisibility(true, true, true, true, true, true, true, true, true, true, false);
  106.                 if (dv.Count > 0)
  107.                 {
  108.                     this.Panel_ReportMaterialPlan.Visible = (dv[0]["JcWZTransactor"].ToString() != "" ? true : false);
  109.                     this.Panel_MaterialStock.Visible = (dv[0]["WZTransactor"].ToString() != "" ? true : false);
  110.                     this.Panel_SetupExecution.Visible = (dv[0]["JcZTransactor"].ToString() != "" ? true : false);
  111.                     this.Panel_MonitorExecution.Visible = (dv[0]["ZgJdTransactor"].ToString() != "" ? true : false);
  112.                     this.Panel_ProjectPlan.Visible = false;
  113.                     this.Panel_MakeMonitorIdea.Visible = (dv[0]["ZgXdTransactor"].ToString() != "" ? true : false);
  114.                     this.Panel_ReportProjectSchedule.Visible = (dv[0]["JcSBTransactor"].ToString() != "" ? true : false);
  115.                     this.Panel_GatherProjectSchedule.Visible = (dv[0]["ZgHzTransactor"].ToString() != "" ? true : false);
  116.                     this.Panel_ProjectAnalysis.Visible = (dv[0]["GcglTransactor"].ToString() != "" ? true : false);
  117.                     this.Panel_TurnInOldMaterial.Visible = (dv[0]["JcSJTransactor"].ToString() != "" ? true : false);
  118.                     this.Panel_OldMaterialManagement.Visible = (dv[0]["WZFjTransactor"].ToString() != "" ? true : false);
  119.                     this.Panel_Button.Visible = false;
  120.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  121.                     this.TB_ConName.Enabled = false;
  122.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  123.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  124.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  125.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  126.                     this.TB_ZgJdIdea.Enabled = false;
  127.                     this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
  128.                     this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
  129.                     this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
  130.                     this.ShowOperatorAndTime_ProjectAnalysis.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["GcglTransactor"].ToString() + "</font></div>";
  131.                     this.ShowOperatorAndTime_TurnInOldMaterial.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcSJTransactor"].ToString() + "</font></div>";
  132.                     this.ShowOperatorAndTime_OldMaterialManagement.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZFjTransactor"].ToString() + "</font></div>";
  133.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  134.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  135.                     this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  136.                     this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  137.                     this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
  138.                     this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
  139.                     this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
  140.                     this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
  141.                     this.TurnInOldMaterial.Value = dv[0]["JcSJFName"].ToString();
  142.                     this.TB_OldMaterialManagement.Text = dv[0]["WZFjFName"].ToString();
  143.                     this.TB_OldMaterialManagement.Enabled = false;
  144.                     this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  145.                     this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'"+cui.EmpName+"');");
  146.                     this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  147.                     this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  148.                     this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  149.                     this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  150.                     this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  151.                     this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  152.                     this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
  153.                     this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
  154.                     this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
  155.                     this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
  156.                     this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
  157.                     this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value),'" + cui.EmpName + "';");
  158.                     this.BT_OpenDocument_ProjectAnalysis.Text = "浏览电子文档";
  159.                     this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
  160.                     this.BT_OpenDocument_TurnInOldMaterial.Text = "浏览电子文档";
  161.                     this.BT_OpenDocument_TurnInOldMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('TurnInOldMaterial').value,'" + cui.EmpName + "');");
  162.                 }
  163.             }
  164.             if (tempStatus == 2)
  165.             {
  166.                 string script = "<script language='javascript'>var MSG = new CLASS_MSN_MESSAGE('aa',200,120,'系统提示:','您有1条信息','当前活动为回退活动,请您重新审核资料再提交给上级部门!');MSG.speed = 3; MSG.step = 2; MSG.show();</script>";
  167.                 Common.RunScriptString(this.Page, script);
  168.             }
  169.         }
  170.         switch (MustChooseItem)
  171.         {
  172.             /*==============================================================================================
  173.              * 
  174.              *                                工程项目实施开始
  175.              * 
  176.              *=============================================================================================*/
  177.             case 19:
  178.                 IsUntread = false;//不可回退
  179.                 SetAllPanelsVisibility(true, false, false, false, false, false, false, false, false, false, false, true);
  180.                 break;
  181.             /*==============================================================================================
  182.              * 
  183.              *                                工程项目实施流程上报物资计划
  184.              * 
  185.              *=============================================================================================*/
  186.             case 20:
  187.                 // string path = System.IO.Directory.GetCurrentDirectory().ToString();
  188.                 //this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + path + "');</script>");
  189.                 IsUntread = false;//不可回退
  190.                 SetAllPanelsVisibility(true,true, false, false, false, false, false, false, false, false, false, true);
  191.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  192.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  193.                 dv = GetConstructInfo(this.ConID);
  194.                 if (dv.Count > 0)
  195.                 {
  196.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  197.                     this.TB_ConName.Enabled = false;
  198.                 }
  199.                 if (tempStatus == 2)
  200.                 {
  201.                     dv = GetConstructInfo(this.ConID);
  202.                     if (dv.Count > 0)
  203.                     {
  204.                         this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  205.                         this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  206.                         this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  207.                     }
  208.                 }
  209.                 else
  210.                 {
  211.                     if (!this.Page.IsPostBack)
  212.                     {
  213.                         string FileName_ReportMaterialPlan = GetDocumentFileName(this.ActivityID,1);
  214.                         string FileName_StartWorkReport = GetDocumentFileName(this.ActivityID,0);
  215.                         this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute + "</font></div>";
  216.                         //this.ReportMaterialPlan.Value = "物资计划表" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  217.                         this.ReportMaterialPlan.Value = MakeNewFileNameWithDate(FileName_ReportMaterialPlan);
  218.                         this.StartWorkReport.Value = MakeNewFileNameWithDate(FileName_StartWorkReport);
  219.                         if (!(Util.Copyfile(path + "\" + FileName_ReportMaterialPlan, path + "\DocTemplateCon\" + this.ReportMaterialPlan.Value) && Util.Copyfile(path + "\" + FileName_StartWorkReport, path + "\DocTemplateCon\" + this.StartWorkReport.Value)))
  220.                         {
  221.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  222.                             return;
  223.                         }
  224.                     }
  225.                 }
  226.                 break;
  227.             /*==============================================================================================
  228.              * 
  229.              *                                    物资采购
  230.              * 
  231.              *=============================================================================================*/
  232.             case 21:
  233.                 SetAllPanelsVisibility(true,false, true, false, false, false, false, false, false, false, false, true);
  234.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  235.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript: SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  236.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  237.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  238.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  239.                 dv = GetConstructInfo(this.ConID);
  240.                 if (dv != null && dv.Count > 0)
  241.                 {
  242.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  243.                     this.TB_ConName.Enabled = false;
  244.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  245.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  246.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  247.                     if (tempStatus == 2)//回退活动
  248.                     {
  249.                         this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  250.                     }
  251.                 }
  252.                 if (!(tempStatus == 2))
  253.                 {
  254.                     if (!this.Page.IsPostBack)
  255.                     {
  256.                         this.IB_Collect.Visible = true;
  257.                         this.BT_OpenDocument_MaterialStock.Enabled = false;
  258.                         this.BT_OpenDocument_ProjectPlan.Enabled = false;
  259.                         //string FileName_MaterialStock = GetDocumentFileName(this.ActivityID);
  260.                         //this.MaterialStock.Value = "物资采购" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  261.                         /*this.MaterialStock.Value = MakeNewFileNameWithDate(FileName_MaterialStock);
  262.                         if (!Util.Copyfile(path + "\" + FileName_MaterialStock, path + "\DocTemplateCon\" + this.MaterialStock.Value))
  263.                         {
  264.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  265.                             return;
  266.                         }*/
  267.                     }
  268.                 }
  269.                 break;
  270.             /*==============================================================================================
  271.              * 
  272.              *                                    组织实施
  273.              * 
  274.              *=============================================================================================*/
  275.             case 22:
  276.                 SetAllPanelsVisibility(true, false, true, true, false, false, false, false, false, false, false, true);
  277.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  278.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  279.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  280.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  281.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  282.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  283.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  284.                 dv = GetConstructInfo(this.ConID);
  285.                 if (dv != null && dv.Count > 0)
  286.                 {
  287.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  288.                     this.TB_ConName.Enabled = false;
  289.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  290.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  291.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  292.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  293.                     //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  294.                     this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
  295.                     //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  296.                     //this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
  297.                     if (tempStatus == 2)//回退活动
  298.                     {
  299.                         this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  300.                     }
  301.                 }
  302.                 if (!(tempStatus == 2))
  303.                 {
  304.                     if (!this.Page.IsPostBack)
  305.                     {
  306.                         this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
  307.                         string FileName_SetupExecution = GetDocumentFileName(this.ActivityID);
  308.                         //this.SetupExecution.Value = "开工报告" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  309.                         this.SetupExecution.Value = MakeNewFileNameWithDate(FileName_SetupExecution);
  310.                         if (!Util.Copyfile(path + "\" + FileName_SetupExecution, path + "\DocTemplateCon\" + this.SetupExecution.Value))
  311.                         {
  312.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  313.                             return;
  314.                         }
  315.                     }
  316.                 }
  317.                 break;
  318.             /*==============================================================================================
  319.              * 
  320.              *                                    监督实施
  321.              * 
  322.              *=============================================================================================*/
  323.             case 23:
  324.                 SetAllPanelsVisibility(true, false, true, false, true, false, false, false, false, false, false, true);
  325.                 this.BT_NotPass.Visible = true;
  326.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  327.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  328.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  329.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  330.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  331.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  332.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  333.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  334.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  335.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  336.                 dv = GetConstructInfo(this.ConID);
  337.                 if (dv != null && dv.Count > 0)
  338.                 {
  339.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  340.                     this.TB_ConName.Enabled = false;
  341.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  342.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  343.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  344.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  345.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  346.                     //this.MaterialStock.Value = dv[0]["WZFName"].ToString();//
  347.                     this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
  348.                     //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  349.                     this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
  350.                     if (tempStatus == 2)//回退活动
  351.                     {
  352.                         this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  353.                     }
  354.                 }
  355.                 if (!this.Page.IsPostBack)
  356.                 {
  357.                     this.IB_Collect.Visible = true;
  358.                     this.TB_ZgJdIdea.Text = "同意";
  359.                     this.BT_OpenDocument_CollectSetupExecution.Enabled = false;
  360.                 }
  361.                 break;
  362.             /*==============================================================================================
  363.              * 
  364.              *                                    工程计划流程
  365.              * 
  366.              *=============================================================================================*/
  367.             case 30:
  368.                 SetAllPanelsVisibility(true, true, true, true, true, false, false, false, false, false, false, true);
  369.                 //this.BT_NotPass.Visible = true;
  370.                 this.Panel_ProjectPlan.Visible = true;
  371.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  372.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  373.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  374.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  375.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  376.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  377.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  378.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  379.                 dv = GetConstructInfo(this.ConID);
  380.                 if (dv != null && dv.Count > 0)
  381.                 {
  382.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  383.                     this.TB_ConName.Enabled = false;
  384.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  385.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  386.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  387.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  388.                     this.TB_ZgJdIdea.Enabled = false;
  389.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  390.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  391.                     this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  392.                     this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  393.                 }
  394.                 break;
  395.             /*==============================================================================================
  396.              * 
  397.              *                                    下达监督意见
  398.              * 
  399.              *=============================================================================================*/
  400.             case 24:
  401.                 SetAllPanelsVisibility(true, false, true, false, true, true, false, false, false, false, false, true);
  402.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  403.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  404.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  405.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  406.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  407.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  408.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  409.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  410.                 this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
  411.                 dv = GetConstructInfo(this.ConID);
  412.                 if (dv != null && dv.Count > 0)
  413.                 {
  414.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  415.                     this.TB_ConName.Enabled = false;
  416.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  417.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  418.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  419.                     this.ShowOperatorAndTime_MonitorExecution.InnerHtml = "<div align='center'>审核人/审核时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgJdTransactor"].ToString() + "</font></div>";
  420.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  421.                     this.TB_ZgJdIdea.Enabled = false;
  422.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  423.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  424.                     //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  425.                     this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
  426.                     this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
  427.                     this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
  428.                     //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  429.                     if (tempStatus == 2)//回退活动
  430.                     {
  431.                         this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
  432.                     }
  433.                 }
  434.                 if (!(tempStatus == 2))
  435.                 {
  436.                     if (!this.Page.IsPostBack)
  437.                     {
  438.                         string FileName_MakeMonitorIdea = GetDocumentFileName(this.ActivityID);
  439.                         //this.MakeMonitorIdea.Value = "监督意见" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  440.                         this.MakeMonitorIdea.Value = MakeNewFileNameWithDate(FileName_MakeMonitorIdea);
  441.                         if (!Util.Copyfile(path + "\" + FileName_MakeMonitorIdea, path + "\DocTemplateCon\" + this.MakeMonitorIdea.Value))
  442.                         {
  443.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  444.                             return;
  445.                         }
  446.                     }
  447.                 }
  448.                 break;
  449.             /*==============================================================================================
  450.              * 
  451.              *                                 基层单位上报本单位工程进度
  452.              * 
  453.              *=============================================================================================*/
  454.             case 25:
  455.                 SetAllPanelsVisibility(true, false, true, false, true, true, true, false, false, false, false, true);
  456.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  457.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  458.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  459.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  460.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  461.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  462.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  463.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  464.                 this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
  465.                 this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
  466.                 this.BT_OpenDocument_CollectSetupExecution.Text = "浏览电子文档";
  467.                 this.BT_OpenDocument_CollectSetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('CollectSetupExecution').value,'" + cui.EmpName + "');");
  468.                 this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
  469.                 dv = GetConstructInfo(this.ConID);
  470.                 if (dv != null && dv.Count > 0)
  471.                 {
  472.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  473.                     this.TB_ConName.Enabled = false;
  474.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  475.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  476.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  477.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  478.                     this.TB_ZgJdIdea.Enabled = false;
  479.                     this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
  480.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  481.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  482.                     this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
  483.                     this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
  484.                     this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
  485.                     this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
  486.                     this.BT_OpenDocument_CollectSetupExecution.Text = "浏览电子文档";
  487.                     this.BT_OpenDocument_CollectSetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('CollectSetupExecution').value,'" + cui.EmpName + "');");
  488.                     if (tempStatus == 2)
  489.                     {
  490.                         this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
  491.                     }
  492.                 }
  493.                 if (!(tempStatus == 2))
  494.                 {
  495.                     if (!this.Page.IsPostBack)
  496.                     {
  497.                         string FileName_ReportProjectSchedule = GetDocumentFileName(this.ActivityID);
  498.                         //this.ReportProjectSchedule.Value = "工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  499.                         this.ReportProjectSchedule.Value = MakeNewFileNameWithDate(FileName_ReportProjectSchedule);
  500.                         if (!Util.Copyfile(path + "\" + FileName_ReportProjectSchedule, path + "\DocTemplateCon\" + this.ReportProjectSchedule.Value))
  501.                         {
  502.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  503.                             return;
  504.                         }
  505.                     }
  506.                 }
  507.                 break;
  508.             /*==============================================================================================
  509.              * 
  510.              *                                 汇总工程进度
  511.              * 
  512.              *=============================================================================================*/
  513.             case 26:
  514.                 SetAllPanelsVisibility(true, false, true, false, true, true, false, true, false, false, false, true);
  515.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  516.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  517.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  518.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  519.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  520.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  521.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  522.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  523.                 this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
  524.                 this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
  525.                 this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
  526.                 this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
  527.                 this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('GatherProjectSchedule').value,'" + cui.EmpName + "');");
  528.                 dv = GetConstructInfo(this.ConID);
  529.                 if (dv != null && dv.Count > 0)
  530.                 {
  531.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  532.                     this.TB_ConName.Enabled = false;
  533.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  534.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  535.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  536.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  537.                     this.TB_ZgJdIdea.Enabled = false;
  538.                     this.ShowOperatorAndTime_MonitorExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgJdTransactor"].ToString() + "</font></div>";
  539.                     this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
  540.                     this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
  541.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  542.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  543.                     //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  544.                     this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
  545.                     //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  546.                     this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
  547.                     this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
  548.                     this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
  549.                     this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
  550.                     if (tempStatus == 2)
  551.                     {
  552.                         this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
  553.                     }
  554.                 }
  555.                 if (!(tempStatus == 2))
  556.                 {
  557.                     if (!this.Page.IsPostBack)
  558.                     {
  559.                         /*string FileName_GatherProjectSchedule = GetDocumentFileName(this.ActivityID);
  560.                         //this.GatherProjectSchedule.Value = "汇总工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  561.                         this.GatherProjectSchedule.Value = MakeNewFileNameWithDate(FileName_GatherProjectSchedule);
  562.                         if (!Util.Copyfile(path + "\" + FileName_GatherProjectSchedule, path + "\DocTemplateCon\" + this.GatherProjectSchedule.Value))
  563.                         {
  564.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  565.                             return;
  566.                         }*/
  567.                         this.BT_OpenDocument_GatherProjectSchedule.Enabled = false;
  568.                         this.IB_Collect.Visible = true;
  569.                     }
  570.                 }
  571.                 break;
  572.             /*==============================================================================================
  573.              * 
  574.              *                                 项目实施情况分析、上报
  575.              * 
  576.              *=============================================================================================*/
  577.             case 27:
  578.                 SetAllPanelsVisibility(true, false, true, false, true, true, false, true, true, false, false, true);
  579.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  580.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  581.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  582.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  583.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  584.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  585.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  586.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  587.                 this.BT_OpenDocument_CollectSetupExecution.Text = "浏览电子文档";
  588.                 this.BT_OpenDocument_CollectSetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('CollectSetupExecution').value,'" + cui.EmpName + "');"); 
  589.                 this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
  590.                 this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
  591.                 this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
  592.                 this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
  593.                 this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
  594.                 this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value,'" + cui.EmpName + "');");
  595.                 this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
  596.                 dv = GetConstructInfo(this.ConID);
  597.                 if (dv != null && dv.Count > 0)
  598.                 {
  599.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  600.                     this.TB_ConName.Enabled = false;
  601.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  602.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  603.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  604.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  605.                     this.TB_ZgJdIdea.Enabled = false;
  606.                     this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
  607.                     this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
  608.                     this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
  609.                     this.ShowOperatorAndTime_MonitorExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgJdTransactor"].ToString() + "</font></div>";
  610.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  611.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  612.                     //this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  613.                     this.MaterialStock.Value = GetEmpTypeDocument_MaterialPlan();
  614.                     //this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  615.                     this.SetupExecution.Value = GetEmpTypeDocument_SetupExecution();
  616.                     this.CollectSetupExecution.Value = GetEmpTypeDocument_JDExecution();
  617.                     this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
  618.                     this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
  619.                     //this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
  620.                     this.GatherProjectSchedule.Value = GetEmpTypeDocument_ProjectPlan();
  621.                     this.ProjectMaterial.Value = GetEmpTypeDocument_MaterialPlan();
  622.                     this.BT_OpenDocument_ProjectMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectMaterial').value,'" + cui.EmpName + "');");
  623.                     this.ProjectAnalysis.Value = GetEmpTypeDocument_ProjectPlan();
  624.                     this.BT_OpenDocument_ProjectAnalysis.Attributes.Add ("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
  625.                     if (tempStatus == 2)
  626.                     {
  627.                         this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
  628.                     }
  629.                 }
  630.                 if (!(tempStatus == 2))
  631.                 {
  632.                     if (!this.Page.IsPostBack)
  633.                     {
  634.                         this.BT_OpenDocument_ProjectAnalysis.Enabled = false;
  635.                         this.IB_Collect.Visible = true;
  636.                         /*string FileName_ProjectAnalysis = GetDocumentFileName(this.ActivityID);
  637.                         //this.ProjectAnalysis.Value = "工程进度调整计划、问题和解决方案" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  638.                         this.ProjectAnalysis.Value = MakeNewFileNameWithDate(FileName_ProjectAnalysis);
  639.                         if (!Util.Copyfile(path + "\" + FileName_ProjectAnalysis, path + "\DocTemplateCon\" + this.ProjectAnalysis.Value))
  640.                         {
  641.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  642.                             return;
  643.                         }*/
  644.                     }
  645.                 }
  646.                 break;
  647.             /*==============================================================================================
  648.              * 
  649.              *                                    上缴废旧物资
  650.              * 
  651.              *=============================================================================================*/
  652.            /* case 28:
  653.                 SetAllPanelsVisibility(true, true, true, true, true, true, true, true, true, true, false, true);
  654.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  655.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value,'" + cui.EmpName + "');");
  656.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  657.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value,'" + cui.EmpName + "');");
  658.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  659.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value,'" + cui.EmpName + "');");
  660.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  661.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value,'" + cui.EmpName + "');");
  662.                 this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
  663.                 this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value,'" + cui.EmpName + "');");
  664.                 this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
  665.                 this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value,'" + cui.EmpName + "');");
  666.                 this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
  667.                 this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value,'" + cui.EmpName + "');");
  668.                 this.BT_OpenDocument_ProjectAnalysis.Text = "浏览电子文档";
  669.                 this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value,'" + cui.EmpName + "');");
  670.                 this.BT_OpenDocument_TurnInOldMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('TurnInOldMaterial').value,'" + cui.EmpName + "');");
  671.                 dv = GetConstructInfo(this.ConID);
  672.                 if (dv != null && dv.Count > 0)
  673.                 {
  674.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  675.                     this.TB_ConName.Enabled = false;
  676.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  677.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  678.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  679.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  680.                     this.TB_ZgJdIdea.Enabled = false;
  681.                     this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
  682.                     this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
  683.                     this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
  684.                     this.ShowOperatorAndTime_ProjectAnalysis.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["GcglTransactor"].ToString() + "</font></div>";
  685.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  686.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  687.                     this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  688.                     this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  689.                     this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
  690.                     this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
  691.                     this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
  692.                     this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
  693.                     if (tempStatus == 2)
  694.                     {
  695.                         this.TurnInOldMaterial.Value = dv[0]["JcSJFName"].ToString();
  696.                     }
  697.                 }
  698.                 if (!(tempStatus == 2))
  699.                 {
  700.                     if (!this.Page.IsPostBack)
  701.                     {
  702.                         string FileName_TrunInOldMaterial = GetDocumentFileName(this.ActivityID);
  703.                         //this.TurnInOldMaterial.Value = "废旧物资" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  704.                         this.TurnInOldMaterial.Value = MakeNewFileNameWithDate(FileName_TrunInOldMaterial);
  705.                         if (!Util.Copyfile(path + "\" + FileName_TrunInOldMaterial, path + "\DocTemplateCon\" + this.TurnInOldMaterial.Value))
  706.                         {
  707.                             Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  708.                             return;
  709.                         }
  710.                     }
  711.                 }
  712.                 break;*/
  713.             /*==============================================================================================
  714.              * 
  715.              *                                    废旧物资管理流程
  716.              * 
  717.              *=============================================================================================*/
  718.             /*case 29:
  719.                 SetAllPanelsVisibility(true, true, true, true, true, true, true, true, true, true, true);
  720.                 this.BT_OpenDocument_ReportMaterialPlan.Text = "浏览电子文档";
  721.                 this.BT_OpenDocument_ReportMaterialPlan.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportMaterialPlan').value);");
  722.                 this.BT_OpenDocument_StartWorkReport.Text = "浏览电子文档";
  723.                 this.BT_OpenDocument_StartWorkReport.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('StartWorkReport').value);");
  724.                 this.BT_OpenDocument_MaterialStock.Text = "浏览电子文档";
  725.                 this.BT_OpenDocument_MaterialStock.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MaterialStock').value);");
  726.                 this.BT_OpenDocument_SetupExecution.Text = "浏览电子文档";
  727.                 this.BT_OpenDocument_SetupExecution.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('SetupExecution').value);");
  728.                 this.BT_OpenDocument_MakeMonitorIdea.Text = "浏览电子文档";
  729.                 this.BT_OpenDocument_MakeMonitorIdea.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('MakeMonitorIdea').value);");
  730.                 this.BT_OpenDocument_ReportProjectSchedule.Text = "浏览电子文档";
  731.                 this.BT_OpenDocument_ReportProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ReportProjectSchedule').value);");
  732.                 this.BT_OpenDocument_GatherProjectSchedule.Text = "浏览电子文档";
  733.                 this.BT_OpenDocument_GatherProjectSchedule.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('GatherProjectSchedule').value);");
  734.                 this.BT_OpenDocument_ProjectAnalysis.Text = "浏览电子文档";
  735.                 this.BT_OpenDocument_ProjectAnalysis.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('ProjectAnalysis').value);");
  736.                 this.BT_OpenDocument_TurnInOldMaterial.Text = "浏览电子文档";
  737.                 this.BT_OpenDocument_TurnInOldMaterial.Attributes.Add("onclick", "javascript:SetLinkUrl2('DocTemplateCon/'+document.all('TurnInOldMaterial').value);");
  738.                 //this.BT_OpenDocument_OldMaterialManagement.Attributes.Add("onclick", "javascript:SetLinkUrl('DocTemplateCon/'+document.all('OldMaterialManagement').value);");
  739.                 dv = GetConstructInfo(this.ConID);
  740.                 if (dv != null && dv.Count > 0)
  741.                 {
  742.                     this.TB_ConName.Text = dv[0]["ConName"].ToString();
  743.                     this.TB_ConName.Enabled = false;
  744.                     this.ShowOperatorAndTime_MaterialPlan.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcWZTransactor"].ToString() + "</font></div>";
  745.                     this.ShowOperatorAndTime_MaterialStock.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["WZTransactor"].ToString() + "</font></div>";
  746.                     this.ShowOperatorAndTime_SetupExecution.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcZTransactor"].ToString() + "</font></div>";
  747.                     this.TB_ZgJdIdea.Text = dv[0]["ZgJdIdea"].ToString();
  748.                     this.TB_ZgJdIdea.Enabled = false;
  749.                     this.ShowOperatorAndTime_MakeMonitorIdea.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgXdTransactor"].ToString() + "</font></div>";
  750.                     this.ShowOperatorAndTime_ReportProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcSBTransactor"].ToString() + "</font></div>";
  751.                     this.ShowOperatorAndTime_GatherProjectSchedule.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["ZgHzTransactor"].ToString() + "</font></div>";
  752.                     this.ShowOperatorAndTime_ProjectAnalysis.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["GcglTransactor"].ToString() + "</font></div>";
  753.                     this.ShowOperatorAndTime_TurnInOldMaterial.InnerHtml = "<div align='center'>上报人/上报时间:<font color='red'>&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["JcSJTransactor"].ToString() + "</font></div>";
  754.                     this.ReportMaterialPlan.Value = dv[0]["JcWZFName"].ToString();
  755.                     this.StartWorkReport.Value = dv[0]["JcKgName"].ToString();
  756.                     this.MaterialStock.Value = dv[0]["WZFName"].ToString();
  757.                     this.SetupExecution.Value = dv[0]["JcZFName"].ToString();
  758.                     this.MakeMonitorIdea.Value = dv[0]["ZgXdIdea"].ToString();
  759.                     this.ReportProjectSchedule.Value = dv[0]["JcSBFName"].ToString();
  760.                     this.GatherProjectSchedule.Value = dv[0]["ZgHzFName"].ToString();
  761.                     this.ProjectAnalysis.Value = dv[0]["GcglFName"].ToString();
  762.                     this.TurnInOldMaterial.Value = dv[0]["JcSJFName"].ToString();
  763.                 }
  764.                 if (!this.Page.IsPostBack)
  765.                 {
  766.                     //string FileName_OldMaterialManagement = GetDocumentFileName(this.ActivityID);
  767.                     ////this.OldMaterialManagement.Value = "剩余材料统计" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";
  768.                     //this.OldMaterialManagement.Value = MakeNewFileNameWithDate(FileName_OldMaterialManagement);
  769.                     //if (!Util.Copyfile(path + "\" + FileName_OldMaterialManagement, path + "\DocTemplateCon\" + this.OldMaterialManagement.Value))
  770.                     //{
  771.                     //    Common.RunScript(this.Page, "打开模板失败,请检查相关设置!");
  772.                     //    return;
  773.                     //}
  774.                     this.TB_OldMaterialManagement.Text = "同意";
  775.                 }
  776.                 break;*/
  777.         }
  778.     }
  779.     protected DataView GetConstructInfo(int conid)
  780.     {
  781.         string sql = "select * from [Tb_Construct] where [ConID]=" + conid;
  782.         DataView dv = SqlServer.GetDataView(sql);
  783.         return dv;
  784.     }
  785.     /// <summary>
  786.     /// 显示/隐藏各组面板
  787.     /// </summary>
  788.     /// <param name="flag_ReportMaterialPlan">上报物资计划面板标志</param>
  789.     /// <param name="flag_MaterialStock">物资采购面板标志</param>
  790.     /// <param name="flag_SetupExecution">组织实施面板标志</param>
  791.     /// <param name="flag_MonitorExecution">监督实施面板标志</param>
  792.     /// <param name="flag_MakeMonitorIdea">下达监督意见面板标志</param>
  793.     /// <param name="flag_ReportProjectSchedule">上报本单位工程进度面板标志</param>
  794.     /// <param name="flag_GatherProjectSchedule">汇总工程进度面板标志</param>
  795.     /// <param name="flag_ProjectAnalysis">项目实施情况分析、上报面板标志</param>
  796.     /// <param name="flag_TurnInOldMaterial">上缴废旧物资面板标志</param>
  797.     /// <param name="flag_OldMaterialManagement">废旧物资管理流程面板标志</param>
  798.     /// <param name="flag_Button">操作面板面板标志</param>
  799.     private void SetAllPanelsVisibility(bool flag_StartConstruct,bool flag_ReportMaterialPlan,
  800.                   bool flag_MaterialStock, bool flag_SetupExecution, bool flag_MonitorExecution,
  801.                   bool flag_MakeMonitorIdea, bool flag_ReportProjectSchedule, bool flag_GatherProjectSchedule,
  802.                   bool flag_ProjectAnalysis, bool flag_TurnInOldMaterial, bool flag_OldMaterialManagement,
  803.                   bool flag_Button)
  804.     {
  805.         this.Panel_StartConstruct.Visible = flag_StartConstruct;
  806.         this.Panel_ReportMaterialPlan.Visible = flag_ReportMaterialPlan;
  807.         this.Panel_MaterialStock.Visible = flag_MaterialStock;
  808.         this.Panel_SetupExecution.Visible = flag_SetupExecution;
  809.         this.Panel_MonitorExecution.Visible = flag_MonitorExecution;
  810.         this.Panel_MakeMonitorIdea.Visible = flag_MakeMonitorIdea;
  811.         this.Panel_ReportProjectSchedule.Visible = flag_ReportProjectSchedule;
  812.         this.Panel_GatherProjectSchedule.Visible = flag_GatherProjectSchedule;
  813.         this.Panel_ProjectAnalysis.Visible = flag_ProjectAnalysis;
  814.         this.Panel_TurnInOldMaterial.Visible = flag_TurnInOldMaterial;
  815.         this.Panel_OldMaterialManagement.Visible = flag_OldMaterialManagement;
  816.         this.Panel_Button.Visible = flag_Button;
  817.     }
  818.     protected void BT_Untread_Click(object sender, ImageClickEventArgs e)
  819.     {
  820.         if (IsUntread == false)
  821.         {
  822.             Common.RunScript(this.Page, "起始活动不可回退!");
  823.             return;
  824.         }
  825.         else
  826.         {
  827.             EtongZwf etongzwf = new EtongZwf();
  828.             bool ReActInsValue = false;
  829.             string ActIDtxt = Request.QueryString["ActID"].ToString().Trim();
  830.             ActID = Convert.ToInt32(ActIDtxt);
  831.             //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + ActID.ToString() + "');</script>");
  832.             //return;
  833.             ReActInsValue = etongzwf.WFActInsUpdata(ActID, userid, 3);
  834.             if (ReActInsValue == true)
  835.             {
  836.                 //产生回退活动事例
  837.                 // 注:Status状态(0、正常;1、完成;2、回退;3、回退并完成;4、作废)
  838.                 int ReActInsValue2 = 0;
  839.                 DataView dvAct = etongzwf.ActivityGetByActInsId(ActID);
  840.                 // DataView dvAct = etongzwf.ColonyUserGetByAct(ActivityID);    
  841.                 int PreviousActID = -1;
  842.                 int PreviousUserID = -1;
  843.                 int PreviousRoleID = -1;
  844.                 if (dvAct != null)
  845.                 {
  846.                     PreviousActID = Convert.ToInt16(dvAct[0]["PreviousActID"].ToString().Trim());
  847.                     PreviousUserID = Convert.ToInt16(dvAct[0]["PreviousUserID"].ToString().Trim());
  848.                     PreviousRoleID = Convert.ToInt16(dvAct[0]["PreviousRoleID"].ToString().Trim());
  849.                 }
  850.                 WFActInsInfo wfactinsinfo2 = new WFActInsInfo(-1, PreviousActID, Convert.ToDateTime(DateTime.Now.ToShortDateString()), Convert.ToDateTime(DateTime.Now.ToShortDateString()),
  851.                                                                     2, Convert.ToDateTime(DateTime.Now.ToShortDateString()), WFInstanceID, "", PreviousUserID, PreviousRoleID);
  852.                 ReActInsValue2 = etongzwf.WFActInsADD(wfactinsinfo2);
  853.                 if (ReActInsValue2 != 0)
  854.                     ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:回退成功!');top.location.href='../Main.aspx';</script>");
  855.                 else
  856.                     ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:回退失败!');top.location.href='../Main.aspx';</script>");
  857.             }
  858.         }
  859.     }
  860.     protected void BT_Pass_Click(object sender, ImageClickEventArgs e)
  861.     {
  862.         ProjectImplment projectImplment = new ProjectImplment();
  863.         //int startEnd = 1;//一般任务
  864.         string path = Server.MapPath("doc").Replace("\", "\\");      //获取项目所在路径
  865.         //int tempStatus = WorkFolw.GetCurrentActivityInstanceStatus(this.actinstanceid);//当前活动实例状态
  866.         
  867.         CheckUserInfo cui = (CheckUserInfo)Session["checkuserinfo"];
  868.         string consort = ProjectImplment.GetEmpType(cui.EmpID);
  869.         //******************************************************施工开始*************************************************************
  870.         if (MustChooseItem == 19)
  871.         {
  872.             EtongZwf etongzwf = new EtongZwf();
  873.             if (etongzwf.CheckUpActCompleteActIns(ActivityID, WFInstanceID, false, "") == false)//当前不存在代办任务;
  874.             {
  875.                 string conname = this.TB_ConName.Text.Trim();
  876.                 int tempStatus = WorkFolw.GetCurrentActivityInstanceStatus(this.actinstanceid);//当前活动实例状态
  877.                 if (tempStatus == 0 || tempStatus == 1)//当状态为0、正常;1、完成(审核通过)时检查项目名称
  878.                 {
  879.                     string sql = "select * from [tb_construct] where [ConName]='" + conname + "'";
  880.                     DataView dv = SqlServer.GetDataView(sql);
  881.                     if (dv.Count > 0)
  882.                     {
  883.                         Common.RunScript(this.Page, "工程项目施工名称不能重复!");
  884.                         return;
  885.                     }
  886.                 }
  887.                 if (tempStatus == 2)
  888.                 {
  889.                     WFInstADD("您已审核通过!", false);
  890.                 }
  891.                 else
  892.                 {
  893.                     string materialxml = "MaterialDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  894.                     string startworkxml = "StartWorkDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  895.                     ConstructInfo constructinfo = new ConstructInfo(conname, "-1", startworkxml, "", materialxml, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 1, "");
  896.                     int ConID = projectImplment.AddConstruct(constructinfo);
  897.                     if (ConID > 0)
  898.                     {
  899.                         XML xml = new XML();
  900.                         if (xml.CreateXMLDocument(path + "\DocTemplateCon\" + materialxml) && xml.CreateXMLDocument(path + "\DocTemplateCon\" + startworkxml))
  901.                             WorkFlowOperation(ConID, false);
  902.                         else
  903.                             Common.RunScript(this.Page, "XML文档创建失败,请检查相关设置");
  904.                     }
  905.                     else
  906.                     {
  907.                         Common.RunScript(this.Page, "操作失败,请检查数据!");
  908.                     }
  909.                 }
  910.             }
  911.             else//存在代办任务
  912.             {
  913.                 consort = GetConstructInfo(this.ConID)[0]["Consort"].ToString();
  914.                 if (consort != "")
  915.                 {
  916.                     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 + "')";
  917.                     DataView dv = SqlServer.GetDataView(sql);
  918.                     WorkFolw workflow = new WorkFolw();
  919.                     string nextCheckDepartment = "";
  920.                     if (workflow.WFActInsUpdata(this.actinstanceid, 1, this.userid))
  921.                     {
  922.                         if (dv.Count > 0)
  923.                         {
  924.                             for (int i = 0; i < dv.Count; i++)//找到所有部门
  925.                             {
  926.                                 int ParentRoleID = Convert.ToInt32(dv[i]["RoleID"].ToString().Trim());
  927.                                 ProjectImplment pi = new ProjectImplment();
  928.                                 //DataTable dt = pi.GetDepartmentByID(ParentRoleID);
  929.                                 DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
  930.                                  nextCheckDepartment += dt.Rows[0]["OpName"].ToString() + "、";
  931.                             }
  932.                             for (int i = 0; i < dv.Count; i++)
  933.                             {
  934.                                 //int CurrentRoleID = Convert.ToInt32(dv[i]["CurrentRoleID"].ToString().Trim());
  935.                                 int ParentActID = Convert.ToInt32(dv[i]["ActivityID"].ToString().Trim());
  936.                                 int ParentRoleID = Convert.ToInt32(dv[i]["RoleID"].ToString().Trim());
  937.                                 NextColonyRole(ParentActID, ParentRoleID, "您已审核通过!", nextCheckDepartment, false);
  938.                             }
  939.                         }
  940.                     }
  941.                 }
  942.                 else
  943.                 {
  944.                     WFInstADD("您已审核通过!", false);
  945.                 }
  946.             }
  947.         }
  948.         //******************************************************上报物资计划及开工报告*************************************************************
  949.         if (MustChooseItem == 20)
  950.         {
  951.             string JcKgName = this.StartWorkReport.Value;
  952.             string JcWZTransactor = cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
  953.             //string JcWZName = "物资计划表"+DateTime.Now.Year+DateTime.Now.Month+DateTime.Now.Day+DateTime.Now.Hour+DateTime.Now.Minute+DateTime.Now.Second+".doc";   //基层单位上报物资计划(电子文档名称) -----待续
  954.             //string JcWZName = this.ReportMaterialPlan.Value;
  955.             //ConstructInfo constructinfo = new ConstructInfo(conname, consort, JcWZName, JcWZTransactor, JcKgName, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 1);
  956.             //string WZFName = "MaterialDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  957.             //int ConID = projectImplment.AddConstruct(constructinfo);
  958.             string sql = "update [Tb_Construct] set [JcWZTransactor]='" + JcWZTransactor + "' where [ConID]=" + this.ConID;
  959.             
  960.             if (SqlServer.RunSql(sql))
  961.             {
  962.                 DataView dv = GetConstructInfo(this.ConID);
  963.                 string materialxmlname = dv[0]["JcWZFName"].ToString();
  964.                 string startworkxmlname = dv[0]["JcKgName"].ToString();
  965.                 string materialfilename = this.ReportMaterialPlan.Value;
  966.                 string startworkfilename = this.StartWorkReport.Value;
  967.                 string checker = cui.EmpName;
  968.                 string time = DateTime.Now.ToString();
  969.                 string type = ProjectImplment.GetEmpType(cui.EmpID);
  970.                 XML xml1 = new XML(path + "\DocTemplateCon\" + materialxmlname);
  971.                 xml1.AddXmlNode(new DocumentNode(materialfilename, checker, time, type));//将基层上报的文档信息写入XML文档
  972.                 XML xml2 = new XML(path + "\DocTemplateCon\" + startworkxmlname);
  973.                 xml2.AddXmlNode(new DocumentNode(startworkfilename, checker, time, type));//将基层上报的文档信息写入XML文档
  974.                 string mastermaterialxmlname = dv[0]["WZFName"].ToString();
  975.                 string masterstartworkfilename = dv[0]["DocumentXml"].ToString();
  976.                 if (mastermaterialxmlname == "" && masterstartworkfilename == "")////如果汇总的XML文档不存在,则创建,否则不创建
  977.                 {
  978.                     mastermaterialxmlname = "MasterMaterialCollectDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  979.                     masterstartworkfilename = "MasterStartWorkCollectDocument" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  980.                     sql = "update [Tb_Construct] set [WZFName]='" + mastermaterialxmlname + "',[DocumentXml]='" + masterstartworkfilename + "' where [ConID]=" + this.ConID;
  981.                     if (SqlServer.RunSql(sql))
  982.                     {
  983.                         if ((xml1.CreateXMLDocument(path + "\DocTemplateCon\" + mastermaterialxmlname) == false) && (xml2.CreateXMLDocument(path + "\DocTemplateCon\" + masterstartworkfilename) == false))
  984.                         {
  985.                             Common.RunScript(this.Page, "XML文档创建失败,请检查相关设置");
  986.                         }
  987.                     }
  988.                 }
  989.                 //if (CheckEmpTypeIsEqualBlockReason() == false)
  990.                 if(IsExsitNextWaitActivity()==false)
  991.                 {
  992.                     WFInstADD("您已审核通过!", false);
  993.                 }
  994.                 else
  995.                 {
  996.                     WorkFolw workflow = new WorkFolw();
  997.                     if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
  998.                     {
  999.                         EtongZwf etongzwf = new EtongZwf();
  1000.                         dv = etongzwf.ColonyUserGetByActId(ActivityID);
  1001.                         int ParentRoleID = -1;
  1002.                         if (dv.Count > 0)
  1003.                         {
  1004.                             ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
  1005.                             ProjectImplment pi = new ProjectImplment();
  1006.                             DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
  1007.                             string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
  1008.                             ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
  1009.                         }
  1010.                     }
  1011.                 }
  1012.             }
  1013.             else
  1014.             {
  1015.                 Common.RunScript(this.Page, "操作失败,请检查数据!");
  1016.             }
  1017.         }
  1018.         //******************************************************物资采购*************************************************************
  1019.         if (MustChooseItem == 21)
  1020.         {
  1021.             if (this.BT_OpenDocument_MaterialStock.Enabled == false && this.BT_OpenDocument_ProjectPlan.Enabled == false)
  1022.             {
  1023.                 Common.RunScript(this.Page, "请确认汇总后再审核!");
  1024.                 return;
  1025.             }
  1026.             string WZTransactor = cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
  1027.             string xmlImplement = "ProjectScheduleDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  1028.             //string WZFName = "物资采购" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";   //物资部门提交时间进度和负责人表(电子文档名称) -----待续
  1029.             //string WZFName = this.MaterialStock.Value;
  1030.             //string sql = "update [Tb_Construct] set [WZTransactor]='" + WZTransactor + "',[WZFName]='" + WZFName + "' where [ConID]=" + this.ConID;
  1031.             string sql = "update [Tb_Construct] set [WZTransactor]='" + WZTransactor + "',[JcZFName]='" + xmlImplement + "' where [ConID]=" + this.ConID;
  1032.             if (SqlServer.RunSql(sql))
  1033.             {
  1034.                 //WorkFlowOperation(this.ConID, "您已审核通过!",true);
  1035.                 XML xml = new XML();
  1036.                 if (xml.CreateXMLDocument(path + "\DocTemplateCon\" + xmlImplement))
  1037.                 { 
  1038.                     WorkFlowOperation(this.ConID, false);
  1039.                     WorkFolw workflow = new WorkFolw();
  1040.                     workflow.WFActInsUpdata(actinstanceid, 1, userid);
  1041.                     //if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
  1042.                     //{
  1043.                     //    EtongZwf etongzwf = new EtongZwf();
  1044.                     //    dv = etongzwf.ColonyUserGetByActId(ActivityID);
  1045.                     //    int ParentRoleID = -1;
  1046.                     //    if (dv.Count > 0)
  1047.                     //    {
  1048.                     //        ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
  1049.                     //        ProjectImplment pi = new ProjectImplment();
  1050.                     //        DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
  1051.                     //        string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
  1052.                             //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
  1053.                     //    }
  1054.                     //}
  1055.                 }
  1056.                 else
  1057.                 {
  1058.                     Common.RunScript(this.Page, "XML文档创建失败,请检查相关设置");
  1059.                 }
  1060.             }
  1061.             
  1062.             else
  1063.             {
  1064.                 Common.RunScript(this.Page, "操作失败,请检查数据!");
  1065.             }
  1066.         }
  1067.         //******************************************************组织实施*************************************************************
  1068.         if (MustChooseItem == 22)
  1069.         {
  1070.             string JczTransaction = cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
  1071.             //string JcZFName = "开工报告" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";   //基层单位组织实施,并填写开工报告(电子文档名称) -----待续
  1072.             string JcZFName = this.SetupExecution.Value;
  1073.             string sql = "update [Tb_Construct] set [JcZTransactor]='" + JczTransaction + "' where [ConID]=" + this.ConID;
  1074.             if (SqlServer.RunSql(sql))
  1075.             {
  1076.                 string xmlfilename = GetConstructInfo(this.ConID)[0]["JcZFName"].ToString();
  1077.                 if (xmlfilename != "")
  1078.                 {
  1079.                     string filename = this.SetupExecution.Value;
  1080.                     string checker = cui.EmpName;
  1081.                     string time = DateTime.Now.ToString();
  1082.                     string type = ProjectImplment.GetEmpType(cui.EmpID);
  1083.                     XML xml1 = new XML(path + "\DocTemplateCon\" + xmlfilename);
  1084.                     xml1.AddXmlNode(new DocumentNode(filename, checker, time, type));//将基层上报的文档信息写入XML文档
  1085.                 }
  1086.                 string ZgJdDocumentXml = GetConstructInfo(this.ConID)[0]["ZgJdDocumentXml"].ToString();
  1087.                 if (ZgJdDocumentXml == "")
  1088.                 {
  1089.                     ZgJdDocumentXml ="ProjectScheduleCollectDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  1090.                     sql = "update [Tb_Construct] set [ZgJdDocumentXml]='" + ZgJdDocumentXml + "' where [ConID]=" + this.ConID;
  1091.                     if (SqlServer.RunSql(sql))
  1092.                     {
  1093.                         XML xml = new XML();
  1094.                         xml.CreateXMLDocument(path + "\DocTemplateCon\" + ZgJdDocumentXml);
  1095.                     }
  1096.                 }
  1097.                 //WorkFlowOperation(ConID, "您已审核通过!",true);
  1098.                 if (CheckEmpTypeIsEqualBlockReason() == false)//基层单位类型在数据库中不存在!
  1099.                 {
  1100.                     WFInstADD("您已审核通过!", true);
  1101.                 }
  1102.                 else
  1103.                 {
  1104.                     WorkFolw workflow = new WorkFolw();
  1105.                     if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
  1106.                     {
  1107.                         EtongZwf etongzwf = new EtongZwf();
  1108.                         DataView dv = etongzwf.ColonyUserGetByActId(ActivityID);
  1109.                         int ParentRoleID = -1;
  1110.                         if (dv.Count > 0)
  1111.                         {
  1112.                             ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
  1113.                             ProjectImplment pi = new ProjectImplment();
  1114.                             DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
  1115.                             string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
  1116.                             ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
  1117.                         }
  1118.                     }
  1119.                 }
  1120.             }
  1121.             else
  1122.             {
  1123.                 Common.RunScript(this.Page, "操作失败,请检查数据!");
  1124.             }
  1125.         }
  1126.         //******************************************************监督实施*************************************************************
  1127.         if (MustChooseItem == 23)
  1128.         {
  1129.             if (this.BT_OpenDocument_CollectSetupExecution.Enabled == false)
  1130.             {
  1131.                 Common.RunScript(this.Page, "请确认汇总后再审核!");
  1132.                 return;
  1133.             }
  1134.             //string ZgJdTransaction = cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
  1135.             string ZgJdTransactor = cui.EmpName;
  1136.             if (this.TB_ZgJdIdea.Text.Length == 0)
  1137.             {
  1138.                 Common.RunScript(this.Page, "须给出意见");
  1139.                 return;
  1140.             }
  1141.             string ZgJdIdea = this.TB_ZgJdIdea.Text.Trim() + "  " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;//主管部门监督实施审核意见和审核时间
  1142.             string sql = "update [Tb_Construct] set [ZgJdTransactor]='" + ZgJdTransactor + "',[ZgJdIdea]='" + ZgJdIdea + "' where [ConID]=" + this.ConID;
  1143.             if (SqlServer.RunSql(sql))
  1144.             {
  1145.                 WorkFlowOperation(ConID, "您已审核通过!",true);
  1146.             }
  1147.             else
  1148.             {
  1149.                 Common.RunScript(this.Page, "操作失败,请检查数据!");
  1150.             }
  1151.         }
  1152.         //******************************************************下达监督意见*************************************************************
  1153.         if (MustChooseItem == 24)
  1154.         {
  1155.             string ZgXdTransactor = cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
  1156.             //string ZgXdIdea = "监督意见" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";//主管部门下达监督意见(电子文档)-----待续
  1157.             string ZgXdIdea = this.MakeMonitorIdea.Value;
  1158.             string sql = "update [Tb_Construct] set [ZgXdTransactor]='" + ZgXdTransactor + "',[ZgXdIdea]='" + ZgXdIdea + "' where [ConID]=" + this.ConID;
  1159.             if (SqlServer.RunSql(sql))
  1160.             {
  1161.                 string JcSBDocumentXml = GetConstructInfo(this.ConID)[0]["JcSBFName"].ToString();
  1162.                 if (JcSBDocumentXml == "")
  1163.                 {
  1164.                     JcSBDocumentXml = "ProjectPlanDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  1165.                     sql = "update [Tb_Construct] set [JcSBFName]='" + JcSBDocumentXml + "' where [ConID]=" + this.ConID;
  1166.                     if (SqlServer.RunSql(sql))
  1167.                     {
  1168.                         XML xml = new XML();
  1169.                         xml.CreateXMLDocument(path + "\DocTemplateCon\" + JcSBDocumentXml);
  1170.                     }
  1171.                 }
  1172.                 WorkFlowOperation(ConID,false);
  1173.                 WorkFolw workflow = new WorkFolw();
  1174.                 workflow.WFActInsUpdata(this.actinstanceid, 1, this.userid);
  1175.             }
  1176.             else
  1177.             {
  1178.                 Common.RunScript(this.Page, "操作失败,请检查数据!");
  1179.             }
  1180.         }
  1181.         //******************************************************上报本单位工程进度*************************************************************
  1182.         if (MustChooseItem == 25)
  1183.         {
  1184.             /*string JcSBTransactor = cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
  1185.             //string JcSBFName = "工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";//基层部门上报本单位工程进度说明书(电子文档)-----待续
  1186.             string JcSBFName = this.ReportProjectSchedule.Value;
  1187.             string sql = "update [Tb_Construct] set [JcSBTransactor]='" + JcSBTransactor + "' where [ConID]=" + this.ConID;
  1188.             if (SqlServer.RunSql(sql))
  1189.             {
  1190.                 WorkFlowOperation(ConID, "您已审核通过!",true);
  1191.             }
  1192.             else
  1193.             {
  1194.                 Common.RunScript(this.Page, "操作失败,请检查数据!");
  1195.             }*/
  1196.             string xmlfilename = GetConstructInfo(this.ConID)[0]["JcSBFName"].ToString();
  1197.             if (xmlfilename != "")
  1198.             {
  1199.                 string filename = this.ReportProjectSchedule.Value;
  1200.                 string checker = cui.EmpName;
  1201.                 string time = DateTime.Now.ToString();
  1202.                 string type = ProjectImplment.GetEmpType(cui.EmpID);
  1203.                 XML xml1 = new XML(path + "\DocTemplateCon\" + xmlfilename);
  1204.                 xml1.AddXmlNode(new DocumentNode(filename, checker, time, type));//将基层上报的文档信息写入XML文档
  1205.             }
  1206.             /*创建XML文档*/
  1207.             string ZgHzDocumentXml = GetConstructInfo(this.ConID)[0]["ZgHzFName"].ToString();
  1208.             if (ZgHzDocumentXml == "")
  1209.             {
  1210.                 ZgHzDocumentXml = "ProjectPlanCollectDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  1211.                 string sql = "update [Tb_Construct] set [ZgHzFName]='" + ZgHzDocumentXml + "' where [ConID]=" + this.ConID;
  1212.                 if (SqlServer.RunSql(sql))
  1213.                 {
  1214.                     XML xml = new XML();
  1215.                     xml.CreateXMLDocument(path + "\DocTemplateCon\" + ZgHzDocumentXml);
  1216.                 }
  1217.             }
  1218.             xmlfilename = GetConstructInfo(this.ConID)[0]["GcglFName"].ToString();
  1219.             if (xmlfilename == "")
  1220.             {
  1221.                 string GcglFileName = "ProjectPlanTotalCollectDocumentXml" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".xml";
  1222.                 string sql = "update [Tb_Construct] set [GcglFName]='" + GcglFileName + "' where [ConID]=" + this.ConID;
  1223.                 if (SqlServer.RunSql(sql))
  1224.                 {
  1225.                     XML xml = new XML();
  1226.                     xml.CreateXMLDocument(path + "\DocTemplateCon\" + GcglFileName);
  1227.                 }
  1228.             }
  1229.             //WorkFlowOperation(ConID, "您已审核通过!",true);
  1230.             if (CheckEmpTypeIsEqualBlockReason() == false)//基层单位类型在数据库中不存在!
  1231.             {
  1232.                 WFInstADD("您已审核通过!", true);
  1233.             }
  1234.             else
  1235.             {
  1236.                 WorkFolw workflow = new WorkFolw();
  1237.                 if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
  1238.                 {
  1239.                     EtongZwf etongzwf = new EtongZwf();
  1240.                     DataView dv = etongzwf.ColonyUserGetByActId(ActivityID);
  1241.                     int ParentRoleID = -1;
  1242.                     if (dv.Count > 0)
  1243.                     {
  1244.                         ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
  1245.                         ProjectImplment pi = new ProjectImplment();
  1246.                         DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
  1247.                         string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
  1248.                         ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
  1249.                     }
  1250.                 }
  1251.             }
  1252.         }
  1253.         //**********************************************************汇总工程进度*******************************************************************
  1254.         if (MustChooseItem == 26)
  1255.         {
  1256.             if (this.BT_OpenDocument_GatherProjectSchedule.Enabled == false)
  1257.             {
  1258.                 Common.RunScript(this.Page, "请确认汇总后再审核!");
  1259.                 return;
  1260.             }
  1261.             string ZgHzTransactor = cui.EmpName + "   " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute;
  1262.             //string ZgHzFName = "汇总工程进度" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".doc";//主管部门汇总工程进度表(电子文档)-----待续
  1263.             string ZgHzFName = this.GatherProjectSchedule.Value;
  1264.             string sql = "update [Tb_Construct] set [ZgHzTransactor]='" + ZgHzTransactor + "' where [ConID]=" + this.ConID;
  1265.             if (SqlServer.RunSql(sql))
  1266.             {
  1267.                 //WorkFlowOperation(ConID, "您已审核通过!",false);
  1268.                 //WFInstADD("您已审核通过!", true);
  1269.                 if (IsExsitNextWaitActivity() == false)
  1270.                 {
  1271.                     WFInstADD("您已审核通过!", false);
  1272.                 }
  1273.                 else
  1274.                 {
  1275.                     WorkFolw workflow = new WorkFolw();
  1276.                     if (workflow.WFActInsUpdata(actinstanceid, 1, userid))
  1277.                     {
  1278.                         EtongZwf etongzwf = new EtongZwf();
  1279.                         DataView dv = etongzwf.ColonyUserGetByActId(ActivityID);
  1280.                         int ParentRoleID = -1;
  1281.                         if (dv.Count > 0)
  1282.                         {
  1283.                             ParentRoleID = Convert.ToInt32(dv[0]["ParentRoleID"].ToString().Trim());
  1284.                             ProjectImplment pi = new ProjectImplment();
  1285.                             DataTable dt = pi.GetNextOperatorRole(ParentRoleID);
  1286.                             string nextCheckDepartment = dt.Rows[0]["OpName"].ToString();
  1287.                             ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您已经审核通过,转到『" + nextCheckDepartment + "』申核处理!');top.location.href='../Main.aspx';</script>");
  1288.                         }
  1289.                     }
  1290.                 }
  1291.             }
  1292.             else
  1293.             {
  1294.                 Common.RunScript(this.Page, "操作失败,请检查数据!");
  1295.             }
  1296.         }
  1297.         //******************************************************项目实施情况分析、上报***********************************************************
  1298.         if (MustChooseItem == 27)
  1299.         {
  1300.             if (this.BT_OpenDocument_ProjectAnalysis.Enabled == false)
  1301.             {
  1302.                 Common.RunScript(this.Page, "请确认汇总后再审核!");
  1303.                 return;
  1304.             }