示例#1
0
 internal void AddTicket(string i_VehicleLicenseNumber, GarageTicket i_GarageTicket)
 {
     if (!r_GarageTickets.ContainsKey(i_VehicleLicenseNumber))
     {
         r_GarageTickets.Add(i_VehicleLicenseNumber, i_GarageTicket);
     }
     else
     {
         r_GarageTickets[i_VehicleLicenseNumber].TicketStatus = eTicketStatus.InProgress;
     }
 }
示例#2
0
        public string GetVehicleInfoByLicensePlateNumber(string i_LicensePlateNumber)
        {
            GarageTicket  garageTicket = GetTicketByLicensePlateNumber(i_LicensePlateNumber);
            StringBuilder showVehicleInfoStringBuilder = new StringBuilder();

            showVehicleInfoStringBuilder.AppendFormat(
                "\tOwner's name: {0}{3}\tOwner's phone number: {1}{3}\tvehicle status: {2}{3}",
                garageTicket.OwnerName,
                garageTicket.OwnerPhoneNumber,
                garageTicket.TicketStatus.ToString(),
                Environment.NewLine);
            showVehicleInfoStringBuilder.AppendLine(r_VehicleInventory[i_LicensePlateNumber].ToString());

            return(showVehicleInfoStringBuilder.ToString());
        }