public void Add() { var addView = new AddMembershipTypeView(); if (addView.ShowDialog() == true) { _lookup.Add(addView.NewItem); _viewModel.Collection.Add(addView.NewItem); } }
internal static MembershipTypeCollection CollectAll() { var dataTable = DatabaseController.ExecuteSelectQuery("SELECT * FROM " + TABLE_NAME); var collection = new MembershipTypeCollection(); foreach (DataRow dataRow in dataTable.Rows) { var item = new MembershipType(); item.SetPropertiesFromDataRow(dataRow); collection.Add(item); } return(collection); }