public void Add()
        {
            var addView = new AddClassificationView();

            if (addView.ShowDialog() == true)
            {
                _lookup.Add(addView.NewItem);
                _viewModel.Collection.Add(addView.NewItem);
            }
        }
Beispiel #2
0
        internal static ClassificationCollection CollectAll()
        {
            var dataTable  = DatabaseController.ExecuteSelectQuery("SELECT * FROM " + TABLE_NAME);
            var collection = new ClassificationCollection();

            foreach (DataRow dataRow in dataTable.Rows)
            {
                var item = new Classification();
                item.SetPropertiesFromDataRow(dataRow);
                collection.Add(item);
            }
            return(collection);
        }
        public void ItemTest()
        {
            ClassificationCollection target = new ClassificationCollection();

            int index = 0;
            Classification expected = new Classification();
            target.Add(expected);
            Classification actual = target[index];
            Assert.AreEqual(expected, actual);
        }