コード例 #1
0
ファイル: CafeTeria.cs プロジェクト: alihamza97/MusicFestival
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     if (balnce > totalBalnc)
     {
         foreach (var item in orders)
         {
             items.BuyProduct(rfid, balnce - totalBalnc);
         }
         lbCurrentBalance.Text = (balnce - totalBalnc).ToString();
     }
     lbCurrentBalance.Text = (balnce - totalBalnc).ToString();
     //if (balnce == 0)
     //{
     //    lbCurrentBalance.Text = "not enough money";
     //    MessageBox.Show("You are not allowed to buy this/these product(s)");
     //}
     dataGridVisitor.Rows.Clear();
 }
コード例 #2
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (balnce > totalBalnc)
            {
                foreach (var item in orders)
                {
                    items.BuyProduct(rfid, balnce - totalBalnc);
                }
                lbCurrentBalance.Text = (balnce - totalBalnc).ToString();
            }
            DataGridViewRow newDataRow = dataGridVisitor.Rows[indexRow];

            newDataRow.Cells[2].Value = textBox1.Text;
            Totalprice();
            lbCurrentBalance.Text = (balnce - totalBalnc).ToString();
            //if (balnce == 0)
            //{
            //    lbCurrentBalance.Text = "not enough money";
            //    MessageBox.Show("You are not allowed to buy this/these product(s)");
            //}
            // dataGridVisitor.Rows.Clear();
        }