public void Save() { using (var document = DocX.Create(@"table.docx")) { document.PageLayout.Orientation = Orientation.Landscape; var table = document.AddTable(1, 2); table.Rows[0].Cells[0].Paragraphs.First().Append(FinalPrice.ToString()); table.Rows[0].Cells[1].Paragraphs.First().Append(ChildPrice.ToString()); document.InsertTable(table); document.Save(); } }
public TransactionControl(Order temp) { InitializeComponent(); //set the necessary order properties FinalPrice = Math.Round((temp.Subtotal += temp.Subtotal * .16), 2); items = temp.Items; OrderNumber = temp.OrderNumber; Subtotal = temp.Subtotal; //GetSubtotal(); FinalPriceDisp.Text = FinalPrice.ToString(); //the buttons on the form: CancelTransaction.Click += OnCancelTransaction; PayByCash.Click += OnPayByCash; PayByCredit.Click += OnPayByCredit; }