//获取树 public DataTable GetTree(string nodeid, string ExpectNum, string _thnumber, string model, string BrowserType, string IsPlacement, string ManageNum) //nodeid 为父元素id { if (!WTreeBLL.IsExistsNumber(_thnumber)) { return(null); } if (IsRoot(_thnumber, ExpectNum, EndNumber) == false) { //判断所有的可用网络中是否含有权限。 string maxqs = WTreeBLL.GetMaxQS(); string ts = GetTran("007461", " 您没有权限查看"); if (IsRoot(_thnumber, maxqs, EndNumber)) { ts = GetTran("007462", " 您查看的这期中没有这个会员,所以不能查看该网路!"); } Session["WLTCS_M_A_QS"] = null; Session["WLTCS_M_A"] = null; return(null); } else { return(WTreeBLL.GetTreePhone(nodeid, ExpectNum, _thnumber, model, BrowserType, IsPlacement, ManageNum, Session["LanguageCode"].ToString())); } }
protected void Page_Load(object sender, EventArgs e) { Permissions.MemRedirect(Page, Permissions.redirUrl); if (Request.QueryString["topnum"] == null) // 首次加载 { ThNumber = Session["member"].ToString(); } else { ThNumber = Request.QueryString["topnum"]; } EndNumber = Session["member"].ToString(); string Qs = BLL.CommonClass.CommonDataBLL.getMaxqishu().ToString(); //获取链路图 if (WTreeBLL.IsExistsNumber(ThNumber) && IsRoot(ThNumber, Qs, EndNumber)) { SetLianLuTu(EndNumber, ThNumber, Qs); Loadnumlist(ThNumber, EndNumber); } }
//获取树 public DataTable GetTree(string nodeid, string ExpectNum, string _thnumber, string model, string BrowserType, string IsPlacement, string ManageNum) //nodeid 为父元素id { if (!WTreeBLL.IsExistsNumber(_thnumber)) { return(null); } //if (IsRoot(_thnumber, ExpectNum, EndNumber) == false) //{ // //判断所有的可用网络中是否含有权限。 // string maxqs = WTreeBLL.GetMaxQS(); // string ts = GetTran("007461", " 您没有权限查看"); // if (IsRoot(_thnumber, maxqs, EndNumber)) // { // ts = GetTran("007462", " 您查看的这期中没有这个会员,所以不能查看该网路!"); // } // Session["WLTCS_M_A_QS"] = null; // Session["WLTCS_M_A"] = null; // return null; //} //else //{ //string sql = "select MobileTele from MemberInfo where number='" + Session["member"].ToString() + "'"; //DataTable shj = DBHelper.ExecuteDataTable(sql); //_thnumber = shj.Rows[0][0].ToString(); return(WTreeBLL.GetTreePhone(nodeid, ExpectNum, _thnumber, model, BrowserType, "0", ManageNum, Session["LanguageCode"].ToString())); // } }
//获取树 public string GetTree(string nodeid, string ExpectNum, string _thnumber, string model, string BrowserType, string IsPlacement, string ManageNum, string Language) //nodeid 为父元素id { if (!WTreeBLL.IsExistsNumber(_thnumber)) { return("<?xml version=\"1.0\" encoding=\"utf-8\"?><Root><Error>" + GetTran("007320", "您输入的会员编号不存在!") + "</Error></Root>"); } if (IsRoot(Request.QueryString["thnumber"], ExpectNum, EndNumber) == false) { //判断所有的可用网络中是否含有权限。 DataTable ky = WTreeBLL.GetKYWL(Session["Company"].ToString(), "0"); string maxqs = WTreeBLL.GetMaxQS(); string ts = GetTran("007461", "您没有权限查看"); for (int i = 0; i < ky.Rows.Count; i++) { //if (Request.QueryString["EndNumber"].ToString() != ky.Rows[i]["number"].ToString()) { if (IsRoot(Request.QueryString["thnumber"], maxqs, ky.Rows[i]["number"].ToString())) { ts = GetTran("007462", "您查看的这期中没有这个会员,所以不能查看该网路!"); break; } } } Session["WLTCS_C_T_QS"] = null; Session["WLTCS_C_T"] = null; return("<?xml version=\"1.0\" encoding=\"utf-8\"?><Root><Error>" + ts + "</Error></Root>"); } else { return(WTreeBLL.GetTree_II(nodeid, ExpectNum, _thnumber, model, BrowserType, IsPlacement, ManageNum, Session["LanguageCode"].ToString())); } }
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(); } }