//Returns a string that displays a customer's properties public override string ToString() { string strOutput = ""; strOutput += "RESERVATION DETAILS" + Environment.NewLine + "Check in date: " + CheckInDate.ToLongDateString() + Environment.NewLine + "Number of nights: " + NumberOfNights.ToString() + Environment.NewLine + "Room type: " + RoomType + Environment.NewLine + "Number of rooms: " + NumberOfRooms.ToString() + Environment.NewLine + "Room price: " + RoomPrice.ToString("C2") + Environment.NewLine + "Subtotal: " + SubTotal.ToString("C2") + Environment.NewLine + "Tax (7%): " + Tax.ToString("C2") + Environment.NewLine + "Convenience Fee: " + ConvenienceFee.ToString("C2") + Environment.NewLine + "Total: " + Total.ToString("C2") + Environment.NewLine + Environment.NewLine + "CUSTOMER DETAILS" + Environment.NewLine + "First Name: " + FirstName + Environment.NewLine + "Last Name: " + LastName + Environment.NewLine + "Credit Card Number: " + CreditCardNumber + Environment.NewLine + "Credit Card Type: " + CreditCardType + Environment.NewLine + "Phone: " + Phone + Environment.NewLine + "Email: " + Email + Environment.NewLine; return(strOutput); }
//Devuelve una cadena que muestra las propiedades de un cliente public override string ToString() { string strOutput = ""; strOutput += "DETALLES DE RESERVA" + Environment.NewLine + "Fecha de entrada: " + CheckInDate.ToLongDateString() + Environment.NewLine + "Numero de noches: " + NumberOfNights.ToString() + Environment.NewLine + "Tipo de cuarto: " + RoomType + Environment.NewLine + "Numero de cuartos: " + NumberOfRooms.ToString() + Environment.NewLine + "Precio de cuarto: " + RoomPrice.ToString("C2") + Environment.NewLine + "Subtotal: " + SubTotal.ToString("C2") + Environment.NewLine + "Iva (19%): " + Tax.ToString("C2") + Environment.NewLine + "Gravamen de Hospedaje: " + ConvenienceFee.ToString("C2") + Environment.NewLine + "Total: " + Total.ToString("C2") + Environment.NewLine + Environment.NewLine + "DETALLES DE CLIENTE" + Environment.NewLine + "Nombres: " + FirstName + Environment.NewLine + "Apellidos: " + LastName + Environment.NewLine + "Numero de TDC: " + CreditCardNumber + Environment.NewLine + "Tipo de tarjeta: " + CreditCardType + Environment.NewLine + "Telefono: " + Phone + Environment.NewLine + "Email: " + Email + Environment.NewLine; return(strOutput); }