/// <summary> /// /// </summary> /// <param name="begin"></param> /// <param name="end"></param> private void Query(DateTime begin, DateTime end) { // create year result data table // DataTable resultTable = CreateResultDataTable(); //this.SelectedStationCollection.GetWL1DataTable( foreach (StationClass st in this.SelectedStationCollection) { DeviceClass d = st.DeviceCollection[0]; double usedAmount = d.CalcUsedAmount(begin, end); // insert result row to year table // CreateAndAddRow(resultTable, st.StationName, begin, end, (int)usedAmount); } // bind result result data table to chart // BindDataToChart(resultTable); BindDataToGridView(resultTable); }