@*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