Ejemplo n.º 1
0
    protected void WangLuoTu_Commom(string TopBianhao, string isAnZhi_TuiJian)
    {
        //判断是否合法。
        if (DAL.MemberInfoDAL.SelectMemberExist(ViewState["bh"].ToString()) == false)
        {
            Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
            return;
        }

        if (TopBianhao != ViewState["bh"].ToString())
        {
            string fatherBh = ViewState["bh"].ToString();
            string sonBh    = TopBianhao;
            bool   flag     = registermemberBLL.isNet(ViewState["isAnZhi_TuiJian"].ToString(), fatherBh, sonBh);
            if (!flag)
            {
                Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
                return;
            }
        }

        if (isAnZhi_TuiJian == "az")
        {
            Divt1.InnerHtml = JieGouNew2.Direct_Table_New(getBH(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 1);
        }
        else
        {
            Divt1.InnerHtml = JieGouNew2.Direct_Table_New(getBH(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 2);
        }
    }
Ejemplo n.º 2
0
    protected void WangLuoTu_Commom(string TopBianhao, string isAnZhi_TuiJian)
    {
        //判断是否合法。
        if (TopBianhao != ViewState["bh"].ToString())
        {
            string fatherBh = ViewState["bh"].ToString();
            string sonBh    = TopBianhao;
            bool   flag     = registermemberBLL.isNet(ViewState["isAnZhi_TuiJian"].ToString(), fatherBh, TextBox1.Text);
            if (!flag)
            {
                Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
                return;
            }
        }

        if (isAnZhi_TuiJian == "az")
        {
            Divt1.InnerHtml = JieGouNew2.Direct_Table_New(Request.QueryString["bianhao"].ToString(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 1);
        }
        else
        {
            Divt1.InnerHtml = JieGouNew2.Direct_Table_New(Request.QueryString["bianhao"].ToString(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 2);
        }
        string icc = ViewState["ky"].ToString();

        SetDaoHang(icc);
    }
Ejemplo n.º 3
0
    //1:安置;2:推荐
    public static string Direct_Table_New(string bh, int qs, int isAnTj)
    {
        if (isAnTj == 1)
        {
            strAzTj = "az";
        }
        else
        {
            strAzTj = "tj";
        }

        SqlParameter[] spa = new SqlParameter[] {
            new SqlParameter("@number", bh),
            new SqlParameter("@ExpectNum", qs),
            new SqlParameter("@type", isAnTj)
        };
        qs1 = qs.ToString();
        DataTable dtNew = DAL.DBHelper.ExecuteDataTable("ShowNet", spa, CommandType.StoredProcedure);

        string toWidth = (JieGouNew2.GetFinalWidth(dtNew)).ToString();

        return("<table align='center' width='" + toWidth + "' style='margin-left:20px;'><tr><td align='left'>" + JieGouNew2.GetAll(dtNew, bh, isAnTj) + "<td/><tr></table>");
    }
Ejemplo n.º 4
0
    protected void Button1_Click(object sender, System.EventArgs e)
    {
        if (this.TextBox1.Text.Trim() == "")
        {
            Response.Write("<script>alert('请先填写网络起点编号!');</script>");
            return;
        }

        if (Convert.ToInt32(DBHelper.ExecuteScalar("select count(1) from MemberInfo where Number=@Number and ExpectNum<=@ExpectNum", new SqlParameter[] { new SqlParameter("@Number", TextBox1.Text.Trim()), new SqlParameter("@ExpectNum", DropDownList_QiShu.SelectedValue) }, CommandType.Text)) == 0)
        {
            TextBox1.Text = Session["Company"].ToString();
            Response.Write("<script>alert('该期数中没有这个会员!');</script>");
            return;
        }

        #region 判断查看网络图权限

        string tj = "";
        if (isAnZhi())
        {
            tj = " type=1 ";
        }
        else
        {
            tj = " type=0 ";
        }

        //DataTable dt = DAL.DBHelper.ExecuteDataTable("Select  number From ViewManage Where ManageId = '" + Session["Company"].ToString() + "' and " + tj);
        //int flagCount = 0;
        //foreach (DataRow row in dt.Rows)
        //{
        //    if (row["number"].ToString() == TextBox1.Text)
        //    {
        //        flagCount = 0;
        //        break;
        //    }
        //    if (!registermemberBLL.isNet(ViewState["isAnZhi_TuiJian"].ToString(), row["number"].ToString(), TextBox1.Text))
        //    {
        //        flagCount++;
        //    }
        //}
        //if (flagCount > 0)
        //{
        //    Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
        //    return;
        //}

        #endregion

        int count = BLL.CommonClass.CommonDataBLL.getCountNumber(this.TextBox1.Text.Trim());
        if (count == 0)
        {
            TextBox1.Text = Session["Company"].ToString();
            Response.Write("<script>alert('该会员编号不存在!');</script>");
            return;
        }
        if (ViewState["isAnZhi_TuiJian"].ToString() == "az")
        {
            if (this.TextBox1.Text.Trim() != "")
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(this.TextBox1.Text.Trim(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 1);
            }
            else
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(ViewState["bh"].ToString(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 1);
            }
        }
        else
        {
            if (this.TextBox1.Text.Trim() != "")
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(this.TextBox1.Text.Trim(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 2);
            }
            else
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(ViewState["bh"].ToString(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 2);
            }
        }
        string icc = ViewState["ky"].ToString();
        SetDaoHang(icc);
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        // 在此处放置用户代码以初始化页面
        Response.Cache.SetExpires(DateTime.Now);
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        DataTable dt = Jiegou.ShowTopNumber("9999999999", isAnZhi());

        TextBox1.Text = "9999999999";
        string firstky = Request.QueryString["EndNumber"] + "";
        bool   isQX    = true;

        //for (int i = 0; i < dt.Rows.Count; i++)
        //{
        //    if (i == 0)
        //    {
        //        if (firstky == "")
        //            firstky = dt.Rows[i]["number"].ToString();
        //    }

        //    if (firstky == dt.Rows[i]["number"].ToString())
        //    {
        //        isQX = true;
        //    }


        //}
        ViewState["ky"] = firstky;

        if (!isQX)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("007461", "您没有权限查看!") + "')</script>");
            //Server.Transfer("first.aspx");
            return;
        }
        if (!IsPostBack)
        {
            if (Request.QueryString["isAnzhi"] != null)
            {
                if (Request.QueryString["isAnzhi"].ToString() == "az")
                {
                    ViewState["isAnZhi_TuiJian"] = "az";
                    Session["jglx"] = "az";

                    Button5.Visible = true;
                    Button6.Visible = true;
                }
                else
                {
                    Button2.Text = GetTran("000420", "常用");
                    ViewState["isAnZhi_TuiJian"] = "tj";
                    Session["jglx"] = "tj";
                }
            }
            else
            {
                if (Session["jglx"] == null)
                {
                    Session["jglx"] = "tj";
                }
            }

            ShowNumber();
            Button1.Attributes["onclick"] = "document.getElementById('txt_PressKeyFlag').value='y';";
            CommonDataBLL.BindQishuList(this.DropDownList_QiShu, false);
            Session["jgbh"] = getBH();

            if (Request.QueryString["net"] != null)
            {
                switch (Request.QueryString["net"].ToString().Trim())
                {
                case "tj":
                    ViewState["isAnZhi_TuiJian"] = "tj";
                    Button2.Text = GetTran("000420", "常用");
                    break;

                default:
                    ViewState["isAnZhi_TuiJian"] = "az";
                    break;
                }
            }
            //else
            //{
            //    ViewState["isAnZhi_TuiJian"] = "az";
            //}

            string asg = Request.QueryString["bianhao"] == null ? "" : Request.QueryString["bianhao"].ToString();
            if (asg != "")
            {
                int count = BLL.CommonClass.CommonDataBLL.getCountNumber(asg);
                if (count == 0)
                {
                    Response.Write("<script>alert('该会员编号不存在!');</script>");
                    return;
                }
                else
                {
                    this.TextBox1.Text = asg;
                    ViewState["bh"]    = asg;
                    this.DropDownList_QiShu.SelectedValue = Request.QueryString["SelectGrass"].ToString();
                    Session["jglx"] = ViewState["isAnZhi_TuiJian"].ToString();

                    this.WangLuoTu_Commom(asg, ViewState["isAnZhi_TuiJian"].ToString());
                }
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    this.TextBox1.Text = dt.Rows[0]["number"].ToString();
                    ViewState["bh"]    = TextBox1.Text;
                    this.DropDownList_QiShu.SelectedValue = CommonDataBLL.getMaxqishu().ToString();
                    int azTjFlag = 1;
                    azTjFlag        = ViewState["isAnZhi_TuiJian"].ToString() == "tj" ? 2 : 1;
                    Divt1.InnerHtml = JieGouNew2.Direct_Table_New(ViewState["bh"].ToString(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), azTjFlag);
                }
            }

            SetDaoHang(firstky);
        }
        txt_PressKeyFlag.Text = "n";
        Translations();
        Button1_Click(null, null);
    }
Ejemplo n.º 6
0
    public static string GetThree(DataTable dt, int isAnTj)
    {
        StringBuilder sb2 = new StringBuilder();

        DataRow[] row3;

        row3 = dt.Select("cengshu=3", "Xuhao");//第三层

        if (row3.Length == 0)
        {
            return("");
        }

        DataRow[] row2;

        row2 = dt.Select("cengshu=2", "Xuhao"); //第二层

        DataRow[] rowTeam;                      //第三层团队

        int firstWidth = 0;

        int endWidth = 0;

        int w2 = 0;

        int firstPLeft = 0;

        int firstPLeft1 = 0;

        int toWidth = JieGouNew2.GetFinalWidth(dt);

        int midWidth = 0;

        int leftWidth = 0;

        int rightWidth = 0;

        int toWidth2 = 0;

        if (row2.Length > 0)
        {
            toWidth2 = Convert.ToInt32(row2[row2.Length - 1]["LeftDistance"].ToString()) + Convert.ToInt32(row2[row2.Length - 1]["Lenth"].ToString());
        }

        //画横线
        int toWidth3 = (Convert.ToInt32(row3[row3.Length - 1]["LeftDistance"].ToString()) + Convert.ToInt32(row3[row3.Length - 1]["Lenth"].ToString()));

        sb2.Append("<table width='" + toWidth3 + "' cellspacing='0' cellpadding='0'><tr>");

        for (int i = 0; i < row2.Length; i++)
        {
            rowTeam = dt.Select("shangji='" + row2[i]["number"] + "'", "Xuhao");

            w2 = 0;

            for (int k = 0; k < rowTeam.Length; k++)
            {
                firstPLeft = Convert.ToInt32(rowTeam[k]["Said"].ToString());

                if (firstPLeft == 0)
                {
                    firstPLeft = jianJu;
                }

                w2 += firstPLeft + Convert.ToInt32(rowTeam[k]["Lenth"].ToString());


                if (k == 0)
                {
                    firstWidth = Convert.ToInt32(rowTeam[k]["Lenth"].ToString());

                    firstPLeft1 = Convert.ToInt32(rowTeam[k]["Said"].ToString());
                }

                if (k == rowTeam.Length - 1)
                {
                    endWidth = Convert.ToInt32(rowTeam[k]["Lenth"].ToString());
                }
            }

            leftWidth = firstPLeft1 + (firstWidth / 2) - 2;

            rightWidth = (endWidth / 2) - 2;

            midWidth = w2 - leftWidth - rightWidth - firstPLeft1 + 4;

            if (rowTeam.Length > 1)
            {
                sb2.Append("<td  width='" + w2 + "'><table width='100%' cellspacing='0' cellpadding='0' border='0' ><tbody><tr><td width='" + leftWidth + "' height=\"2\"></td><td width='" + midWidth + "' background=\"images/images03_05.gif\"  > </td><td width='" + rightWidth + "'></td></tr></tbody></table></td>");
            }
            else
            {
                leftWidth = w2 / 3;

                midWidth = w2 / 3;

                rightWidth = w2 - leftWidth - midWidth;

                sb2.Append("<td  width='" + w2 + "'><table width='100%' cellspacing='0' cellpadding='0' border='0' ><tbody><tr><td width='" + w2 + "' height=\"2\"></td><td width='" + midWidth + "' > </td><td width='" + rightWidth + "'></td></tr></tbody></table></td>");
            }
        }


        sb2.Append("</tr></table>");

        //画竖线和第三层总余新
        sb2.Append("<table width='" + toWidth3 + "' cellspacing='0' cellpadding='0'><tr>");

        int tw2 = 0;

        for (int i = 0; i < row2.Length; i++)
        {
            rowTeam = dt.Select("shangji='" + row2[i]["number"] + "'", "Xuhao");

            w2 = 0;

            tw2 = Convert.ToInt32(row2[i]["Lenth"]);

            for (int k = 0; k < rowTeam.Length; k++)
            {
                firstWidth = Convert.ToInt32(rowTeam[k]["Lenth"].ToString());
                firstPLeft = Convert.ToInt32(rowTeam[k]["Said"].ToString());

                if (firstPLeft == 0)
                {
                    firstPLeft = jianJu;
                }

                if (firstWidth % 2 == 1)
                {
                    leftWidth  = firstWidth / 2;
                    rightWidth = firstWidth / 2 - 1;
                }
                else
                {
                    leftWidth  = firstWidth / 2 - 2;
                    rightWidth = firstWidth / 2;
                }

                sb2.Append("<td width='" + (Convert.ToInt32(rowTeam[k]["Lenth"].ToString()) + Convert.ToInt32(rowTeam[k]["Said"].ToString())) + "' valign='top'>");
                sb2.Append("<table width='100%' cellspacing='0' cellpadding='0' border='0' >");
                sb2.Append("<tbody>");

                sb2.Append("<tr><td width='" + firstPLeft + "'><table width='100%'><tbody><tr><td>&nbsp;</td></tr></tbody></table></td><td width='" + rowTeam[k]["Lenth"].ToString() + "'><table width='100%' cellspacing='0' cellpadding='0' border='0' ><tbody><tr><td width='" + leftWidth + "' height=\"18\"></td><td width=\"2\" background=\"images/images02_02.gif\"  > </td><td width='" + rightWidth + "'></td></tr></tbody></table></td></tr>");

                sb2.Append("<tr><td width='" + firstPLeft + "' ><table width='100%'><tbody><tr><td>&nbsp;</td></tr></tbody></table></td><td width='" + rowTeam[k]["Lenth"].ToString() + "'>" + GetOneTable(dt, rowTeam[k]["number"].ToString(), isAnTj) + "</td></tr>");

                sb2.Append("</tbody></table></td>");
            }
        }

        sb2.Append("</tr></table>");

        return(sb2.ToString());
    }
Ejemplo n.º 7
0
    protected void Button1_Click(object sender, System.EventArgs e)
    {
        if (this.TextBox1.Text.Trim() == "")
        {
            Response.Write("<script>alert('" + GetTran("007307", "请先填写网络起点编号") + "!');</script>");
            return;
        }
        if (DAL.MemberInfoDAL.SelectMemberExist(this.TextBox1.Text.Trim()) == false)
        {
            Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
            return;
        }
        bool flag = registermemberBLL.isNet(Session["jglx"].ToString(), Convert.ToString(Session["jgbh"]), getBH());

        if (flag == false)
        {
            Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
            return;
        }

        if (ViewState["isAnZhi_TuiJian"].ToString() == "az")
        {
            if (WTreeBLL.IsRoot(this.TextBox1.Text.Trim(), this.DropDownList_QiShu.SelectedValue, GetLoginMember()) == false)
            {
                Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
                return;
            }
        }
        else
        {
            if (WTreeBLL.IsRoot_II(this.TextBox1.Text.Trim(), this.DropDownList_QiShu.SelectedValue, GetLoginMember()) == false)
            {
                Response.Write("<script>alert('" + GetTran("000892", "您不能查看该网络") + "');</script>");
                return;
            }
        }

        if (ViewState["isAnZhi_TuiJian"].ToString() == "az")
        {
            if (this.TextBox1.Text.Trim() != "")
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(this.TextBox1.Text.Trim(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 1);
            }
            else
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(ViewState["bh"].ToString(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 1);
            }
        }
        else
        {
            if (this.TextBox1.Text.Trim() != "")
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(this.TextBox1.Text.Trim(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 2);
            }
            else
            {
                Divt1.InnerHtml = JieGouNew2.Direct_Table_New(ViewState["bh"].ToString(), Convert.ToInt32(this.DropDownList_QiShu.SelectedValue), 2);
            }
        }

        SetDaoHang();
    }