🎉NOW OPEN: Professor Brawn Bistro near The Art Faculty flagship @Enabling Village! Mon-Fri 11am-9pm; Sat & P.H. 9am-9pm

x
Error executing template "/Designs/Rapido/Paragraph/ArtistProfile.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_6ffddd61c81f47b68eb8f57bae3f4ec6.Execute() in F:\DWWEBSITE\TAFWEB\Solutions\Files\Templates\Designs\Rapido\Paragraph\ArtistProfile.cshtml:line 98
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System.IO; 3 @using System.Web; 4 @using System.Text; 5 @using System.Collections.Generic; 6 @using System.Linq 7 @using System.Text.RegularExpressions; 8 9 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 10 <style> 11 .bg-none{background-color: none !important;} 12 13 body{overflow-x: hidden;} 14 </style> 15 16 @{ 17 bool isUser = Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn(); 18 19 var mfid = System.Web.HttpContext.Current.Request["manufacturerid"]; 20 var artistName = System.Web.HttpContext.Current.Request["artistName"]; 21 var userid = ""; 22 var Artistname = ""; 23 var ArtistDescription = ""; 24 var ArtistImg = ""; 25 26 var tempImage=""; 27 28 string ArtistArticleSql = "SELECT DISTINCT * FROM itemtype_basearticle where id in (SELECT id FROM itemtype_artistarticle WHERE manufacturer='"+mfid+"' AND author LIKE '%"+artistName+"%')"; 29 System.Data.IDataReader ArtistArticle = Dynamicweb.Data.Database.CreateDataReader(ArtistArticleSql); 30 while (ArtistArticle.Read()) 31 { 32 Artistname = ArtistArticle["Title"].ToString(); 33 ArtistDescription = ArtistArticle["TEXT"].ToString(); 34 ArtistImg = ArtistArticle["Image"].ToString(); 35 tempImage = ArtistArticle["Image"].ToString(); 36 } 37 38 var action = "insert"; 39 var status = "true"; 40 var liked = ""; 41 42 userid = GetGlobalValue("Global:Extranet.UserID"); 43 44 45 46 47 if( isUser ){ 48 userid = System.Web.HttpContext.Current.Request["loginID"]; 49 50 string getStatusSql = "SELECT ArtistLike FROM ArtistLikes WHERE ArtistManufacturerId='"+mfid+"' AND UserId='"+userid+"';"; 51 52 System.Data.IDataReader getStatus = Dynamicweb.Data.Database.CreateDataReader(getStatusSql) ; 53 while (getStatus.Read()) 54 { 55 liked = getStatus["ArtistLike"].ToString(); 56 action = "update"; 57 } 58 if( liked == "1" ){ 59 status = "false"; 60 } 61 } 62 63 ////////////////////////////////////////////////////////////////////////////////// 64 65 List<string> imagesList = new List<string>(); 66 //string folderPath = HttpContext.Current.Server.MapPath("/Files/Images/Default/"); 67 68 string folderPath = HttpContext.Current.Server.MapPath("Files/Images/Artists/"); 69 string pattern=Artistname+"*"; 70 foreach (string file in Directory.GetFiles(folderPath, pattern)) 71 { 72 string tmpImage=tempImage.Replace("/Images/Artists/",""); 73 string temp = @"\"; 74 75 string TMPIMG = file.Substring((file.LastIndexOf(@temp) + 1), (file.Length - file.LastIndexOf(@temp) - 1)); 76 77 if(TMPIMG.Contains("_")){ 78 79 imagesList.Add("/Files/Images/Artists/"+TMPIMG);} 80 81 } 82 83 84 ///////////////////////////////////////////////////////////////////////////////// 85 86 var index1 = 1; var index2 = 1; 87 } 88 89 <script> 90 console.log("APP NAME : " + navigator.appCodeName ); 91 var likeAction = '@action'; 92 var likeStatus = '@status'; 93 </script> 94 95 <div class="container"> 96 <ul class="breadcrumb"> 97 <li class="breadcrumb__item">@GetString("Item.ParagraphName")</li> 98 <li class="breadcrumb__item" style="text-transform:capitalize">@artistName.ToLower()</li> 99 </ul> 100 </div> 101 <div class="grid__col-lg-12 grid__col-md-12 grid__col-sm-12 grid__col-xs-12 paragraph-container paragraph-container-artist"> 102 103 <section class="artist-shop-content mt-5 bg-peach"> 104 <div class="container"> 105 <div class="row"> 106 <div class="col-12 col-md-4 col-sm-6 pb-4 mb-4 temp-h400"> 107 <img id="artistImageDisplay" class="img-fluid shop-image" src="@ArtistImg" /> 108 @foreach (String imageStr in imagesList) { 109 try 110 { 111 <img id="img_@index1" class="img-fluid shop-image hide" src='@imageStr' alt="" /> 112 index1++; 113 } 114 catch (Exception e) 115 { 116 117 } 118 } 119 @if(imagesList.Count > 0 ){ 120 <div class="bg-none p-3 d-none d-sm-block d-sm-none d-md-block mt-3"> 121 @foreach (String imageStr in imagesList) { 122 try 123 { 124 125 <img id='@index2' class="img-fluid shop-image artist_thumbnail" src='/Admin/Public/GetImage.ashx?width=100&height=100&crop=5&Compression=75&image=@imageStr' data-src='@imageStr' alt="" /> 126 index2++; 127 } 128 catch (Exception e) 129 { 130 131 } 132 } 133 </div> 134 } 135 </div> 136 <div class="col-12 col-md-5 col-sm-6 pt-4 pb-4"> 137 <h1 class="text-uppercase">@Artistname<h1> 138 @ArtistDescription 139 </div> 140 <div class="col-12 col-md-3 col-sm-12 pt-4 pb-4 text-center"> 141 <ul class="list-unstyled"> 142 @* @if( userIsLoggedIn ){ 143 <li><a onclick="addShopFavourite( shopLikeAction , shopLikeStatus )" class="shop-btn-like btn-grey btn"><i class="fa fa-star" aria-hidden="true"></i> Favourite this Shop</a></li> 144 <li><a class="btn-grey btn" href=""><i class="fa fa-star" aria-hidden="true"></i> Meet our Artist</a></li> 145 } 146 *@ 147 @if( isUser ){ 148 <li><a onclick="favouriteArtist(likeAction, likeStatus)" class="btn-like btn-grey btn"><i class="fa fa-hand-peace-o" aria-hidden="true"></i> @Translate("Like This Artist", "Like This Artist")</a></li> 149 } 150 </ul> 151 </div> 152 </div> 153 </div> 154 </section> 155 </div> 156 157 <script> 158 function favouriteArtist(action, status){ 159 var url = "/Default.aspx?id=631&manufacturerid=@mfid&userid=@userid&action="+action+"&status="+status; 160 console.log(" URL : " + url ); 161 162 $.ajax({ 163 url : url, 164 dataType : "html", 165 success : function( data ){ 166 if( status != "true" ){ 167 $('.btn-like').removeClass('liked'); 168 likeStatus = "true"; 169 likeAction = "update"; 170 }else{ 171 $('.btn-like').addClass('liked'); 172 likeStatus = "false"; 173 likeAction = "update"; 174 } 175 } 176 }); 177 } 178 </script>

Artist's Products

 
Thunder in Trees

$800.00

 
White Tiger

$800.00

 
Yellow Leopard

$450.00

 
Cat at Rest

$90.00

Showing page 31 of 76 (456 products)

The Art Faculty is a platform to promote the special talents of people with autism and related challenges.

Rate Artist