예제 #1
0
 //check if the product is out of stock and then open the comment form or display message
 private void SelectMenuItem(Item item)
 {
     if (item.Stock == 0)
     {
         MessageBox.Show("Product Out Of Stock!");
     }
     else
     {
         addCommentToItemUI = new AddCommentToItemUI(item, order);
         addCommentToItemUI.ShowDialog();
         Close();
     }
 }
예제 #2
0
        //check if the product is out of stock and then open the comment form
        private void SelectMenuItem(Item item)
        {
            //get the item amount
            item = service.GetItem(item.Name);

            if (item.Stock == 0)
            {
                MessageBox.Show("Product Out Of Stock!");
            }
            else
            {
                addCommentToItemUI = new AddCommentToItemUI(item, order);
                addCommentToItemUI.ShowDialog();
                Close();
            }
        }