示例#1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         string quantity = msh.GetSoldItems(cbProductsSold.SelectedItem.ToString()).ToString();
         label10.Text = quantity;
         int product_price    = msh.GetItemPrice(cbProductsSold.SelectedItem.ToString());
         int prdouct_quantity = int.Parse(label10.Text);
         label11.Text = (prdouct_quantity * product_price).ToString();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }