private void LoadAllHistoryData() { var probeName = ""; var startTime = new DateTime(); var endTime = new DateTime(); Invoke(new MethodInvoker(delegate { lblLoading.Visible = true; btnQuery.Text = @"查询中..."; btnQuery.Enabled = false; probeName = lstProbeName.SelectedValue.ToString(); startTime = Convert.ToDateTime(dateTimeStart.Text); endTime = Convert.ToDateTime(dateTimeEnd.Text); rbtnRealtime.Enabled = false; rbtnHistory.Enabled = false; })); var datas = GasConcentrationProbeData.FindHistaryData(probeName, startTime, endTime); // load监控系统原始数据M历史数据 LoadHistoryDataM(tChartM, datas); // load同一工序条件下瓦斯浓度变化值N历史数据 LoadHistoryDataN(tChartN, datas); // loadT2瓦斯浓度平均增加值Q历史数据 LoadHistoryDataT2(tChartT2); Invoke(new MethodInvoker(delegate { lblLoading.Visible = false; btnQuery.Text = @"查询"; btnQuery.Enabled = true; rbtnRealtime.Enabled = true; rbtnHistory.Enabled = true; })); }
/// <summary> /// loadT2瓦斯浓度平均增加值Q历史数据 /// </summary> private void LoadHistoryDataT2(TChart tChart) { var datas = GasConcentrationProbeData.FindHistaryData( T2Probe.ProbeId, Convert.ToDateTime(dateTimeStart.Text), Convert.ToDateTime(dateTimeEnd.Text) ); var sqlCnt = 0; if (datas.Length > 0) { sqlCnt = datas.Length; } if (sqlCnt > 0) { tChart.Header.Text = "T2瓦斯浓度平均增加值Q"; AddDataSet2TeeChart(tChart, datas, "T2"); } else { //Alert.alert("没有T2瓦斯浓度数据!"); tChart.Header.Text = "没有T2瓦斯浓度数据!"; } }