Esempio n. 1
0
    protected void button1_Click(object sender, EventArgs e)
    {
        int    cengshu = 0;
        string bianhao = "";

        if (this.txtbianhao.Text.Trim() == "")
        {
            Response.Write("<script>alert('请先填写网络起点ID!');</script>");
            return;
        }
        else
        {
            bianhao = this.txtbianhao.Text.Trim();
        }

        int  u    = Convert.ToInt32(Session["jgqs"]);
        bool flag = registermemberBLL.isNet(Session["jglx"].ToString(), Convert.ToString(Session["jgbh"]), getBH());

        // if (!Jiegou.isValid(Convert.ToString(Session["jgbh"]), getMemberBH(), isAnZhi(), Convert.ToInt32(Session["jgqs"])))
        if (flag == false)
        {
            Response.Write(GetTran("000892", "您不能查看该网络"));
            return;
        }

        if (this.txtceng.Text.Trim() == "")
        {
            cengshu = 3;
        }
        else
        {
            try
            {
                cengshu = Convert.ToInt32(this.txtceng.Text.Trim());
            }
            catch
            {
                Response.Write("<script>alert('" + GetTran("000897", "显示层数输入格式错误") + "!');</script>");
                return;
            }
        }

        string loginBh = GetLoginMember();
        int    bhCw    = AjaxClass.GetLogoutCw1(this.txtbianhao.Text.Trim(), Convert.ToInt32(this.dropdownlist_qishu.SelectedValue), true);
        int    loginCw = AjaxClass.GetLogoutCw1(loginBh, Convert.ToInt32(this.dropdownlist_qishu.SelectedValue), true);
        int    showCs  = AjaxClass.GetShowCengS1(0);

        if (showCs - (bhCw - loginCw) < cengshu)
        {
            cengshu = showCs - (bhCw - loginCw);
        }

        this.WangLuoTu(bianhao, "", Convert.ToInt32(ViewState["isanzhi"].ToString()), cengshu, Convert.ToInt32(dropdownlist_qishu.SelectedValue), "");

        //------------------------
        SetDaoHang();
    }
Esempio n. 2
0
    private void GetView()
    {
        string aaa = Session["jgbh"].ToString();
        string r   = Convert.ToString(Session["jgbh"]);

        string s = getBH();

        int  u    = Convert.ToInt32(Session["jgqs"]);
        bool flag = registermemberBLL.isNet(Session["jglx"].ToString(), Convert.ToString(Session["jgbh"]), getBH());

        if (flag == false)
        {
            Response.Write(GetTran("000892", "您不能查看该网络"));
            return;
        }

        string bianhao = this.txtBh.Text.Trim();

        Session["jgbh"] = bianhao;
        if (Request.QueryString["type"] == null)
        {
            Session["xqbh"] = bianhao;
        }
        Session["jgqs"] = this.DropDownList1.SelectedValue;

        if (Session["jgqs"] == null || Session["jglx"] == null)
        {
            Response.Write(GetTran("000894", "调用错误"));
            Response.End();
        }

        Session["jgbh"] = Request.QueryString["bh"];

        bool err = false;

        try
        {
            if (this.TextBox1.Text == "")
            {
                this.TextBox1.Text = "3";
            }
            Convert.ToInt32(this.TextBox1.Text);
        }
        catch
        {
            err = true;
        }
        if (err)
        {
            Response.Write(GetTran("000899", "请输入正确的层位"));
        }
        else
        {
            Session["jgcw"] = Convert.ToInt32(this.TextBox1.Text);
        }
        int    cengshu = Convert.ToInt32(GetCengshu());
        string loginBh = GetLoginMember();
        int    bhCw    = AjaxClass.GetLogoutCw1(this.txtBh.Text.Trim(), Convert.ToInt32(this.DropDownList1.SelectedValue), true);
        int    loginCw = AjaxClass.GetLogoutCw1(loginBh, Convert.ToInt32(this.DropDownList1.SelectedValue), true);
        int    showCs  = AjaxClass.GetShowCengS1(0);

        if (showCs - (bhCw - loginCw) < cengshu)
        {
            cengshu = showCs - (bhCw - loginCw);
        }
        Session["jgcw"] = cengshu;
        if (Request.QueryString["type"] == null)
        {
            Session["jgbh"] = Session["xqbh"];
        }
        showData();
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Response.Cache.SetExpires(DateTime.Now);
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        if (Request.QueryString["bh"] != null)
        {
            Session["jgbh"] = Request.QueryString["bh"];

            string r = Convert.ToString(Session["jgbh"]);

            string s = getBH();
        }
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        if (!Page.IsPostBack)
        {
            BLL.CommonClass.CommonDataBLL.BindQishuList(dropdownlist_qishu, false);

            if (Request.QueryString["cengshu"] == null)
            {
                if (Session["jgcw"] == null)
                {
                    this.txtceng.Text = "3";
                }
                else
                {
                    this.txtceng.Text = Session["jgcw"].ToString();
                }
            }
            else
            {
                this.txtceng.Text = Request.QueryString["cengshu"].ToString();
            }

            if (Session["jgbh"] == null || Session["jgqs"] == null || Session["jglx"] == null)
            {
                Response.Write(GetTran("000894", "调用错误"));
                Response.End();
            }

            int  u    = Convert.ToInt32(Session["jgqs"]);
            bool flag = registermemberBLL.isNet(Session["jglx"].ToString(), Convert.ToString(Session["jgbh"]), getBH());

            // if (!Jiegou.isValid(Convert.ToString(Session["jgbh"]), getMemberBH(), isAnZhi(), Convert.ToInt32(Session["jgqs"])))
            if (flag == false)
            {
                Response.Write(GetTran("000892", "您不能查看该网络"));
                return;
            }

            if (Request.QueryString["SelectGrass"] != null)
            {
                dropdownlist_qishu.SelectedIndex = Convert.ToInt32(Request.QueryString["SelectGrass"].ToString());
            }
            if (Request.QueryString["isanzhi"] != null)
            {
                ViewState["isanzhi"] = Request.QueryString["isanzhi"];
            }

            if (Session["jgbh"] != null)
            {
                if (Session["jgbh"].ToString() != "")
                {
                    this.txtbianhao.Text = Session["jgbh"].ToString();
                    int cengshu = 0;
                    if (this.txtceng.Text.Trim() == "")
                    {
                        cengshu = 3;
                    }
                    else
                    {
                        try
                        {
                            cengshu = Convert.ToInt32(this.txtceng.Text.Trim());
                        }
                        catch
                        {
                            Response.Write("<script>alert('" + GetTran("000897", "显示层数输入格式错误") + "!');</script>");
                            return;
                        }
                    }

                    string loginBh = GetLoginMember();
                    int    bhCw    = AjaxClass.GetLogoutCw1(this.txtbianhao.Text.Trim(), Convert.ToInt32(this.dropdownlist_qishu.SelectedValue), true);
                    int    loginCw = AjaxClass.GetLogoutCw1(loginBh, Convert.ToInt32(this.dropdownlist_qishu.SelectedValue), true);
                    int    showCs  = AjaxClass.GetShowCengS1(0);

                    if (showCs - (bhCw - loginCw) < cengshu)
                    {
                        cengshu = showCs - (bhCw - loginCw);
                    }

                    this.WangLuoTu(Session["jgbh"].ToString(), "", Convert.ToInt32(ViewState["isanzhi"].ToString()), cengshu, Convert.ToInt32(dropdownlist_qishu.SelectedValue), "");
                }
            }

            //------------------------
            SetDaoHang();
        }
        Translations();
    }
Esempio n. 4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string bianhao = this.txtBh.Text.Trim();

        if (bianhao == "")
        {
            msg = "<script>alert('请输入编号!')</script>";
            return;
        }

        Session["jgbh"] = bianhao;

        Session["xqbh"] = bianhao;

        Session["jgqs"] = this.DropDownList1.SelectedValue;

        if (Session["jgqs"] == null || Session["jglx"] == null)
        {
            Response.Write(GetTran("000894", "调用错误"));
            Response.End();
        }

        if (Request.QueryString["bh"] != null)
        {
            Session["jgbh"] = Request.QueryString["bh"];
        }
        else
        {
            Session["jgbh"] = this.txtBh.Text.Trim();
        }

        string s = getBH();

        bool flag = registermemberBLL.isNet(Session["jglx"].ToString(), Convert.ToString(Session["jgbh"]), getBH());

        if (flag == false)
        {
            Response.Write(GetTran("000892", "您不能查看该网络"));
            return;
        }


        Session["jgqs"] = this.DropDownList1.SelectedValue;

        if (Session["jgqs"] == null || Session["jglx"] == null)
        {
            Response.Write(GetTran("000894", "调用错误"));
            Response.End();
        }

        if (Request.QueryString["bh"] != null)
        {
            Session["jgbh"] = Request.QueryString["bh"];
        }
        else
        {
            Session["jgbh"] = this.txtBh.Text.Trim();
        }

        bool err = false;

        try
        {
            Convert.ToInt32(this.TextBox1.Text);
        }
        catch
        {
            err = true;
        }
        if (err)
        {
            Response.Write(GetTran("000899", "请输入正确的层位"));
        }
        else
        {
            Session["jgcw"] = Convert.ToInt32(this.TextBox1.Text);
        }
        int    cengshu = Convert.ToInt32(GetCengshu());
        string loginBh = GetLoginMember();
        int    bhCw    = AjaxClass.GetLogoutCw1(this.txtBh.Text.Trim(), Convert.ToInt32(this.DropDownList1.SelectedValue), true);
        int    loginCw = AjaxClass.GetLogoutCw1(loginBh, Convert.ToInt32(this.DropDownList1.SelectedValue), true);
        int    showCs  = AjaxClass.GetShowCengS1(0);

        if (showCs - (bhCw - loginCw) < cengshu)
        {
            cengshu = showCs - (bhCw - loginCw);
        }
        Session["jgcw"] = cengshu;

        showData();

        SetDaoHang();
    }