Exemple #1
0
        /// <summary>
        /// 更新历史记录页面
        /// </summary>
        public void UpdateHistory()
        {
            List <Object[]> result = DataPersistence.QueryTimeRange();

            HistoryList.BeginUpdate();
            HistoryList.Items.Clear();
            foreach (Object[] row in result)
            {
                ListViewItem item = new ListViewItem((String)row[3]);
                item.SubItems.Add((((DateTime)row[0]).ToLongTimeString()));
                item.SubItems.Add((((DateTime)row[1]).ToLongTimeString()));
                item.SubItems.Add(((Int64)row[4]).ToString());
                item.SubItems.Add(((String)row[2]));
                HistoryList.Items.Add(item);
            }
            HistoryList.EndUpdate();
        }