SalesOrderEntry rey = new SalesOrderEntry(id, cash);
total = Convert.ToInt32(lblCustomersCash.Text) - Convert.ToInt32(lblSubtotal.Text);
if (total > cash)
{
DGVTOTAL.DataSource = ProductREPO.GETORDERTOTALLIST();
for (int i = 0; i < DGVORDER.Rows.Count; ++i)
{
SalesOrderEntry see = new SalesOrderEntry(id, cash);
//CASH = 649 and im selecting an item that is equivalent to 30
sum2 = Convert.ToInt32(DGVORDER.Rows[i].Cells["OrderedProductPrice"].Value);
dgvGetID.DataSource = SalesORDERREPO.weredone(id);
decimal newcash = int.Parse(dgvGetID.Rows[0].Cells["Cash"].Value.ToString());
MessageBox.Show("NEW BALANCE CASH: " + newcash);
}
}
else
{
MessageBox.Show("Hey your Cash is not ENOUGH to Buy this ITEM");
}
新しい現金残高を表示したい..小計に演繹的..しかし、このエラーが発生しています:
<Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index>