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; }
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(); }
private void DoInsert(ProtocolEvent item) { QProtocolEvents.InsertItem(item, loginInfo.UserName); MessageBox.Show("New event is added."); LoadView(); }
private void DoUpdate(ProtocolEvent item) { QProtocolEvents.UpdateItem(item, loginInfo.UserName); MessageBox.Show("Updated!"); LoadView(); }