//获取树 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())); } }
//获取树 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.MemRedirect(Page, Permissions.redirUrl); EndNumber = Request.QueryString["endNumber"] + ""; if (EndNumber == "") { EndNumber = SfType.getBH().ToString(); } StartNumber = Request.QueryString["ThNumber"]; #region 当前会员,是否有权限访问该网络的会员 if (EndNumber != Session["Member"].ToString()) { Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');window.location.href='First.aspx';</script>"); return; } if (WTreeBLL.IsRoot(StartNumber, WTreeBLL.GetMaxQS(), Session["Member"].ToString()) == false) { Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');window.location.href='First.aspx';</script>"); return; } #endregion if (!IsPostBack) { BindQS(); BindData(); Translations(); } }
public void BindData() { string qs = DDLQs.SelectedValue; if (IsRoot(StartNumber, qs, SfType.getBH().ToString()) == false) { string maxqs = WTreeBLL.GetMaxQS(); string ts = GetTran("007315", "您没有权限") + "!"; if (IsRoot(StartNumber, maxqs, SfType.getBH().ToString())) { ts = GetTran("007319", "您查看的这期中没有这个会员,所以不能查看该网路") + "!"; } ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('" + ts + "');window.history.go(-1);</script>"); return; } object[] obj = WTreeBLL.GetLLTTree(qs, EndNumber, StartNumber, "3", "1"); SqlDataReader dr = (SqlDataReader)obj[0]; while (dr.Read()) { GridView1.Columns[0].HeaderText = GetTran("007323", "安置结构"); if (dr["Field"].ToString() == "PetName") { GridView1.Columns[1].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[1].Visible = false; } } if (dr["Field"].ToString() == "DaiShu") { GridView1.Columns[4].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[4].Visible = false; } } else if (dr["Field"].ToString() == "TJ") { GridView1.Columns[2].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[2].Visible = false; } } else if (dr["Field"].ToString() == "JiBie") { GridView1.Columns[3].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[3].Visible = false; } } else if (dr["Field"].ToString() == "XinGe") { GridView1.Columns[6].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[6].Visible = false; } } else if (dr["Field"].ToString() == "XinWang") { GridView1.Columns[7].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[7].Visible = false; } } else if (dr["Field"].ToString() == "XinRen") { GridView1.Columns[8].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[8].Visible = false; } } else if (dr["Field"].ToString() == "ZongRen") { GridView1.Columns[9].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[9].Visible = false; } } else if (dr["Field"].ToString() == "ZongFen") { GridView1.Columns[10].HeaderText = GetTran(dr["FieldName"].ToString(), ""); if (dr["IsVisible"].ToString() == "0") { GridView1.Columns[10].Visible = false; } } } dr.Close(); dr.Dispose(); GridView1.DataSource = (DataTable)obj[1]; GridView1.DataBind(); SetLianLuTu(StartNumber, Session["M_L_AZ"].ToString(), qs, SfType.getBH()); }