コード例 #1
0
ファイル: SelectMenuItemsUI.cs プロジェクト: shukerb/Chapeau
 //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
ファイル: SelectMenuItemsUI.cs プロジェクト: shukerb/Chapeau
        //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();
            }
        }