/// <summary>
 /// 工程项目名称变化时,相应的信息跟随变化
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void ddlProjectName_IndexChanged(object sender, EventArgs e)
 {
     string Guid = ddlProjectName.SelectedValue; //试运行主键
     string StartWorkGuid = new CawBankTryRun().GetDetail(Guid).APPLYGUID;
     //从开工备案表中获取相应的数据
     Detail_CAW_BANK_STARTWORK CBSW = new CawBankStartWork().GetDetail(StartWorkGuid);
     if (CBSW.PROJECTNAME != null && CBSW.PROJECTNAME.Trim() != "") //存在该项目
     {
         txtContactor.Text = CBSW.CONTACTOR;
         txtContactorTel.Text = CBSW.CONTACTORTEL;
         txtCorName.Text = CBSW.CORNAME;
         txtSETITEMORG.Text = CBSW.SETITEMORG;
         txtDesignCheckOrg.Text = CBSW.DESIGNDEPART;
         txtInvestTotal.Text = CBSW.INVESTTOTAL;
         txtBuilderUnit.Text = CBSW.BUILDERUNIT;
         txtSUPUnit.Text = CBSW.SUPUNIT;
         txtDesignerUnit.Text = CBSW.DESIGNERUNIT;
     }
 }
        /// <summary>
        /// 工程项目名称变化时,相应的信息跟随变化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ddlProjectName_IndexChanged(object sender, EventArgs e)
        {
            string FileAcceptGuid = ddlProjectName.SelectedValue;
            string StartWorkGuid = new CawBankTryRun().GetDetail(CBFA.GetDetail(FileAcceptGuid).STARTWORKGUID).APPLYGUID;
            //从开工申请表中获取相应的数据
            Detail_CAW_BANK_STARTWORK CBSWDetail = new CawBankStartWork().GetDetail(StartWorkGuid);
            if (CBSWDetail.PROJECTNAME != null && CBSWDetail.PROJECTNAME.Trim() != "") //存在该项目
            {
                lbProjectAddress.Text = CBSWDetail.PROJECTADDRESS;
                lbCorName.Text = CBSWDetail.CORNAME;
                lbCorManager.Text = CBSWDetail.CORMANAGER;
                lbContactor.Text = CBSWDetail.CONTACTOR;
                lbContactorTel.Text = CBSWDetail.CONTACTORTEL;
                lbDesignerUnit.Text = CBSWDetail.DESIGNERUNIT;
                lbDesignerGrade.Text = CBSWDetail.DESIGNERGRADE;
                lbBuilderUnit.Text = CBSWDetail.BUILDERUNIT;
                lbBuilderGrade.Text = CBSWDetail.BUILDERGRADE;
                lbSupUnit.Text = CBSWDetail.SUPUNIT;
                lbSupUnitGrade.Text = CBSWDetail.SUPGRADE;
                lbSupervisionOrg.Text = CBSWDetail.SUPERVISIONORG;

            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //根据企业的ID,调用企业的基本信息的实体类,将基本信息自动填入文本框中
                CompanyInfo CI = new JCPT().SelectCompanyInfo(Session["ORGID"].ToString());
                // CI.Address (企业地址);  CI.Contactor(联系人); CI.ContactorTel(联系人电话); CI.FullName(企业全称);CI.ShortName(企业简称)
                // CI.LawMan(法人); CI.PostCode(邮编)
                txtCorAddress.Text = CI.Address + " " + CI.PostCode;
                dtApplyDate.Text = DateTime.Now.ToShortDateString();

                //从*试运行申请*表中获取项目名称
                List<Detail_CAW_BANK_TRYRUN> ProjectList = new CawBankTryRun().GetProject(Session["ORGID"].ToString());
                for (int i = 0; i < ProjectList.Count; i++)
                {
                    //项目名称,开工备案主键
                    ddlProjectName.Items.Add(new ListItem(ProjectList[i].PROJECTNAME, ProjectList[i].GUID));
                }

                //生产新的实例Guid,上传附件需要用到
                ViewState["Guid"] = Guid.NewGuid().ToString();
            }
            new CommonFun().GetAttachment(Convert.ToString(ViewState["Guid"]), phAtt, "Line", "Delete", 1);
        }