protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["ID"] != null && string.IsNullOrEmpty(Request.QueryString["ID"]) == false) { VPBLL.Company.CompanyHelper help = new VPBLL.Company.CompanyHelper(); List<VPBLL.Company.ABiCompany> list = help.getCompanyByID(Convert.ToInt32(Request.QueryString["ID"].ToString())); if (list != null && list.Count > 0) { VPBLL.Company.ABiCompany company = list[0]; this.companyIDHid.Value = company.ID.ToString(); this.companyCode.Value = company.CompanyCode; this.companyName.Value = company.CompanyName; } else { ClientScript.RegisterStartupScript(GetType(), "alertpwd", "<script>alert('未找到该公司相关信息');</script>"); } } } }