Beispiel #1
0
        public void NW_Node_GetList()
        {
            Class.NW_Node cls = new Class.NW_Node();
            DataTable     dt  = cls.NW_Node_GetList();

            gridItem.DataSource = dt;
        }
Beispiel #2
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();
        }
Beispiel #3
0
 void NW_Node_GetList()
 {
     Class.NW_Node cls = new Class.NW_Node();
     DataTable dt = cls.NW_Node_GetList();
     gridItemNode.DataSource = dt;
 }
Beispiel #4
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();
        }