static void ReportAlarmInfoThread(object obj) { Hashtable data = obj as Hashtable; if (data.Contains("TYPE") && data.Contains("AlarmID")) { string Status = (string)data["TYPE"]; int nAlarmID = (int)data["AlarmID"]; AlarmInfo AlaInfo = new AlarmInfo(nAlarmID); AlaInfo.ServerWarningID = PostSever.PostWarningData(nAlarmID); string stDBid = DatabaseHandle.RecordAlarmToDB(AlaInfo); if (!string.IsNullOrEmpty(stDBid)) { AlarmDetailForm dlg = new AlarmDetailForm(stDBid, 1) { StartPosition = FormStartPosition.CenterParent }; dlg.ShowDialog(); dlg.Dispose(); } } }
public static void StopThread() { bool ret = PostSever.PostRunningData(3, m_shift, 0); DatabaseHandle.RecordStopToDB(ret); Runningdlg.Dispose(); Consumabledlg1.Dispose(); Alarmdlg.Dispose(); }
static void UpdateRunningDataThread(object obj) { Hashtable data = obj as Hashtable; if (data.Contains("TYPE") && data.Contains("Count")) { string Status = (string)data["TYPE"]; int ProduceCount = (int)data["Count"]; DatabaseHandle.RecordProduceToDB(ProduceCount); } }
private static void StartThread(object obj) { string shift = obj as string; DatabaseHandle.CreateTable(); bool ret = PostSever.PostRunningData(1, shift, 0); DatabaseHandle.RecordStartToDB(ret); Runningdlg.ThreadStart(); Consumabledlg1.ThreadStart(); Alarmdlg.ThreadStart(); }