@*using statement required for access to Constituencies object type when making REST call to CRM/Constituencies*@ @using Tessitura.Service.Client.CRM; @using Tessitura.Service.Client.Txn; @using System.Linq; @{ var hasConstituent = Model.OrderProductView.Constituent != null; var hasAddress = Model.Address != null; var hasElectronicAddress = Model.ElectronicAddress != null; var hasBooking = Model.Booking != null; var isInSpecialConstituency = false; var constituencyMessage = Model.GetPropertyValue("ConstituencyMessage") ?? "Thank you for being a part of Friend's Circle!"; var constituency = Model.GetPropertyValue("Constituency") ?? "FRC"; var hasState = hasAddress && Model.Address.State != null; var hasProducts = Model.OrderProductView.Products != null && Model.OrderProductView.Products.Count > 0; } @if (hasConstituent) { var url = "CRM/Constituencies?constituentId=" + Model.OrderProductView.Constituent.Id + "&includeAffiliations=true"; var constituencies = Model.RestClient.AtUrl(url).Get().ResponseObject; isInSpecialConstituency = constituencies != null && (constituencies as Constituencies).Count(x => x.ConstituencyType.ShortDescription == constituency) > 0; } @if (hasProducts) { /* PERFORMANCES */ var perfs = (Model.OrderProductView.Products as OrderProductViewProducts).Where(x => x.ProductClass.Description == "Performance"); // If the order has performances, loop through them and display them in a table if (perfs != null && perfs.Count() > 0) { } }
@{ var state = hasState ? ", " + Model.Address.State.StateCode : ""; var electronicAddress = hasElectronicAddress ? Model.ElectronicAddress.Address : ""; }
ASO

Thank You for Your Order with the Austin Symphony Orchestra!

Order Date: @Model.OrderProductView.OrderDateTime
Order Number: @Model.OrderProductView.Id
@if (hasConstituent) { Customer Number: @Model.OrderProductView.Constituent.Id

}

Please retain this receipt for your reference.

Your Account Information:
@if (isInSpecialConstituency) { @constituencyMessage
} @if (hasConstituent) { @Model.OrderProductView.Constituent.DisplayName
} @if (hasAddress) { @Model.Address.Street1
@Model.Address.City@state @Model.Address.PostalCode
} @electronicAddress
Order Shipping Information
@if (Model.OrderProductView.DeliveryMethod.Id == -1) { Hold order at Box Office
Please pick up your tickets no later than 10 minutes before curtain } else if (Model.OrderProductView.DeliveryMethod.Id == 2) { Email Delivery
Tickets will be sent via email on June 8th. If you do not see the tickets in your inbox please check your Spam folder or promotions tab. } else if (hasAddress) { @Model.Address.Street1
@Model.Address.City@state @Model.Address.PostalCode
}
Performances
@{ var performanceTotal = @perfs.Sum(x => x.Performance.LineItem.TotalDue); } @foreach (var product in perfs) { var performance = product.Performance.LineItem.Performance; var subLineItems = product.Performance.LineItem.SubLineItems; int ticketCount = subLineItems.Count(); }
Description Location Type Seats
@performance.Description
@performance.Facility.Description
@performance.PerformanceDateTime
@product.Performance.LineItem.SubLineItems[0].Zone.Description @{ if (performance.BestSeatMap.IsGA == false) { foreach (var subLineItem in product.Performance.LineItem.SubLineItems) { var seatRow = string.IsNullOrEmpty(subLineItem.Seat.Number) ? "TBD" : subLineItem.Seat.Row + " " + subLineItem.Seat.Number; @seatRow
} } else { General Admission } }
@ticketCount