public void displaymodeofpayments() { Paymentcompletion pay = new Paymentcompletion(); List <PaymentModes> modes = pay.listofmodes(); Console.WriteLine(modes.ToStringTable( new[] { "Id", "Mode of payment" }, a => a.id, a => a.modeofpayments)); }
public void finalpage(string modeofpayment, decimal grandtotal) { string amountstring = string.Empty; if (modeofpayment == "1") { Console.WriteLine("Please enter the total amount recieved"); amountstring = Console.ReadLine(); } else { amountstring = grandtotal.ToString(); } Paymentcompletion pay = new Paymentcompletion(); Payment finallist = pay.buytheitems(modeofpayment, grandtotal, amountstring); Console.WriteLine("Mode of Payment: {0} Grand Total: {1} Amount Recieved: {2} Due Amount: {3}\n Thank You for Shopping with us!!!", finallist.modeofpayment, finallist.totalamount, finallist.amountrecieved, finallist.dueamount); }