// 设置查询条件 public bool SetFilter(string strStationId, DateTime timeStart, DateTime timeEnd, bool TimeSelect) { List <CEntityVoltage> voltageList = new List <CEntityVoltage>(); // 清空所有状态 ClearAllState(); m_strStaionId = strStationId; m_dateTimeStart = timeStart; m_dateTimeEnd = timeEnd; //m_proxyVoltage.SetFilter(strStationId, timeStart, timeEnd, TimeSelect); try { voltageList = m_proxyVoltage.SetFilterData(strStationId, timeStart, timeEnd, TimeSelect); } catch (Exception e) { MessageBox.Show("数据库忙,查询失败,请稍后再试!"); return(false); }; // 并查询数据,显示第一页 this.OnMenuFirstPage(this, null); base.TotalPageCount = m_proxyVoltage.GetPageCount(); base.TotalRowCount = m_proxyVoltage.GetRowCount(); SetVoltage(voltageList); return(true); }
public bool SetFilter(string iStationId, DateTime timeStart, DateTime timeEnd, bool TimeSelect) { bool result = false; List <CEntityVoltage> voltageList = new List <CEntityVoltage>(); m_annotation.Visible = false; base.ClearAllDatas(); try { voltageList = m_proxyVoltage.SetFilterData(iStationId, timeStart, timeEnd, TimeSelect); }catch (Exception e) { return(result); } int rowcount = voltageList.Count; if (rowcount > CI_Chart_Max_Count) { // 数据量太大,退出绘图 MessageBox.Show("查询结果集太大,自动退出绘图"); return(result); } result = this.AddVoltages(voltageList); return(result); }