public string AsPlainText() { string bookingDateTime = "Skipped by customer"; if (BookingDateTimeUtc != null) { bookingDateTime = BookingDateTimeUtc.GetValueOrDefault() .Add(new TimeSpan(0, -TimeZoneOffset, 0)) .ToString(QuantumLogicConstants.UsaTimeFormat, CultureInfo.InvariantCulture); } CustomerComment = !string.IsNullOrEmpty(CustomerComment) ? CustomerComment : ""; return($"New Lead for {DealerName}! \n\n" + $"Vehicle: {VehicleTitle} \n" + $"Vin: {VehicleVin} \n\n" + "Customer \n" + $"Name: {CustomerFirstName} {CustomerLastName} \n" + $"Phone: {CustomerPhone} \n" + $"Email: {CustomerEmail} \n\n" + "Booking details \n" + $"Date & Time: {bookingDateTime} \n" + $"Expert: {ExpertTitle} \n" + $"Beverage: {BeverageTitle} \n" + $"Route: {RoadTitle} \n" + $"Comment: {CustomerComment} \n"); }
public string AsHtml() { string recieveDateTime = DateTime.UtcNow .Add(new TimeSpan(0, -TimeZoneOffset, 0)) .ToString(QuantumLogicConstants.OutputDateTimeFormat, CultureInfo.InvariantCulture); string bookingDateTime = "Skipped by customer"; if (BookingDateTimeUtc != null) { bookingDateTime = BookingDateTimeUtc.GetValueOrDefault() .Add(new TimeSpan(0, -TimeZoneOffset, 0)) .ToString(QuantumLogicConstants.UsaTimeFormat, CultureInfo.InvariantCulture); } var xml = $"<?xml version=\"1.0\"?>" + $"<?adf version=\"1.0\"?>" + $"<adf>" + $"<prospect status=\"\">" + $"<id sequence=\"{DealerName}\" source=\"{SiteName}\"></id>" + $"<requestdate>{recieveDateTime}</requestdate>" + $"<vehicle interest=\"test-drive\" status=\"{Vehicle.Condition}\">" + // < !-- interest:buy|lease|sell|trade-in|test-drive; status:new|used; --> $"<year>{Vehicle.Year}</year>" + $"<make>{Vehicle.Make}</make>" + $"<model>{Vehicle.Model}</model>" + $"<stock>{Vehicle.Stock}</stock>" + $"<vin>{Vehicle.Vin}</vin>" + $"</vehicle>" + $"<customer>" + $"<contact>" + $"<name part=\"first\">{FirstName}</name>" + $"<name part=\"last\">{SecondName}</name>" + $"<phone type=\"cellphone\">{UserPhone}</phone>" + $"<email>{UserEmail}</email>" + $"</contact>" + $"<comments>" + BookingDataAsComment(bookingDateTime, ExpertName, BeverageName, RouteTitle, UserComments) + $"</comments>" + $"</customer>" + $"<vendor>" + VendorName(DealerName, ExpertName) + //$"<contact>" + // $"<name part=\"full\">{DealerName}</name>" + //$"</contact>" + $"</vendor>" + $"<provider>" + $"<name>VIPdrv Test Drive</name>" + $"</provider>" + $"<salesperson>" + $"<id source=\"DealerPeak\">{DealerPeakSalesId}</id>" + $"</salesperson>" + $"<agent>" + $"{DealerPeakSalesId}" + $"</agent>" + $"</prospect>" + $"</adf>"; return(xml); }
public string AsPlainText() { string bookingDateTime = "Skipped"; if (BookingDateTimeUtc != null) { bookingDateTime = BookingDateTimeUtc.GetValueOrDefault() .Add(new TimeSpan(0, -TimeZoneOffset, 0)) .ToString(QuantumLogicConstants.UsaTimeFormat, CultureInfo.InvariantCulture); } return($"Thank you! \n" + $"Your Upcoming VIP Test Drive is Scheduled \n \n" + $"Vehicle: {VehicleTitle} \n" + $"Date & Time: {bookingDateTime} \n" + $"Expert: {ExpertName} \n" + $"Beverage: {BeverageName} \n" + $"Route: {RoadName} \n\n" + // TODO: customer comment $"{DealerName} \n" + $"{DealerPhone} \n"); }