Ejemplo n.º 1
0
        private void SetupControls()
        {
            _controls = new ControlsAccess();
            _events   = new EventViewController(_controls);
            _messages = new MessageViewController(_controls);
            Setup();

            if (!_events.LoadEvents())
            {
                MessageBox.Show("Unable to save some or all events.", "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                _error = true;
            }

            EIV.UpdateEvents(DateTime.Today);
            SEIV.UpdateEvents();
            UpdateEventList();

            if (!_messages.LoadMessages())
            {
                MessageBox.Show("Unable to save some or all messages.", "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                _error = true;
            }

            MMV.UpdateMessagesView();
        }
Ejemplo n.º 2
0
        internal void RefreshEventSearch()
        {
            SEIV.ClearEventInfo();

            string   searchTerm = SearchTB.Text;
            DateTime start      = UseStartDate.Checked ? DateTime.Parse(SearchStartDP.Date).Date : DateTime.MaxValue;
            DateTime end        = UseEndDate.Checked ?
                                  DateTime.Parse(SearchEndDP.Date).Date.AddHours(23).AddMinutes(59).AddSeconds(59)
                : DateTime.MinValue;

            SEIV.UpdateEvents(start, end, searchTerm);
        }