Пример #1
0
 private void AddBtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (id == 0)
         {
             ShowAutoClosingMessageBox("Please,select a product!", "Error");
         }
         else
         {
             customerService.AddShoppingList(new Contracts.Request.ShoppingBasket.AddShoppingBasketRequest(customer.CustomerID, id, Convert.ToInt16(comboBox1.Text), Convert.ToDecimal(ProductCost.Text)));
             ShowAutoClosingMessageBox("You can visit your shopping box to buy", "Succesfully Added");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }