private void btnToyType_Click(object sender, EventArgs e) { ToyDAO toyDao = new ToyDAO(); List <string> listType = toyDao.GetAllToyType(); Dictionary <string, long> Type = new Dictionary <string, long>(); foreach (string s in listType) { long quantity = toyDao.GetQuantityOfAType(s); Type.Add(s, quantity); MessageBox.Show(s + ": " + quantity); } }
public List <string> GetCategory() { return(_toyDao.GetAllToyType()); }