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(邮编)
                //txtCorpName.Text = CI.FullName;
                //txtLawMan.Text = CI.LawMan;
                //txtCorpAddress.Text = CI.Address;
                //txtLawManTel.Text = CI.ContactorTel;
                //txtLawManCode.Text = CI.PostCode;
                //txtLinkName.Text = CI.Contactor;
                //txtLinkTel.Text = CI.ContactorTel;
                //txtLinkPCode.Text = CI.PostCode;

                //lblApplyPerson.Text = Convert.ToString(Session["RealName"]);
                //lblApplyDate.Text = DateTime.Now.ToShortDateString();

                ViewState["ACCIDENTGUID"] = Request.QueryString["GUID"];
                CawInfoAccident CIA = new CawInfoAccident();
                Detail_CAW_ACCIDENT DCAI= CIA.Select(ViewState["ACCIDENTGUID"] as string);
                this.lblAccidentAddress.Text = DCAI.OCCURRENCEADDR;
                this.lblAccidentCmpName.Text = DCAI.UNITNAME;
                this.lblAccidentTime.Text = DCAI.OCCURRENCETIME.ToString();
                this.txtShortDscp.Text = DCAI.PROCESS;
                this.txtResion.Text = DCAI.ANALYSE;
                this.hfCmpGUID.Value = DCAI.COMPANYGUID;

                //生产新的实例Guid,上传附件需要用到
                ViewState["Guid"] = Guid.NewGuid().ToString();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string Guid = Request.QueryString["Guid"].ToString();
                //获取明细
                Detail_CAW_ACCIDENT CACD = new CawInfoAccident().Select(Guid);
                lblStatus.Text = CACD.DATASTATUS_NAME;

                txtUNITNAME.Text = CACD.UNITNAME;
                this.txtLINKMAN.Text = CACD.LINKMAN;
                this.txtMOBILE.Text = CACD.MOBILE;
                this.txtLEGALPERSON.Text = CACD.LEGALPERSON;
                this.txtBASICINFO.Text = CACD.BASICINFO;
                this.txtLEGALAREA.Text = CACD.LEGALAREA;
                this.dtbOCCURRENCETIME.Text = CACD.OCCURRENCETIME.ToShortDateString();
                this.ddlType.SelectedValue = CACD.TYPE.ToString();
                this.txtESTIMATELOSS.Text = CACD.ESTIMATELOSS.ToString();
                this.txtDEATHTOLL.Text = CACD.DEATHTOLL.ToString();
                this.txtOCCURRENCEADDR.Text = CACD.OCCURRENCEADDR;
                this.ddlBerth.SelectedIndex = this.ddlBerth.Items.IndexOf(this.ddlBerth.Items.FindByText(CACD.BERTHNAME));
                this.txtDEEPWOUNDTOLL.Text = CACD.DEEPWOUNDTOLL.ToString();
                this.ddlBWYT.SelectedValue = CACD.BERTHUSUAGE.ToString();
                this.txtPROCESS.Text = CACD.PROCESS;
                this.txtANALYSE.Text = CACD.ANALYSE;
                this.txtRESCUEINFO.Text = CACD.RESCUEINFO;
                this.txtREMARK.Text = CACD.REMARK;
                this.ddlREASONTYPE.SelectedValue = CACD.REASONTYPE.ToString();
                this.ntxtEMPLOYEECOUNT.Text = CACD.EMPLOYEECOUNT.ToString();
                ViewState["Guid"] = Guid;
                ViewState["CurrStatus"] = CACD.DATASTATUS;
                //根据传入的参数进行按钮的可见和可用设置
                //根据明细判断:审核用(按钮全隐藏)
                //数据状态:0保存未提交(可修改);1提交待审批(不可修改);2审批通过(不可修改);3退回(可修改);4审批暂停(可修改)
                //从岸线申请中获取项目名称

                //以下为按钮控制
                bool InCheck = false;
                if (Request.QueryString["InCheck"] != null)
                {
                    InCheck = true;
                }
                //注意传入的按钮顺序,如果没有则填null,分别为:保存按钮、提交按钮、返回按钮、添加附件按钮
                new CommonFun().SetBtnStatus(InCheck, CACD.DATASTATUS, btnEdit, btnSubmit, btnReturn, null);
            }
            //获取相关附件
        }