예제 #1
0
 public bool SetFilter(string iStationId, DateTime timeStart, DateTime timeEnd, bool TimeSelect)
 {
     m_annotation.Visible = false;
     ClearAllDatas();
     m_proxyWaterFlow.SetFilter(iStationId, timeStart, timeEnd, TimeSelect);
     if (-1 == m_proxyWaterFlow.GetPageCount())
     {
         // 查询失败
         // MessageBox.Show("数据库忙,查询失败,请稍后再试!");
         return(false);
     }
     else
     {
         // 并查询数据,显示第一页
         m_dMaxWaterFlow  = null;
         m_dMaxWaterStage = null;
         m_dMinWaterFlow  = null;
         m_dMinWaterStage = null;
         int iTotalPage = m_proxyWaterFlow.GetPageCount();
         int rowcount   = m_proxyWaterFlow.GetRowCount();
         if (rowcount > CI_Chart_Max_Count)
         {
             // 数据量太大,退出绘图
             MessageBox.Show("查询结果集太大,自动退出绘图");
             return(false);
         }
         for (int i = 0; i < iTotalPage; ++i)
         {
             // 查询所有的数据
             this.AddWaters(m_proxyWaterFlow.GetPageData(i + 1));
         }
         return(true);
     }
 }
예제 #2
0
 // 设置查询条件
 public bool SetFilter(string strStationId, DateTime timeStart, DateTime timeEnd, bool TimeSelect)
 {
     ClearAllState();
     m_strStaionId   = strStationId;
     m_dateTimeStart = timeStart;
     m_dateTimeEnd   = timeEnd;
     m_proxyWater.SetFilter(strStationId, timeStart, timeEnd, TimeSelect);
     if (-1 == m_proxyWater.GetPageCount())
     {
         // 查询失败
         MessageBox.Show("数据库忙,查询失败,请稍后再试!");
         return(false);
     }
     else
     {
         // 并查询数据,显示第一页
         this.OnMenuFirstPage(this, null);
         base.TotalPageCount = m_proxyWater.GetPageCount();
         base.TotalRowCount  = m_proxyWater.GetRowCount();
         SetWaters(m_proxyWater.GetPageData(1));
         return(true);
     }
 }