Example #1
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);
    }
Example #2
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);
        }
    }
Example #3
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);
    }
Example #4
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);
    }
Example #5
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();
    }