private void PrintTransaction(Transaction transaction, IList <Tool> tools) { var result = MessageBox.Show("Czy wydrukować potwierdzenie ?", "Potwierdzenie", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { var print = new PrintTransaction(transaction, tools, _db); print.Print(); } }
public void PrintReceipt(decimal TranNo, string currCode, string userId, string transactionType, string Rate, string ForeignAmount, string LocalAmount, string AvgCost) { LinqMasterDataContext mastContext = new LinqMasterDataContext(); PrintTransaction rcpt = new PrintTransaction(); var compDetails = mastContext.tblCompanies.FirstOrDefault(); //var AdditionaValues = new { currCode = currCode, transactionType = transactionType, ForeignAmount = ForeignAmount, LocalAmount = LocalAmount, Rate = Rate }; rcpt.Description = compDetails.Description; rcpt.Address1 = compDetails.Address1; rcpt.Address2 = compDetails.Address2; rcpt.Address3 = compDetails.Address3; rcpt.Phone = compDetails.Phone; rcpt.TranNo = TranNo.ToString(); rcpt.CurCode = currCode; rcpt.TranType = transactionType; rcpt.TaxRef = compDetails.TaxRef; rcpt.ForeignAmt = ForeignAmount; rcpt.LocalAmt = LocalAmount; rcpt.Rate = Rate; rcpt.print(); }