private void btnBetaald_Click(object sender, EventArgs e) { decimal totalPayment = 0; bon.fooi = 0; if (txtboxTotalPayment.Text == "") { totalPayment = bon.totaalprijs; } else { totalPayment = decimal.Parse(txtboxTotalPayment.Text); if (totalPayment > bon.totaalprijs) { bon.fooi = totalPayment - bon.totaalprijs; } } OrderItem item = order.orderItems.First(); order.bestelling_id = item.bestelling_id; bon.bestelling_ID = order.bestelling_id; this.Close(); PaymentActionForm pay = new PaymentActionForm(werknemer, tafel_ID, amount, btw, bon, form2); pay.Show(); }
private void btnBetaald_Click(object sender, EventArgs e) { decimal totalPayment = 0; bon.fooi = 0; if (txtboxTotalPayment.Text == "") { totalPayment = bon.totaalprijs; } else { totalPayment = decimal.Parse(txtboxTotalPayment.Text); if (totalPayment > bon.totaalprijs) { bon.fooi = totalPayment - bon.totaalprijs; } } PaymentActionForm pay = new PaymentActionForm(werknemer, tafel_ID, amount, btw, bon); pay.ShowDialog(); }