|
|
@@ -498,10 +498,12 @@ namespace UAS_DeviceMonitor
|
|
|
{
|
|
|
DeviceStatusQuerySQL.Append("select distinct de_code,de_name,dpc_status,dpc_id from device left join ");
|
|
|
DeviceStatusQuerySQL.Append("DEVICEPOLLINGCONFIG on dpc_decode=de_code ");
|
|
|
- if (WC != "全部")
|
|
|
+ if (WC != "全部" && LC != "全部")
|
|
|
+ DeviceStatusQuerySQL.Append(" where de_wccode='" + WC + "' and de_linecode='" + LC + "' ");
|
|
|
+ if (WC == "全部" && LC != "全部")
|
|
|
+ DeviceStatusQuerySQL.Append(" where de_linecode='" + LC + "' ");
|
|
|
+ if (WC != "全部" && LC == "全部")
|
|
|
DeviceStatusQuerySQL.Append(" where de_wccode='" + WC + "' ");
|
|
|
- if (LC != "全部")
|
|
|
- DeviceStatusQuerySQL.Append(" and de_linecode='" + LC + "' ");
|
|
|
DeviceStatusQuerySQL.Append("order by de_code");
|
|
|
}
|
|
|
PaintDeviceStatusControl(DeviceStatusQuerySQL.ToString());
|
|
|
@@ -566,27 +568,27 @@ namespace UAS_DeviceMonitor
|
|
|
PictureEdit pic = sender as PictureEdit;
|
|
|
DeviceStatusInfo dsi = new DeviceStatusInfo(pic.Name);
|
|
|
dsi.StartPosition = FormStartPosition.CenterScreen;
|
|
|
- dsi.Show();
|
|
|
+ dsi.ShowDialog();
|
|
|
}
|
|
|
|
|
|
private void Pic_MouseHover(object sender, EventArgs e)
|
|
|
{
|
|
|
//使用Tip显示轮询数据
|
|
|
- //PictureEdit pic = sender as PictureEdit;
|
|
|
- //DataTable dt = (DataTable)dh.ExecuteSql("select * from DEVICEPOLLINGLOG where dpg_id=(select max(dpg_id) from DEVICEPOLLINGLOG where dpg_decode='" + pic.Name + "')", "select");
|
|
|
- //if (dt.Rows.Count > 0)
|
|
|
- //{
|
|
|
- // sql.Clear();
|
|
|
- // sql.Append("开始时间" + dt.Rows[0]["dpg_starttime"].ToString() + "\n");
|
|
|
- // sql.Append("发送数据大小" + dt.Rows[0]["dpg_senddatasize"].ToString() + "字节\n");
|
|
|
- // sql.Append("接收数据大小" + dt.Rows[0]["dpg_receivedatasize"].ToString() + "字节\n");
|
|
|
- // sql.Append("轮询次数" + dt.Rows[0]["dpg_count"].ToString() + "次\n");
|
|
|
- // CommonTipController.ShowHint(sql.ToString(), pic.Name);
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // CommonTipController.ShowHint("暂无信息", pic.Name);
|
|
|
- //}
|
|
|
+ PictureEdit pic = sender as PictureEdit;
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select * from DEVICEPOLLINGLOG where dpg_id=(select max(dpg_id) from DEVICEPOLLINGLOG where dpg_decode='" + pic.Name + "')", "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("开始时间" + dt.Rows[0]["dpg_starttime"].ToString() + "\n");
|
|
|
+ sql.Append("发送数据大小" + dt.Rows[0]["dpg_senddatasize"].ToString() + "字节\n");
|
|
|
+ sql.Append("接收数据大小" + dt.Rows[0]["dpg_receivedatasize"].ToString() + "字节\n");
|
|
|
+ sql.Append("轮询次数" + dt.Rows[0]["dpg_count"].ToString() + "次\n");
|
|
|
+ CommonTipController.ShowHint(sql.ToString(), pic.Name);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ CommonTipController.ShowHint("暂无信息", pic.Name);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//重新展示设备图像界面
|