private void AddProtocolEventsToView()
 {
     this.protocolEvents = QProtocolEvents.SelectItemsByType(this.selectedEventType);
     foreach (ProtocolEvent protocolEvent in protocolEvents)
     {
         this.view.AddProtocolEventToView(protocolEvent);
     }
 }
 public ProtocolEventAddController(IProtocolEventAddView view)
 {
     this.view = view;
     this.view.SetController(this);
     this.protocolEvents        = new ArrayList();
     this.protocolEventTypes    = new ArrayList(QProtocolEvents.SelectTypes());
     this.SelectedProtocolEvent = null;
 }
Esempio n. 3
0
        public override void LoadView()
        {
            this.items.Clear();
            this.view.ClearView();
            IList columns = new ArrayList()
            {
                "ID", "Event Type", "Description", "Active"
            };

            this.view.AddListViewColumns(columns);
            this.view.ListTitle = "Protocol Events";
            items = QProtocolEvents.SelectItems();
            AddItemsToView();
            SetColumnsHeaderSize();
        }
Esempio n. 4
0
 private void DoInsert(ProtocolEvent item)
 {
     QProtocolEvents.InsertItem(item, loginInfo.UserName);
     MessageBox.Show("New event is added.");
     LoadView();
 }
Esempio n. 5
0
 private void DoUpdate(ProtocolEvent item)
 {
     QProtocolEvents.UpdateItem(item, loginInfo.UserName);
     MessageBox.Show("Updated!");
     LoadView();
 }