private Receipt GetPlaceholderReceipt() { Receipt receipt = new Receipt(); receipt.OrderID = Order.OrderID; receipt.AmountPaid = Order.Amount; receipt.Confirmation = "Processing..."; receipt.DatePaid = DateTime.Now; return receipt; }
private Receipt GetReceipt() { // contact the payment processor with order info // this may be an asynchronous operation, so use async if so // once processing is done, set the property values Receipt receipt = new Receipt(); receipt.OrderID = Order.OrderID; receipt.AmountPaid = Order.Amount; receipt.Confirmation = "AG436757FG"; receipt.DatePaid = DateTime.Now; return receipt; }
private void btnRefresh_Click(object sender, EventArgs e) { Receipt receipt = paymentReceipt.Receipt; DisplayReceipt(receipt); }
private void DisplayReceipt(Receipt Receipt) { txtReceiptID.Text = Receipt.Confirmation; txtAmountPaid.Text = Receipt.AmountPaid.ToString("C"); txtDatePaid.Text = Receipt.DatePaid.ToLongDateString(); }