protected void Page_Load(object sender, System.EventArgs e) { if (!base.IsPostBack) { this.txtAgent.Attributes["ReadOnly"] = "true"; this.txtName.Attributes["ReadOnly"] = "true"; this.txtBusinessman.Attributes["ReadOnly"] = "true"; this.txtOwner.Attributes["ReadOnly"] = "true"; this.txtDutyPerson.Attributes["ReadOnly"] = "true"; this.hfldIsEditProjectCode.Value = this.isEditProjectCode; this.dropBind(); if (base.Request["Action"].ToString() == "Add") { this.hfldPrjGuid.Value = System.Guid.NewGuid().ToString(); this.FileUpload1.Class = "ProjectFile"; this.FileUpload1.RecordCode = this.hfldPrjGuid.Value; string str = ConfigHelper.Get("PMStatus"); if (str == "1") { this.hfldPrjState.Value = "7";//新建,状态直接为在建 } else { this.hfldPrjState.Value = "17";//待开工 } this.hfldPrjPeople.Value = base.UserCode; DataTable userInfo = TenderInfo.GetUserInfo(base.UserCode); if (userInfo.Rows.Count > 0) { this.txtName.Text = userInfo.Rows[0]["UserName"].ToString(); this.txtCorp.Text = userInfo.Rows[0]["CorpName"].ToString(); this.txtDuty.Text = userInfo.Rows[0]["Duty"].ToString(); this.txtPhone.Text = userInfo.Rows[0]["Phone"].ToString(); } IApplicationContext context = ContextRegistry.GetContext(); IProjectCode projectCode = context.GetObject("ProjectCode") as IProjectCode; this.txtPrjCode.Value = projectCode.CreateProjectCode(); } if (base.Request["Action"].ToString() == "Update") { this.hfldPrjGuid.Value = base.Request["PrjId"]; this.BindTxt(base.Request["PrjId"].ToString()); this.FileUpload1.Class = "ProjectFile"; this.FileUpload1.RecordCode = base.Request["PrjId"].ToString(); tenderBondSelect(base.Request["PrjId"]);//绑定投标保证金 return; } } else { if (!string.IsNullOrEmpty(this.dropprovince.SelectedValue)) { this.bindCity(); } } }