public Ticket(string from, string to, UIClass cls, UIWay way) { this.from = from; this.to = from; this.cls = cls; this.way = way; }
public Ticket(UIClass seatClass, UIDiscount discount, UIWay way, string from, string to) { this.seatClass = ClassAssigner.GetClass(seatClass); this.discount = DiscountAssigner.GetDiscount(discount); this.way = way; this.from = from; this.to = to; }
public UIInfo(string from, string to, UIClass cls, UIWay way, UIDiscount discount, UIPayment payment) { this.from = from; this.to = to; this.cls = cls; this.way = way; this.discount = discount; this.payment = payment; }
public TicketautomaatInvoer(string from, string to, UIClass cls, UIWay way, UIDiscount discount, UIPayment payment) { this.from = from; this.to = to; this.cls = cls; this.way = way; this.discount = discount; this.payment = payment; }
private void getPrice(int tariefeenheden, int tableColumn, UIWay way) { // Get price price = PricingTable.getPrice(tariefeenheden, tableColumn); if (way == UIWay.Return) { price *= 2; } }
public Bestelling(string from, string to, UIClass cls, UIWay way, UIDiscount discount, UIPayment payment, int aantalKaartjes) { this.from = from; this.to = to; this.cls = cls; this.way = way; this.discount = discount; this.payment = payment; this.aantalKaartjes = aantalKaartjes; }
public Ticket(UIInfo info) { klasse = info.Class; discount = info.Discount; destination = info.To; origin = info.From; way = info.Way; GetPrice g = new GetPrice(klasse, discount, destination, origin, way); price = g.ReturnPrice(); }
public GetPrice(UIClass klasse, UIDiscount discount, String destination, String origin, UIWay way) { // Get number of tariefeenheden int tariefeenheden = Tariefeenheden.getTariefeenheden(origin, destination); // Compute the column in the table based on choices int tableColumn; // First based on class switch (klasse) { case UIClass.FirstClass: tableColumn = 3; break; default: tableColumn = 0; break; } // Then, on the discount switch (discount) { case UIDiscount.TwentyDiscount: tableColumn += 1; break; case UIDiscount.FortyDiscount: tableColumn += 2; break; } // Get price price = PricingTable.getPrice(tariefeenheden, tableColumn); if (way == UIWay.Return) { price *= 2; } }
public static Ticket makeTicket(string from, string to, UIClass cls, UIWay way) { Ticket ticket = new Ticket(from, to, cls, way); return(ticket); }
public void PrintTicket(string from, string to, UIClass cls, UIWay way, UIDiscount discount, UIPayment payment) { MessageBox.Show("Uw ticket\nStart location: " + from + "\nDestination: " + to + "\nClass: " + cls + "\nWay: " + way + "\nDiscount: " + discount + "\nPayment method: " + payment); }