| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using DevExpress.XtraEditors;
- using UAS_DeviceMonitor.DataOperate;
- using UAS_DeviceMonitor.Entity;
- using System.Data;
- using System.Text;
- using UAS_DeviceMonitor.PublicMethod;
- using System.Windows.Forms;
- using System.Drawing;
- namespace UAS_DeviceMonitor.Device.Infomation
- {
- public partial class DeviceStatusInfo : XtraForm
- {
- DataHelper dh = SystemInf.dh;
- StringBuilder sql = new StringBuilder();
- string de_code = "";
- public DeviceStatusInfo()
- {
- InitializeComponent();
- }
- public DeviceStatusInfo(string DevcieCode)
- {
- InitializeComponent();
- de_code = DevcieCode;
- Text = DevcieCode;
- }
- private void DeviceStatusInfo_Load(object sender, EventArgs e)
- {
- sql.Clear();
- sql.Append("select de_linecode,de_wccode,de_name,de_address from device ");
- sql.Append("where de_code='" + de_code + "'");
- DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
- if (dt.Rows.Count > 0)
- {
- BaseUtil.SetFormValue(Controls, dt);
- }
- dt = (DataTable)dh.ExecuteSql("select dpg_count,dpg_starttime,dpg_senddatasize,dpg_receivedatasize from DEVICEPOLLINGLOG where dpg_id=(select max(dpg_id) from DEVICEPOLLINGLOG where dpg_decode='" + de_code + "')", "select");
- if (dt.Rows.Count > 0)
- {
- BaseUtil.SetFormValue(Controls, dt);
- }
- }
- private void DeviceStatusInfo_MouseMove(object sender, MouseEventArgs e)
- {
- Point p = ParentForm.PointToScreen(e.Location);
- //Console.WriteLine(e.Location + " " + Top + " " + Right + " " + " " + Bottom + " " + Right);
- }
- }
- }
|