Пример #1
0
        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);
            }
        }
Пример #2
0
 public long GetCountItemOfCategory([FromBody] string category)
 {
     return(_toyDao.GetQuantityOfAType(category));
 }