Beispiel #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     label13.Text = "";
     if (s != null && label8.Text != "" && textBox2.Text != "" && richTextBox1.Text != "")
     {
         Stock m = Stock.checkInventory(s.Product.ProductId);
         if (m == null)
         {
             label13.Text = label8.Text;
         }
         else
         {
             StockTransaction st = StockTransaction.returnStock(Convert.ToInt32(textBox1.Text), Convert.ToInt16(textBox2.Text), richTextBox1.Text);
             label13.Text = "Transaction successful. Remaining Quantity:" + st.QuantityAfter;
         }
     }
     else
     {
         label13.Text = "Enter valid Quantity.";
     }
 }