private void btnCurrent_Click(object sender, EventArgs e) { try { string txt = "select * from Interfaces where NodeID=18"; Class.SolarWinds_Get clsSolarwind = new Class.SolarWinds_Get(); clsSolarwind.DateTime = DateTime.Now; DataTable dtSolarWind = clsSolarwind.SolarWinds_GetInterface(txt); gridItem.DataSource = dtSolarWind; } catch { } }
void LoadSolarwinds() { try { // string txt = "select * from Interfaces where NodeID=18 and InterfaceName LIKE 'Cable Downstream%' or InterfaceName ='gigaether15/0'"; string txt = "select * from Interfaces where NodeID=18"; Class.SolarWinds_Get clsSolarwind = new Class.SolarWinds_Get(); clsSolarwind.DateTime = DateTime.Now; DataTable dtSolarWind = clsSolarwind.SolarWinds_GetInterface(txt); gridItem.DataSource = dtSolarWind; } catch { } }
void Load_InsertInterface() { try { Waiting.ShowWaitForm(); Waiting.SetWaitFormDescription("Đang đọc và tải Interface từ SolarWinds"); string txt = "select * from Interfaces where NodeID=18"; Class.SolarWinds_Get clsSolarwind = new Class.SolarWinds_Get(); clsSolarwind.DateTime = DateTime.Now; clsSolarwind.StrDate = DateTime.Now.ToString("dd/MM/yyyy H") + "h"; DataTable dtSolarWind = clsSolarwind.SolarWinds_GetInterface(txt); if (dtSolarWind.Rows.Count > 0) clsSolarwind.Insert(dtSolarWind); Waiting.CloseWaitForm(); } catch { Waiting.CloseWaitForm(); } }