@*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;
@{
string esal1 = "";
if (Model.OrderProductView.Constituent.Id != null && Model.OrderProductView.Constituent.Id > 0)
{
string salutationURL = "CRM/Salutations?constituentId=" + Model.OrderProductView.Constituent.Id + "&includeAffiliations=false&defaultOnly=true";
var salutationResponse = Model.RestClient.AtUrl(salutationURL).Get
();
if(salutationResponse.IsSuccessful)
{
esal1 = salutationResponse.ResponseObject[0].EnvelopeSalutation1;
}
}
var linkBalance = "https://arts.nac-cna.ca/en/secure/account/checkgiftcertificate";
var linkHelp = "https://nac-cna.ca/en/tickets/help/giftcards";
var giftCertificates = (Model.OrderProductView.Products as OrderProductViewProducts).Where(x => x.ProductClass.Description == "Gift Certificate");
var giftCertificateCode = Model.GetPropertyValue("GiftCertificateCode");
var giftCertificateFrom = Model.GetPropertyValue("GiftCertificateFromName");
var giftCertificateTo = Model.GetPropertyValue("GiftCertificateToName");
var giftCertificateMessage = Model.GetPropertyValue("GiftCertificateMessage");
}
You received a gift card!
|
|
|
@if (giftCertificates != null && giftCertificates.Count() > 0)
{
foreach (var giftCertificate in giftCertificates)
{
@if (giftCertificateCode == giftCertificate.GiftCertificate.GiftCertificateNumber){
var amount = -giftCertificate.GiftCertificate.Amount;
|
@string.Format("{0:C}", amount)
|
GIFT CODE
@giftCertificateCode
|
|
}
}
}
|
@if (giftCertificates != null && giftCertificates.Count() > 0)
{
foreach (var giftCertificate in giftCertificates)
{
@if (giftCertificateCode == giftCertificate.GiftCertificate.GiftCertificateNumber){
@if (giftCertificateTo != null && giftCertificateTo != "")
{
To: @giftCertificateTo
|
} else if (giftCertificate.GiftCertificate.Name != null && giftCertificate.GiftCertificate.Name != "")
{
To: @giftCertificate.GiftCertificate.Name
|
}
}
}
}
@giftCertificateMessage
|
@if (giftCertificates != null && giftCertificates.Count() > 0)
{
foreach (var giftCertificate in giftCertificates)
{
@if (giftCertificateCode == giftCertificate.GiftCertificate.GiftCertificateNumber){
@if (giftCertificateFrom != null && giftCertificateFrom != "")
{
From: @giftCertificateFrom
|
} else if (Model.OrderProductView.Constituent.Id != null && Model.OrderProductView.Constituent.Id > 0 && esal1 != "")
{
@if (esal1 != "Guest User"){
From: @esal1
}
|
}
}
}
}
|
|
|
You can use this digital gift card to pay for your ticket order online, by phone or in person at our Box Office.
|
|
|