Ejemplo n.º 1
0
        void LoadBieuDoNode()
        {
            Class.NW_Node   clsN     = new Class.NW_Node();
            Class.NW_Device clsDe    = new Class.NW_Device();
            DataTable       dtDevice = new DataTable();
            DataTable       dtNode   = clsN.NW_Node_GetList();

            dtNode.Columns.Add("TotalOn");
            dtNode.Columns.Add("TotalOff");
            int on  = 0;
            int off = 0;

            for (int i = 0; i < dtNode.Rows.Count; i++)
            {
                on             = 0; off = 0;
                clsDe.NodeCode = dtNode.Rows[i]["NodeCode"].ToString();
                dtDevice       = clsDe.NW_Device_GetByNodeCode();

                for (int j = 0; j < dtDevice.Rows.Count; j++)
                {
                    if (dtDevice.Rows[j]["Status"].ToString() == "online")
                    {
                        on++;
                    }
                    else
                    {
                        off++;
                    }
                }
                dtNode.Rows[i]["TotalOn"]  = on;
                dtNode.Rows[i]["TotalOff"] = off;
            }
            // load bieu do
            frmSignalChartDetail frm = new frmSignalChartDetail(dtNode);

            frm.ShowDialog();
        }
Ejemplo n.º 2
0
 private void chartUSSnr_DoubleClick(object sender, EventArgs e)
 {
     frmSignalChartDetail frm = new frmSignalChartDetail(dt, 3);
     frm.ShowDialog();
 }
Ejemplo n.º 3
0
        void LoadBieuDoNode()
        {
            Class.NW_Node clsN= new Class.NW_Node();
            Class.NW_Device clsDe= new Class.NW_Device();
            DataTable dtDevice = new DataTable();
            DataTable dtNode = clsN.NW_Node_GetList();
            dtNode.Columns.Add("TotalOn");
            dtNode.Columns.Add("TotalOff");
            int on = 0;
            int off = 0;
            for (int i = 0; i < dtNode.Rows.Count; i++)
            {
                on = 0; off = 0;
                clsDe.NodeCode=dtNode.Rows[i]["NodeCode"].ToString();
                dtDevice = clsDe.NW_Device_GetByNodeCode();

                for (int j = 0; j < dtDevice.Rows.Count; j++)
                {
                    if (dtDevice.Rows[j]["Status"].ToString() == "online")
                        on++;
                    else
                        off++;
                }
                dtNode.Rows[i]["TotalOn"] = on;
                dtNode.Rows[i]["TotalOff"] = off;
            }
            // load bieu do
            frmSignalChartDetail frm = new frmSignalChartDetail(dtNode);
            frm.ShowDialog();
        }
Ejemplo n.º 4
0
        private void chartRemote_DoubleClick(object sender, EventArgs e)
        {
            frmSignalChartDetail frm = new frmSignalChartDetail(dt, 0);

            frm.ShowDialog();
        }