public Order(Visitor visitor, Cashier cashier, Film film, DateTime dateTime) { Visitor = visitor; Cashier = cashier; Film = film; DateOrder = dateTime; }
public Order(string id, Visitor visitor, Cashier cashier, Film film, DateTime dateTime) { ID = id; Visitor = visitor; Cashier = cashier; Film = film; DateOrder = dateTime; }
public override int GetHashCode() { unchecked { int result = (Visitor != null ? Visitor.GetHashCode() : 0); result = (result * 397) ^ (Cashier != null ? Cashier.GetHashCode() : 0); result = (result * 397) ^ (Film != null ? Film.GetHashCode() : 0); result = (result * 397) ^ DateOrder.GetHashCode(); return(result); } }
public bool Equals(Cashier other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other.FirstName, FirstName) && Equals(other.LastName, LastName) /* && Equals(other.ID, ID)*/); }
public bool Equals(Cashier other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.FirstName, FirstName) && Equals(other.LastName, LastName)/* && Equals(other.ID, ID)*/; }
private void MakeOrder(Cashier cashier) { Console.WriteLine("Select operation"); Console.WriteLine("1 - Buy / 2 - Book (not implemented)"); var operationNumber = ChoiseOperation(); switch (operationNumber) { case 1: MakeBuyOrder(cashier); break; case 2: try { _cinema.BookTicket(); } catch (NotImplementedException e) { Console.WriteLine(e.Message); } break; } }
private void MakeBuyOrder(Cashier cashier) { var film = SelectFilms(); if (film == null) { return; } var visitor = NewVisitor(); var seat = ChooseSeat(); if (seat == 0) { return; } // ToDo: more seat to choose for one order; _cinema.BuyTicket(film, visitor, cashier, seat); }