本文整理汇总了C#中Ticket.Print方法的典型用法代码示例。如果您正苦于以下问题:C# Ticket.Print方法的具体用法?C# Ticket.Print怎么用?C# Ticket.Print使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ticket
的用法示例。
在下文中一共展示了Ticket.Print方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintCreditVoucher
public void PrintCreditVoucher() {
Empiria.Documents.Printing.Document document = new
Empiria.Documents.Printing.Document(TicketDefaultFontName, TicketDefaultFontSize);
document.LoadTemplate(ReportsTemplatesPath + "credit.voucher.ert");
FillCreditVoucherDocument(document);
Ticket ticket = new Ticket();
ticket.Load(document);
ticket.Print(TicketPrinterName);
//Customer voucher copy
document.LoadTemplate(ReportsTemplatesPath + "credit.voucher.customer.ert");
FillCreditVoucherDocument(document);
ticket = new Ticket();
ticket.Load(document);
ticket.Print(TicketPrinterName);
}
示例2: Main
static void Main(string[] args)
{
int NumberOfChildren = 0;
int NumberOfAdults = 0;
int NumberOfSeniors = 0;
int TotalAttendies = 0;
double TotalTicketPrice = 0;
int SmallSodaQty;
int LargeSodaQty;
int HotDogQty;
int PopCornQty;
int CandyQty;
double TotalFoodPrice = 0;
const double SmallSoda = 3.50;
const double LargeSoda = 5.99;
const double HotDog = 3.99;
const double Popcorn = 4.50;
const double Candy = 1.99;
double GrandTotal = 0;
int SodaCornDiscountQty = 0;
int FreePopcornQty = 0;
int CandyDiscountQty = 0;
Ticket ChildMatinee = new Ticket("Child Matinee Ticket ", 3.99);
Ticket AdultMatinee = new Ticket("Adult Matinee Ticket ", 5.99);
Ticket SeniorMatinee = new Ticket("Senior Matinee Ticket", 4.50);
Ticket ChildEvening = new Ticket("Child Evening Ticket ", 6.99);
Ticket AdultEvening = new Ticket("Adult Evening Ticket ", 10.99);
Ticket SeniorEvening = new Ticket("Senior Evening Ticket", 8.50);
System.Console.WriteLine("Matinee Ticket Pricing");
ChildMatinee.Print();
AdultMatinee.Print();
SeniorMatinee.Print();
System.Console.WriteLine("Evening Ticket Pricing");
ChildEvening.Print();
AdultEvening.Print();
SeniorEvening.Print();
System.Console.WriteLine("Would you like to see a Matinee Showing?");
if (System.Console.ReadLine().ToLower().StartsWith("y"))
{
System.Console.WriteLine("How many children tickets?");
NumberOfChildren = int.Parse(System.Console.ReadLine());
ChildMatinee.Pricing(NumberOfChildren);
TotalTicketPrice += ChildMatinee.TicketTotals();
System.Console.WriteLine("How many adult tickets?");
NumberOfAdults = int.Parse(System.Console.ReadLine());
AdultMatinee.Pricing(NumberOfAdults);
TotalTicketPrice += AdultMatinee.TicketTotals();
System.Console.WriteLine("How many senior tickets?");
NumberOfSeniors = int.Parse(System.Console.ReadLine());
SeniorMatinee.Pricing(NumberOfSeniors);
TotalTicketPrice += SeniorMatinee.TicketTotals();
}
else
{
System.Console.WriteLine("How many children tickets?");
NumberOfChildren = int.Parse(System.Console.ReadLine());
ChildEvening.Pricing(NumberOfChildren);
TotalTicketPrice += ChildEvening.TicketTotals();
System.Console.WriteLine("How many adult tickets?");
NumberOfAdults = int.Parse(System.Console.ReadLine());
AdultEvening.Pricing(NumberOfAdults);
TotalTicketPrice += AdultEvening.TicketTotals();
System.Console.WriteLine("How many senior tickets?");
NumberOfSeniors = int.Parse(System.Console.ReadLine());
SeniorEvening.Pricing(NumberOfSeniors);
TotalTicketPrice += SeniorEvening.TicketTotals();
}
System.Console.WriteLine("Please indicate how many of each item you would like");
System.Console.Write("Small Soda $" + SmallSoda + ": ");
SmallSodaQty = int.Parse(System.Console.ReadLine());
TotalFoodPrice += (SmallSodaQty * SmallSoda);
System.Console.Write("Large Soda $" + LargeSoda + ": ");
LargeSodaQty = int.Parse(System.Console.ReadLine());
TotalFoodPrice += (LargeSodaQty * LargeSoda);
System.Console.Write("Hot Dog $" + HotDog + ": ");
HotDogQty = int.Parse(System.Console.ReadLine());
TotalFoodPrice += (HotDogQty * HotDog);
System.Console.Write("Popcorn $" + Popcorn + ": ");
PopCornQty = int.Parse(System.Console.ReadLine());
TotalFoodPrice += (PopCornQty * Popcorn);
//.........这里部分代码省略.........