Beispiel #1
0
    /// <param name="bianhao">会员编号</param>
    /// <param name="tree"></param>
    /// <param name="state">是否安置状态</param>
    /// <param name="cengshu">层数</param>
    /// <param name="qishu">期数</param>
    /// <param name="storeid">店id</param>
    protected void WangLuoTu(string bianhao, string tree, int state, int cengshu, int qishu, string storeid)
    {
        //获得存储过程产生的树
        int       type  = 2;
        DataTable table = treeViewBLL.GetExtendTreeView_NewAz(bianhao, tree, cengshu, qishu, type, 0);
        string    str   = "";

        //循环拼出树

        str  = "<table id='tab_tr' border=\"0\" cellspacing=\"0\" cellpadding=\"0\"  class='tree_grid'>";
        str += "<tr>"
               + "<th align='center'>会员编号</th>"
               + "<th align='center' >层数</th>"
               + "<th align='center'>级别</th>"
               + "<th align='right'>新个分数</th>"
               + "<th align='right'>新网分数</th>"
               + "<th align='right'>新网人数</th>"
               + "<th align='right' >总网人数</th>"
               + "<th align='right' >总网分数</th>"

               + "</tr>";
        //循环拼出树

        int count = 0;

        foreach (DataRow row in table.Rows)
        {
            count++;

            string strStyle = "";
            if (count % 2 == 0)
            {
                strStyle = "background-color:#F1F4F8";//rgb(243,243,243)";
            }
            else
            {
                strStyle = " background-color:#FAFAFA";
            }
            str += "<tr style='" + strStyle + "' class=\"tr\" id='tr" + row["bh"].ToString() + "'  onmouseover=\"overIt(this)\" onmouseout=\"outIt(this)\">";
            str += "<td valing='middle'>" + row[0].ToString().Replace("─", "<img src='../images/011.gif'  align=absmiddle  border=0 />").Replace("☆", "<img src='../images/013.gif'  align=absmiddle  border=0 />").Replace("★", "<img src='../images/014.gif'  align=absmiddle  border=0 />").Replace("├", "<img src='../images/006.gif'  align=absmiddle  border=0 />").Replace("└", "<img src='../images/003.gif'  align=absmiddle  border=0 />").Replace("~", "<img src='../images/015.gif'  align=absmiddle  border=0 />").Replace("|", "<img src='../images/004.gif'  align=absmiddle  border=0 />") + "<img src='../images/1.png' class='img' align=absmiddle border=0 /></td>";
            str += "<td align='center' valing='middle' title='层数'>" + row[10].ToString() + "</td>";
            str += "<td align='left' valing='middle' title='级别'>" + row[1].ToString() + "</td>";
            str += "<td align='right' valing='middle' title='新个分数'>" + row[2].ToString() + "</td>";
            str += "<td align='right' valing='middle' title='新网分数'>" + row[3].ToString() + "</td>";
            str += "<td align='right' valing='middle' title='新网人数'>" + row[4].ToString() + "</td>";
            str += "<td align='right' valing='middle' title='总网人数'>" + row[5].ToString() + "</td>";
            str += "<td align='right' valing='middle' title='总网分数'>" + row[6].ToString() + "</td>";

            str += "</tr>";
        }
        str += "</table>";
        this.statr0.InnerHtml = str;
        //this.statr0.InnerHtml = str.Replace("_", "<img src='../images/02.gif' />").Replace("~", "<img src='../images/03.gif' />").Replace("|", "<img src='../images/04.gif' />");
    }
Beispiel #2
0
    /// <param name="bianhao">会员编号</param>
    /// <param name="tree"></param>
    /// <param name="state">是否安置状态</param>
    /// <param name="cengshu">层数</param>
    /// <param name="qishu">期数</param>
    /// <param name="storeid">店id</param>
    protected void WangLuoTu(string bianhao, string tree, int state, int cengshu, int qishu, string storeid)
    {
        //获取要显示的网络图字段
        DataTable dt = treeViewBLL.returnIsShowField();

        //获得存储过程产生的树
        int       type  = 0;//公司查看网络图
        DataTable table = treeViewBLL.GetExtendTreeView_NewAz(bianhao, tree, cengshu, qishu, type, 0);
        string    str   = "";

        //循环拼出树
        str  = "<table id='tab_tr' border=\"0\" cellspacing=\"0\" cellpadding=\"0\"  class='tree_grid'>";
        str += "<tr>"
               + "<th align='center'>会员编号</th>"
               + "<th align='center' >层数</th>";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            str += "<th align='right'>" + dt.Rows[i]["Name"].ToString() + "</th>";
        }
        str += "</tr>";
        int count = 0;

        foreach (DataRow row in table.Rows)
        {
            count++;

            string strStyle = "";
            if (count % 2 == 0)
            {
                strStyle = "background-color:#F1F4F8";//rgb(243,243,243)";
            }
            else
            {
                strStyle = " background-color:#FAFAFA";
            }
            str += "<tr style='" + strStyle + "'  class=\"tr\"  id='tr" + row["bh"].ToString() + "' onmouseover=\"overIt(this)\" onmouseout=\"outIt(this)\" onmousedown=\"down_tw(event,this)\">";
            str += "<td valing='middle'>" + row[0].ToString().Replace("─", "<img src='../images/011.gif'  align=absmiddle  border=0 />").Replace("☆", "<img src='../images/013.gif'  align=absmiddle  border=0 />").Replace("★", "<img src='../images/014.gif'  align=absmiddle  border=0 />").Replace("├", "<img src='../images/006.gif'  align=absmiddle  border=0 />").Replace("└", "<img src='../images/003.gif'  align=absmiddle  border=0 />").Replace("~", "<img src='../images/015.gif'  align=absmiddle  border=0 />").Replace("|", "<img src='../images/004.gif'  align=absmiddle  border=0 />") + "<img src='../images/1.png' class='img' align=absmiddle border=0 /></td>";
            str += "<td align='center' valing='middle' title='层数'>" + row[10].ToString() + "</td>";
            for (int k = 0; k < dt.Rows.Count; k++)
            {
                str += "<td align='right' valing='middle' title='" + dt.Rows[k]["Name"].ToString() + "'>" + row[dt.Rows[k]["Field"].ToString()].ToString() + "</td>";
            }
            str += "</tr>";
        }
        str += "</table>";
        this.statr0.InnerHtml = str;
    }