protected void Page_Load(object sender, EventArgs e) { Permissions.ComRedirect(Page, Permissions.redirUrl); //可查看的网路 DataTable ky = WTreeBLL.GetKYWL(Session["Company"].ToString(), "0"); LitMaxWl.Text = ""; string firstky = Request.QueryString["EndNumber"] + ""; bool isQX = false; for (int i = 0; i < ky.Rows.Count; i++) { if (i == 0) { if (firstky == "") { firstky = ky.Rows[i]["number"].ToString(); } } if (firstky == ky.Rows[i]["number"].ToString()) { isQX = true; } LitMaxWl.Text = LitMaxWl.Text + "<a href='SST_TJ.aspx?EndNumber=" + ky.Rows[i]["number"].ToString() + "' style='color:gray;font-weight:" + (firstky == ky.Rows[i]["number"].ToString() ? "bold" : "") + "'>" + ky.Rows[i]["number"] + "</a> / "; } if (!isQX) { return; } if (Request.QueryString["number"] + "" == "") // 首次加载 { Number = GetNumberParent(firstky); } else { Number = Request.QueryString["number"]; } if (Request.QueryString["thnumber"] + "" == "") // 首次加载 { ThNumber = firstky; } else { ThNumber = Request.QueryString["thnumber"]; } EndNumber = firstky; //期数 string Qs = Request.QueryString["ExpectNum"]; if (String.IsNullOrEmpty(Qs)) { Qs = "1"; } //end Translations(); if (!IsPostBack && Request.QueryString["action"] == null) { //获取链路图 if (WTreeBLL.IsExistsNumber(ThNumber) && IsRoot(ThNumber, Qs, EndNumber)) { SetLianLuTu(EndNumber, ThNumber, Qs); } //设置默认层 string sql = "select cengshu from ViewLayer where type=0"; string count = DAL.DBHelper.ExecuteScalar(sql).ToString(); string _cs = count;// "2"; if (Session["WLTCS_C_T"] + "" != "") { _cs = Session["WLTCS_C_T"].ToString(); } cengs.SelectedValue = _cs; //加载表头 DataTable dt = WTreeBLL.GetWangLuoT("1", "0"); string title = "<tr id='tr" + Number + "' style='background-image:url(images/lmenu02.gif);height:25px'><td nimgcount='0' align='center' style='color:white'> " + GetTran("007321", "推荐结构") + "</td>"; for (int i = 0; i < dt.Rows.Count; i++) { string _fn = GetTran(dt.Rows[i]["FieldName"].ToString()); title = title + "<td align='center' style='color:white'>" + _fn + "</td>"; } litTitle.Text = title + "</tr>"; dt.Dispose(); BindQS(); } else if (Request.QueryString["action"] != null) //ajax 调用 { string temp = ""; string action = Request.QueryString["action"]; switch (action) { case "GetTree": temp = GetTree(Request.QueryString["nodeid"], Request.QueryString["ExpectNum"], Request.QueryString["thnumber"], Request.QueryString["model"], "1", "0", Session["Company"].ToString(), Session["LanguageCode"].ToString()); //Request.QueryString["nodeid"] 为父元素的编号 Response.ContentType = "text/xml"; break; case "SetImage": temp = SetImage(Request.QueryString["thnumber"], (Request.QueryString["img"]).ToLower(), Session["Company"].ToString()); Response.ContentType = "text/plain"; //文本 break; case "SetColor": temp = SetColor(Request.QueryString["thnumber"], Request.QueryString["model"], Request.QueryString["ExpectNum"], Request.QueryString["Tuannumber"], Session["Company"].ToString()); Response.ContentType = "text/plain"; //文本 break; } Response.Write(temp); Response.End(); } }