public void GetDataFromDatabase() { DatabaseModel database = new DatabaseModel(); HashSet <SearchItemModel> itemsFromDB = database.GetMedicines(); foreach (SearchItemModel item in itemsFromDB) { DataGridMedicines.Add(item); } }
private void FindItem() { DataGridMedicines.Clear(); DatabaseModel database = new DatabaseModel(); HashSet <SearchItemModel> itemsFromDB = database.FindMedicines(searchLine); foreach (SearchItemModel item in itemsFromDB) { DataGridMedicines.Add(item); } }