Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string url = HttpContext.Current.Request.Url.Query;
            int    id  = int.Parse(url.Substring(1));

            EpControl ec = new EpControl();
            bind_errornode(ec.getnodelist(id));
        }
    }
Example #2
0
    protected void btn_epn_Click(object sender, ImageClickEventArgs e)
    {
        EpControl ec = new EpControl();

        this.Label_sumstate.Text = ec.host_state_num('0').ToString();
        if (this.Label_sumstate.Text != Session["ErrorHost"].ToString())
        {
            IList <SC_HOST> lsh_0 = get_my_schost(get_my_lanlist(), ec.host_state_control('0'));
            IList <SC_HOST> lsh_1 = get_my_schost(get_my_lanlist(), ec.host_state_control('1'));
            IList <SC_HOST> lsh_2 = get_my_schost(get_my_lanlist(), ec.host_state_control('2'));
            IList <SC_HOST> lsh_3 = get_my_schost(get_my_lanlist(), ec.host_state_control('3'));
            IList <SC_HOST> lsh_4 = get_my_schost(get_my_lanlist(), ec.host_state_control('4'));
            IList <SC_HOST> lsh_5 = get_my_schost(get_my_lanlist(), ec.host_state_control('5'));
            IList <SC_HOST> lsh_6 = get_my_schost(get_my_lanlist(), ec.host_state_control('6'));


            this.Label_state.Text = (lsh_1.Count + lsh_2.Count + lsh_3.Count + lsh_4.Count + lsh_5.Count + lsh_6.Count).ToString();
            int i = 0;
            for (i = 0; i < lsh_2.Count; i++)
            {
                lsh_1.Add(lsh_2[i]);
            }
            for (i = 0; i < lsh_3.Count; i++)
            {
                lsh_1.Add(lsh_3[i]);
            }
            for (i = 0; i < lsh_4.Count; i++)
            {
                lsh_1.Add(lsh_4[i]);
            }
            for (i = 0; i < lsh_5.Count; i++)
            {
                lsh_1.Add(lsh_5[i]);
            }
            for (i = 0; i < lsh_6.Count; i++)
            {
                lsh_1.Add(lsh_6[i]);
            }
            for (i = 0; i < lsh_0.Count; i++)
            {
                lsh_1.Add(lsh_0[i]);
            }

            bind_errorhost(lsh_1);
            Response.Write("<script language='javascript'>alert('当前告警主机数为:" + this.Label_state.Text + "');</script>");
            Session["ErrorHost"] = this.Label_sumstate.Text;
        }
    }
Example #3
0
    protected void btn_epn_Click(object sender, ImageClickEventArgs e)
    {
        EpControl ec = new EpControl();

        this.Label_sumstate.Text = ec.host_state_num('0').ToString();
        if (this.Label_sumstate.Text != Session["ErrorHost"].ToString())
        {
            IList <SC_HOST> lsh   = get_my_schost(get_my_lanlist(), ec.host_state_control('0'));
            IList <SC_HOST> lsh_n = get_my_schost(get_my_lanlist(), ec.host_state_control('1'));

            this.Label_state.Text = lsh.Count.ToString();

            for (int i = 0; i < lsh_n.Count; i++)
            {
                lsh.Add(lsh_n[i]);
            }
            bind_errorhost(lsh);
            Response.Write("<script language='javascript'>alert('当前告警主机数为:" + this.Label_state.Text + "');</script>");
            Session["ErrorHost"] = this.Label_sumstate.Text;
        }
    }
Example #4
0
    protected int CheckEquipments()
    {
        EpControl ec = new EpControl();

        return(ec.host_state_num('0'));
    }