/// <summary> /// 网络图导航 /// </summary> private void SetDaoHang() { if (txtBh.Text != null && txtBh.Text != "") { if (Session["DHNumbers"] == null) { Session["DHNumbers"] = txtBh.Text; } else { if (Session["DHNumbers"].ToString().IndexOf(txtBh.Text) == -1) { Session["DHNumbers"] = Session["DHNumbers"].ToString() + "," + txtBh.Text; } string[] nums = Session["DHNumbers"].ToString().Split(new char[] { ',' }); foreach (string num in nums) { if (num != txtBh.Text) { IList <string> lists = Jiegou.GetNumberForTop(Session["jgbh"].ToString(), Convert.ToInt32(DropDownList1.SelectedValue), Session["jglx"].ToString() == "az"); int count = 0; foreach (string str in lists) { if (num == str) { count++; } } if (count == 0) { divDH.InnerHtml += "<a href='ShowNetWorkView.aspx?net=" + Session["jglx"].ToString() + "&SelectGrass=" + DropDownList1.SelectedValue + "&bh=" + num + "'>" + CommonDataBLL.GetPetNameByNumber(num) + "</a> →"; } } } } } else { Session["DHNumbers"] = ""; Session["DHNumbers"] = null; } }
/// <summary> /// 网络图导航 /// </summary> private void SetDaoHang() { if (txtbianhao.Text != null && txtbianhao.Text != "") { divDH.InnerHtml = GetTran("007032", "链路图") + ":"; if (Session["DHNumbers"] == null) { Session["DHNumbers"] = new string[2] { txtbianhao.Text, "" }; divDH.InnerHtml += "<a href='ShowNetworkViewNewTj.aspx?cengshu=" + txtceng.Text + "&SelectGrass=" + dropdownlist_qishu.SelectedValue + "&bh=" + txtbianhao.Text + "&isanzhi=0'>" + CommonDataBLL.GetPetNameByNumber(txtbianhao.Text) + "</a> →"; } else { string[] nums = Session["DHNumbers"] as string[]; if (nums[0] != txtbianhao.Text) { if (nums[1] != txtbianhao.Text) { nums[1] = txtbianhao.Text; } IList <string> lists = Jiegou.GetNumberForTop(nums[0], Convert.ToInt32(dropdownlist_qishu.SelectedValue), Session["jglx"].ToString() == "az"); int count = 0; foreach (string str in lists) { if (nums[1] == str) { count++; } } if (count == 0) { divDH.InnerHtml += "<a href='ShowNetworkViewNewTj.aspx?cengshu=" + txtceng.Text + "&SelectGrass=" + dropdownlist_qishu.SelectedValue + "&bh=" + nums[1] + "&isanzhi=0'>" + CommonDataBLL.GetPetNameByNumber(nums[1]) + "</a> →"; } else { string highNum = nums[1]; string numbers = ""; do { numbers += highNum + ","; highNum = Jiegou.GetHighNumber(highNum, Session["jglx"].ToString() == "az"); } while (highNum != nums[0]); numbers += nums[0] + ","; for (int i = numbers.Split(new char[] { ',' }).Length - 1; i >= 0; i--) { if (numbers.Split(new char[] { ',' })[i] != "") { divDH.InnerHtml += "<a href='ShowNetworkViewNewTj.aspx?cengshu=" + txtceng.Text + "&SelectGrass=" + dropdownlist_qishu.SelectedValue + "&bh=" + numbers.Split(new char[] { ',' })[i] + "&isanzhi=0'>" + CommonDataBLL.GetPetNameByNumber(numbers.Split(new char[] { ',' })[i]) + "</a> →"; } } } } else { divDH.InnerHtml += "<a href='ShowNetworkViewNewTj.aspx?cengshu=" + txtceng.Text + "&SelectGrass=" + dropdownlist_qishu.SelectedValue + "&bh=" + nums[0] + "&isanzhi=0'>" + CommonDataBLL.GetPetNameByNumber(nums[0]) + "</a> →"; } Session["DHNumbers"] = nums; } } else { Session["DHNumbers"] = ""; Session["DHNumbers"] = null; } }
/// <summary> /// 网络图导航 /// </summary> private void SetDaoHang() { divBack.InnerHtml = "<img src='images/bgback.gif' style=\"cursor:pointer;\" onclick=\"javascript:window.location.href='ShowNetWorkView.aspx?net=" + Session["jglx"].ToString() + "&SelectGrass=" + Session["jgqs"].ToString() + "&bh=" + Session["jgbh"].ToString() + "'\" />"; wanluo.InnerHtml = GetTran("007032", "链路图") + ":"; if (Session["DHNumbers"] == null) { Session["DHNumbers"] = new string[2] { Session["jgbh"].ToString(), "" }; wanluo.InnerHtml += "<a href='ShowNetworkBiaoGeView.aspx?net=" + Session["jglx"].ToString() + "&SelectGrass=" + Session["jgqs"].ToString() + "&bh=" + Session["jgbh"].ToString() + "'>" + CommonDataBLL.GetPetNameByNumber(Session["jgbh"].ToString()) + "</a> →"; } else { string[] nums = Session["DHNumbers"] as string[]; if (nums[0] != Session["jgbh"].ToString()) { if (nums[1] != Session["jgbh"].ToString()) { nums[1] = Session["jgbh"].ToString(); } IList <string> lists = Jiegou.GetNumberForTop(nums[0], Convert.ToInt32(Session["jgqs"].ToString()), Session["jglx"].ToString() == "az"); int count = 0; foreach (string str in lists) { if (nums[1] == str) { count++; } } if (count == 0) { wanluo.InnerHtml += "<a href='ShowNetworkBiaoGeView.aspx?net=" + Session["jglx"].ToString() + "&SelectGrass=" + Session["jgqs"].ToString() + "&bh=" + nums[1] + "'>" + CommonDataBLL.GetPetNameByNumber(nums[1]) + "</a> →"; } else { string highNum = nums[1]; string numbers = ""; do { numbers += highNum + ","; highNum = Jiegou.GetHighNumber(highNum, Session["jglx"].ToString() == "az"); } while (highNum != nums[0]); numbers += nums[0] + ","; for (int i = numbers.Split(new char[] { ',' }).Length - 1; i >= 0; i--) { if (numbers.Split(new char[] { ',' })[i] != "") { wanluo.InnerHtml += "<a href='ShowNetworkBiaoGeView.aspx?net=" + Session["jglx"].ToString() + "&SelectGrass=" + Session["jgqs"].ToString() + "&bh=" + numbers.Split(new char[] { ',' })[i] + "'>" + CommonDataBLL.GetPetNameByNumber(numbers.Split(new char[] { ',' })[i]) + "</a> →"; } } } } else { wanluo.InnerHtml += "<a href='ShowNetworkBiaoGeView.aspx?net=" + Session["jglx"].ToString() + "&SelectGrass=" + Session["jgqs"].ToString() + "&bh=" + nums[0] + "'>" + CommonDataBLL.GetPetNameByNumber(nums[0]) + "</a> →"; } Session["DHNumbers"] = nums; //if (Session["DHNumbers"].ToString().IndexOf(Session["jgbh"].ToString()) == -1) // Session["DHNumbers"] = Session["DHNumbers"].ToString() + "," + Session["jgbh"].ToString(); //string[] nums = Session["DHNumbers"].ToString().Split(new char[] { ',' }); //foreach (string num in nums) //{ // if (num != Session["jgbh"].ToString()) // { // IList<string> lists = Jiegou.GetNumberForTop(Session["jgbh"].ToString(), Convert.ToInt32(Session["jgqs"].ToString()), isAnZhi()); // int count = 0; // foreach (string str in lists) // { // if (num == str) // count++; // } // if (count == 0) // wanluo.InnerHtml += "<a href='ShowNetworkBiaoGeView.aspx?net=" + Session["jglx"].ToString() + "&SelectGrass=" + Session["jgqs"].ToString() + "&bh=" + num + "'>" + CommonDataBLL.GetPetNameByNumber(num) + "</a> →"; // } //} } }