protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["leadto_IP_ID"] != null) { IP_ID = Request.QueryString["leadto_IP_ID"].ToString(); } B_IPOperation b_ipoperation = new B_IPOperation(); DataTable datatable = b_ipoperation.searchIP_pro_Class(); leadto_ID.DataSource = datatable; leadto_ID.DataBind(); leadto_ID.Items.Insert(0, new ListItem("最高所属分类", "0")); leadto_ID.SelectedValue = IP_ID; Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "plus/ADManage.aspx'>扩展功能</a></li><li><a href='IPManage.aspx'>其他功能</a></li><li><a href='InputClass.aspx'>添加分类</a></li>"); } }
protected string table() { string table_html = ""; DataTable pro_dt = b_ipOperation.searchIP_pro_Class(); if (pro_dt != null) { for (int i = 0; i < pro_dt.Rows.Count; i++) { DataTable city_dt = b_ipOperation.searchIP_city_Class(Convert.ToInt32(pro_dt.Rows[i]["class_ID"].ToString())); table_html = table_html + "<tr align=\"center\"><td>" + pro_dt.Rows[i][0] + "</td><td>" + getclassname(DataConverter.CLng(pro_dt.Rows[i][1])) + "</td><td align=\"left\"><b>" + pro_dt.Rows[i][2] + "</b></td><td align=\"right\"><a href=\"LookIP.aspx?class_ID=" + pro_dt.Rows[i]["class_ID"].ToString() + "\">查看IP</a> | <a href=\"InputClass.aspx?leadto_IP_ID=" + pro_dt.Rows[i][0] + "\">添加分类</a> | <a href=\"AlterClass.aspx?class_ID=" + pro_dt.Rows[i][0] + "\">修改分类</a> | <a href=\"InputIp.aspx?class_ID=" + pro_dt.Rows[i][0] + "\">添加IP</a> | <a href=\"IPManage.aspx?delete=yes&class_ID=" + pro_dt.Rows[i][0] + "\">删除</a></td></tr>"; for (int j = 0; j < city_dt.Rows.Count; j++) { table_html += "<tr align=\"center\"><td>" + city_dt.Rows[j][0] + "</td><td>" + getclassname(DataConverter.CLng(city_dt.Rows[j][1])) + "</td><td align=\"left\"> " + city_dt.Rows[j][2] + "</td><td align=\"right\"><a href=\"LookIP.aspx?class_ID=" + city_dt.Rows[j]["class_ID"].ToString() + "\">查看IP</a> | <a href=\"AlterClass.aspx?class_ID=" + city_dt.Rows[j][0] + "\">修改分类</a> | <a href=\"InputIp.aspx?class_ID=" + city_dt.Rows[j][0] + "\">添加IP</a> | <a href=\"IPManage.aspx?delete=yes&class_ID=" + city_dt.Rows[j][0] + "\">删除</a></td></tr>"; } } } return(table_html); }