예제 #1
0
        public void ReloadGrid()
        {
            string date;

            exactmatch = false;

            if (startDate.Value.ToString() == "")
            {
                date = DateTime.Now.ToString();
            }
            else
            {
                date = startDate.Value.ToString();
            }
            DateTime  dtval = Convert.ToDateTime(date);
            DataTable dt    = new DataTable();

            if (EventTypeComboBox.SelectedIndex != -1)
            {
                if (EventTypeComboBox.SelectedIndex == 0)
                {
                    dt = VSWebBL.ConfiguratorBL.ELSBL.Ins.GetEventHistory();
                }
                else
                {
                    dt = VSWebBL.ConfiguratorBL.ELSBL.Ins.GetEventHistoryByLog(EventTypeComboBox.SelectedItem.Value.ToString());
                }
            }
            else
            {
                dt = VSWebBL.ConfiguratorBL.ELSBL.Ins.GetEventHistory(dtval.Month.ToString(), dtval.Year.ToString());
            }
            EventsHistory.DataSource = dt;
            EventsHistory.DataBind();
        }
예제 #2
0
        /// <summary>
        /// Add the specified event to the history.
        /// </summary>
        /// <param name="eventArgs">The <see cref="MouseHookEventArgs"/>.</param>
        private void AddEventToHistory(MouseHookEventArgs eventArgs)
        {
            if (HistoryLimit != 0)
            {
                if (EventsHistory.Count >= HistoryLimit && EventsHistory.Any())
                {
                    EventsHistory.RemoveAt(EventsHistory.Count - 1);
                }

                EventsHistory.Insert(0, eventArgs);
            }
        }
예제 #3
0
 protected void EventTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (EventTypeComboBox.SelectedIndex != -1)
     {
         DataTable dt = new DataTable();
         if (EventTypeComboBox.SelectedIndex == 0)
         {
             dt = VSWebBL.ConfiguratorBL.ELSBL.Ins.GetEventHistory();
         }
         else
         {
             dt = VSWebBL.ConfiguratorBL.ELSBL.Ins.GetEventHistoryByLog(EventTypeComboBox.SelectedItem.Value.ToString());
         }
         EventsHistory.DataSource = dt;
         EventsHistory.DataBind();
     }
 }