示例#1
0
        public void Add()
        {
            var addView = new AddMembershipTypeView();

            if (addView.ShowDialog() == true)
            {
                _lookup.Add(addView.NewItem);
                _viewModel.Collection.Add(addView.NewItem);
            }
        }
示例#2
0
        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);
        }