Become part of the revolution

NORRIQ, the creators of Drink-IT, help every type of organisation grow in a digital world. And we are growing with them. Become part of the IT revolution. Become part of NORRIQ.

Exception in template (\Designs\NORRIQ\Paragraph\TalentsoftOffers.cshtml): System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'norriq-career.talent-soft.com'
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NORRIQ.CustomCode.TalentSoft.TalentSoftApi.GetAuthToken() in E:\agents\norriq.visualstudio.com\agent2\_work\668\s\NORRIQ\CustomCode\TalentSoft\TalentSoftApi.cs:line 362
   at NORRIQ.CustomCode.TalentSoft.TalentSoftApi.EnsureValidAuthToken() in E:\agents\norriq.visualstudio.com\agent2\_work\668\s\NORRIQ\CustomCode\TalentSoft\TalentSoftApi.cs:line 392
   at NORRIQ.CustomCode.TalentSoft.TalentSoftApi.SetAuthorizationHeader() in E:\agents\norriq.visualstudio.com\agent2\_work\668\s\NORRIQ\CustomCode\TalentSoft\TalentSoftApi.cs:line 326
   at NORRIQ.CustomCode.TalentSoft.TalentSoftApi.GetOffers() in E:\agents\norriq.visualstudio.com\agent2\_work\668\s\NORRIQ\CustomCode\TalentSoft\TalentSoftApi.cs:line 132
   at NORRIQ.CustomCode.TalentSoft.TalentSoftApiWithCaching.b__6_1() in E:\agents\norriq.visualstudio.com\agent2\_work\668\s\NORRIQ\CustomCode\TalentSoft\TalentSoftApiWithCaching.cs:line 32
   at NORRIQ.Common8.Caching.CacheItemContainer.BuildItem[T](Func`1 buildmethod, Type dependencyType)
   at NORRIQ.Common8.Caching.HttpCache.GetOrInsert[T](String cacheKey, Func`1 buildCacheDependency, Func`1 buildNewItem)
   at NORRIQ.CustomCode.TalentSoft.TalentSoftApiWithCaching.GetOffers() in E:\agents\norriq.visualstudio.com\agent2\_work\668\s\NORRIQ\CustomCode\TalentSoft\TalentSoftApiWithCaching.cs:line 32
   at CompiledRazorTemplates.Dynamic.afcbbdbeadd.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using Dynamicweb.Frontend; @using NORRIQ.Common8.Factory @using NORRIQ.CustomCode.TalentSoft @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> @using Dynamicweb.Frontend; @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> @*Content Elements*@ @helper RenderParagraphHead(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Headline"))) { string headWidth = !String.IsNullOrEmpty(item.GetList("HeadWidth").SelectedValue) ? "col-12 " + item.GetList("HeadWidth").SelectedValue : "col-12"; <div class="paragraph-head @headWidth" data-aos="fade-up"> @RenderH2(item) @RenderSubHeadline(item) @if (!item.GetBoolean("ButtonBelowAllContent")) { @RenderButton(item) } </div> } } @helper RenderJobHead(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Headline"))) { <div class="paragraph-head"> @RenderH2(item) @RenderSubHeadline(item) @RenderJobId(item) </div> } } @helper RenderParagraphSimpleHead(ItemViewModel item) { if (item == null) { return; } string headWidth = ""; if (!string.IsNullOrEmpty(item.GetString("Headline"))) { headWidth = !String.IsNullOrEmpty(item.GetList("HeadWidth").SelectedValue) ? "col-12 " + item.GetList("HeadWidth").SelectedValue : "col-12"; } <div class="paragraph-head @headWidth"> @if (!string.IsNullOrEmpty(item.GetString("Headline"))) { @RenderH2(item) } @if (!string.IsNullOrEmpty(item.GetString("SubHeadline"))) { @RenderSubHeadline(item) } </div> } @*Content Types*@ @helper RenderButton(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetItem("Button").GetString("ButtonText")) && !string.IsNullOrEmpty(item.GetItem("Button").GetString("ButtonLink")) || !string.IsNullOrEmpty(item.GetItem("Button").GetString("ButtonVideoId"))) { var buttonStyle = !string.IsNullOrEmpty(item.GetItem("Button").GetList("ButtonStyle").SelectedValue) ? item.GetItem("Button").GetList("ButtonStyle").SelectedValue : "btn-action"; //var buttonSize = !string.IsNullOrEmpty(item.GetItem("Button").GetList("ButtonSize").SelectedValue) ? " " + item.GetItem("Button").GetList("ButtonSize").SelectedValue : ""; //var buttonOutline = item.GetItem("Button").GetBoolean("ButtonOutline") ? "-outline" : ""; //var buttonColor = !string.IsNullOrEmpty(item.GetItem("Button").GetList("ButtonColor").SelectedValue) ? " btn" + buttonOutline + "-" + item.GetItem("Button").GetList("ButtonColor").SelectedValue : ""; //if (!string.IsNullOrEmpty(item.GetItem("Button").GetList("ButtonColor").SelectedValue)) //{ // buttonStyle = ""; //} if (!string.IsNullOrEmpty(item.GetItem("Button").GetString("ButtonLink"))) { <a href="@item.GetItem("Button").GetString("ButtonLink").Replace("Default.aspx?Id=","/Default.aspx?ID=")" class="btn @buttonStyle"> @item.GetItem("Button").GetString("ButtonText") </a> } else if (!string.IsNullOrEmpty(item.GetItem("Button").GetString("ButtonVideoId"))) { <a data-fancybox href="@item.GetItem("Button").GetString("ButtonVideoId")" class="btn @buttonStyle"> @item.GetItem("Button").GetString("ButtonText") </a> } } } @helper RenderButtonBelow(ItemViewModel item) { if (item.GetBoolean("ButtonBelowAllContent")) { <div class="button-container"> @RenderButton(Model.Item) </div> } } @helper RenderH2(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Headline"))) { <h2> @item.GetString("Headline") </h2> } } @helper RenderH3(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Headline"))) { <h3> @item.GetString("Headline") </h3> } } @helper RenderHeadlineRaw(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Headline"))) { <text>@item.GetString("Headline")</text> } } @helper RenderIconH3(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Headline"))) { <h3 class="headline-icon"> @item.GetString("Headline") @RenderIcon(item) </h3> } } @helper RenderRichText(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Text"))) { @item.GetString("Text") } } @helper RenderSubHeadline(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("SubHeadline"))) { <p class="sub"> @item.GetString("SubHeadline") </p> } } @helper RenderIcon(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetItem("Icon").GetList("Icons").SelectedValue)) { <i class="material-icons">@item.GetItem("Icon").GetList("Icons").SelectedValue</i> } else if (item.GetItem("Icon").GetFile("Svg") != null) { <div class="material-icons"> <object type="image/svg+xml" data="@item.GetItem("Icon").GetFile("Svg").Path" class="icon-svg"> Your browser does not support SVG </object> </div> } @*else if (!string.IsNullOrEmpty(item.GetItem("Icon").GetList("SvgIcons").SelectedValue)) { <svg class="icon-svg"> <use xmlns:xlink="https://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#meat"></use> </svg> }*@ } @helper RenderScrollTo() { if (Model.ContainerSort == 1) { <span class="anchor" id="next"></span> } } @helper RenderImage(ItemViewModel item) { if (item.GetFile("Image") != null) { <img src="/Admin/Public/GetImage.ashx?Image=@item.GetFile("Image").Path&amp;Width=1340&amp;Crop=5&amp;Compression=85" class="img-fluid" alt="@(!string.IsNullOrEmpty(item.GetString("AltText")) ? item.GetString("AltText") : "image")" /> } } @helper RenderSmallImage(ItemViewModel item) { if (item.GetFile("Image") != null) { <img src="/Admin/Public/GetImage.ashx?Image=@item.GetFile("Image").Path&amp;Height=650&amp;Crop=5&amp;Compression=85" class="img-fluid" loading="lazy" alt="@(!string.IsNullOrEmpty(item.GetString("AltText")) ? item.GetString("AltText") : "image")" /> } } @helper RenderImageFade(ItemViewModel item) { if (item.GetFile("Image") != null) { <img src="/Admin/Public/GetImage.ashx?Image=@item.GetFile("Image").Path&amp;Width=650&amp;Crop=5&amp;Compression=85" class="img-fluid" loading="lazy" alt="@(!string.IsNullOrEmpty(item.GetString("AltText")) ? item.GetString("AltText") : "image")" /> } } @helper RenderDefaultContent(ItemViewModel item) { @RenderRichText(Model.Item) @Model.GetModuleOutput() } @helper RenderContentImage(ItemViewModel item) { if (item.GetFile("Image") != null) { if (!string.IsNullOrEmpty(item.GetString("ImageLink"))) { <figure class="text-center"> <a href="@item.GetString("ImageLink").Replace("Default.aspx?Id=","/Default.aspx?ID=")"> @RenderImage(item) </a> </figure> } else { <figure class="text-center"> @RenderImage(item) </figure> } } } @helper RenderContentSmallImage(ItemViewModel item) { if (item.GetFile("Image") != null) { if (!string.IsNullOrEmpty(item.GetString("ImageLink"))) { <figure class="text-center"> <a href="@item.GetString("ImageLink").Replace("Default.aspx?Id=","/Default.aspx?ID=")"> @RenderImageFade(item) </a> </figure> } else { <figure class="text-center"> @RenderImageFade(item) </figure> } } } @helper RenderSkew(ItemViewModel item) { if (item.GetValue<ListViewModel>("SkewStyle").SelectedValue.Contains("top")) { <div class="polygon-top"> <svg preserveAspectRatio="none" viewBox="0 0 100 100"> <polygon points="0,100 100,0 0,0" opacity="1"></polygon> </svg> </div> } else if (item.GetValue<ListViewModel>("SkewStyle").SelectedValue.Contains("bottom")) { <div class="polygon-bottom"> <svg preserveAspectRatio="none" viewBox="0 0 100 100"> <polygon points="100,100 100,0 0,100" opacity="1"></polygon> </svg> </div> } } @helper RenderForm(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("ClickDimensionForm"))) { <style> .row form { font-family: lato; background-color: #002E37; text-align: right; } .row label { font-family: lato; } .row input { font-family: lato; } .row button { font-family: lato; font-weight: bold; background-color: #002E37; max-width: 500px; border: 1px solid; padding: 14px; } ._form-content label { text-align: left; } </style> if (!string.IsNullOrEmpty(item.GetString("ClickDimensionHead"))) { <h3> @item.GetString("ClickDimensionHead") </h3> } <script> var interval = setInterval(updateCrmWidget, 1000); function updateCrmWidget() { if(document.getElementsByName("field[56]")[0]){ document.getElementsByName("field[56]")[0].value = window.location.href; } var SubjectHiddenField= document.getElementById("f_a9c5a1801361e411817b005056866646"); var SourceCodeField=document.getElementById("f_e37234741c61e411817b005056866646"); if (SubjectHiddenField != undefined) { SubjectHiddenField.value = '@item.GetString("CrmSubject").ToString()'; SourceCodeField.value = '@item.GetString("CrmSource").ToString()'; console.log('Setting values'); clearInterval(interval); } else { console.log('Widget not loaded yet!'); } } </script> @item.GetString("ClickDimensionForm") <script> (function () { SubjectHiddenField = document.getElementById("f_a9c5a1801361e411817b005056866646"); SourceCodeField = document.getElementById("f_e37234741c61e411817b005056866646"); SubjectHiddenField.value = @item.GetString("CrmSubject").ToString(); //new item field from DW SourceCodeField.value = @item.GetString("CrmSource").ToString(); //new item field from DW }); </script> } } @helper RenderCite(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("Name")) || !string.IsNullOrEmpty(item.GetString("Company"))) { <cite> @if (!string.IsNullOrEmpty(item.GetString("Name"))) { <strong> @item.GetString("Name") </strong> } @if (!string.IsNullOrEmpty(item.GetString("Company"))) { <br /><span>@item.GetString("Company")</span> } </cite> } } @helper RenderJobId(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("JobId"))) { <p class="jobid"> @Translate("Job id", "Job ID"): @item.GetString("JobId") </p> } } @helper RenderJobs(ItemViewModel item) { if (!string.IsNullOrEmpty(item.GetString("JobsPageId"))) { var SourcePage = item.GetString("JobsPageId"); @RenderItemList(new { ItemType = "StandardPage", ListSourceType = "Page", ListSourcePage = SourcePage, ItemFieldsList = "*", IncludeParagraphItems = true, IncludeAllChildItems = true, ListOrderBy = "Sort", ListTemplate = "ItemPublisher/List/Jobs.cshtml", ListPageSize = "10", }) } } @{ // Boxes Variables var backgroundStyle = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("BackgroundStyle").SelectedValue) ? Model.Item.GetValue<ListViewModel>("BackgroundStyle").SelectedValue : "grade-0"; var skewStyle = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("SkewStyle").SelectedValue) ? Model.Item.GetValue<ListViewModel>("SkewStyle").SelectedValue : ""; var contentWidth = !String.IsNullOrEmpty(Model.Item.GetList("Width").SelectedValue) ? "col-12 " + Model.Item.GetList("Width").SelectedValue : "col-12"; var backgroundImage = Model.Item.GetFile("BackgroundImage") != null ? " style=\"background-image:url(" + Model.Item.GetFile("BackgroundImage").Path + ")\"" : ""; var boxWidth = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("BoxesPerRow").SelectedValue) ? "col-12 " + Model.Item.GetValue<ListViewModel>("BoxesPerRow").SelectedValue : "col"; var boxStyle = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("BoxStyle").SelectedValue) ? Model.Item.GetValue<ListViewModel>("BoxStyle").SelectedValue : "paragraph-box"; // TalentSoft Variables var talentsoft = ObjectFactory.GetInstance<ITalentSoftApi>(); var offers = talentsoft.GetOffers().Object; } @RenderScrollTo() <section id="@Pageview.CurrentParagraph.ID" class="paragraph @(Model.Item.GetBoolean("TextLight") ? "text-white" : "text-default")" @backgroundImage> <div class="paragraph-content @backgroundStyle @skewStyle"> <div class="container"> <div class="row"> @RenderParagraphHead(Model.Item) @if (offers.OfferSummaries.Any()) { var joblist = offers.OfferSummaries.Where(j => j.Region != null && j.Region.FirstOrDefault() != null && !string.IsNullOrWhiteSpace(j.Region.FirstOrDefault().Label)); <div class="@contentWidth"> <div class="row"> @foreach (var content in Model.Item.GetItems("Items")) { var jobLocation = content.GetString("JobsPageId"); <div class="@boxWidth paragraph-boxes"> @if (content.GetFile("Image") != null) { <figure class="@boxStyle"> @RenderImage(content) <figcaption class="paragraph-inner"> @if (!string.IsNullOrEmpty(content.GetItem("Icon").GetList("Icons").SelectedValue)) { @RenderIconH3(content) } else { @RenderH3(content) } @RenderRichText(content) @if (joblist.Any(j => j.Region.FirstOrDefault().Label.Contains(jobLocation))) { <ul class="list-arrows"> @foreach (var job in joblist.Where(j => j.Region.FirstOrDefault().Label.Contains(jobLocation))) { <li> <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("annonce")?JobID=@job.Reference&amp;JobTitle=@job.Title.Replace(' ','-')"> @job.Title </a> </li> } </ul> } else { @Translate("No jobs", "Ingen ledige stillinger") } </figcaption> </figure> } else { <div class="@boxStyle"> <div class="paragraph-inner"> @if (!string.IsNullOrEmpty(content.GetItem("Icon").GetList("Icons").SelectedValue)) { @RenderIconH3(content) } else { @RenderH3(content) } @RenderRichText(content) @if (joblist.Any(j => j.Region.FirstOrDefault().Label.Contains(jobLocation))) { <ul class="list-arrows"> @foreach (var job in joblist.Where(j => j.Region.FirstOrDefault().Label.Contains(jobLocation))) { <li> <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("annonce")?JobID=@job.Reference&amp;JobTitle=@job.Title.Replace(' ','-')"> @job.Title </a> </li> } </ul> } else { @Translate("No jobs", "Ingen ledige stillinger") } </div> </div> } </div> } </div> </div> } </div> @RenderButtonBelow(Model.Item) </div> @RenderSkew(Model.Item) </div> </section>