Pentru preț și disponibilitate stoc, autentifică-te sau solicită cont
Marker magic cu varf de fibre. Cerneala cu sclipici.Ideal pentru modele creative, felicitari, decoratiuni de Craciun, artizanat... varf de 1 mm. Blister cu 8 markere.
Depunem un efort constant pentru pastrarea acuratetii informatiilor. In unele cazuri specificatiile si informatiile prezentate pe site-ul www.RTC.ro pot contine mici inadvertente. Fotografiile produselor au caracter informativ, pot contine accesorii neincluse in pachetele standard si nu reprezinta obligatie contractuala.
Error executing template "/Designs/Swift/Paragraph/RTC_AssortmentCheck.cshtml" System.Data.SqlClient.SqlException (0x80131904): The server principal "altexrtc.d365.staging.dynamicweb-cms.com" is not able to access the database "altexrtc.cloud.dynamicweb-cms.com" under the current security context. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at CompiledRazorTemplates.Dynamic.RazorEngine_e332545b67d442089927651b8d4b7486.UserHasAccessToProduct(String UserID, String ProductID) in D:\dynamicweb.net\Solutions\Altex Holding\altexrtc.d365.staging.dynamicweb-cms.com\Files\Templates\Designs\Swift\Paragraph\RTC_AssortmentCheck.cshtml:line 148 at CompiledRazorTemplates.Dynamic.RazorEngine_e332545b67d442089927651b8d4b7486.Execute() in D:\dynamicweb.net\Solutions\Altex Holding\altexrtc.d365.staging.dynamicweb-cms.com\Files\Templates\Designs\Swift\Paragraph\RTC_AssortmentCheck.cshtml:line 56 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.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate() ClientConnectionId:1aa907b8-a1ef-419a-abdd-815f227b72a2 Error Number:916,State:2,Class:14 1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = new ProductViewModel(); 6 7 ProductViewModelSettings productSetting = new ProductViewModelSettings 8 { 9 LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID, 10 CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 11 CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2, 12 ShopId = Pageview.Area.EcomShopId 13 }; 14 15 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 16 { 17 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 18 19 } else if (Pageview.Item["DummyProduct"] != null) { 20 string dummyProductId = ""; 21 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 22 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 23 if (productList.Products != null) 24 { 25 foreach (var p in productList.Products) { dummyProductId = p.Id; } 26 ProductViewModel dummyProduct = dummyProductId != "" ? ViewModelFactory.CreateView(productSetting, dummyProductId) : new ProductViewModel(); 27 product = dummyProduct; 28 } else { 29 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 30 } 31 } else if (Pageview.Item["DummyProduct"] == null) { 32 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 33 } 34 35 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 36 horizontalAlign = horizontalAlign == "center" ? "text-center" : horizontalAlign; 37 horizontalAlign = horizontalAlign == "end" ? "text-end" : horizontalAlign; 38 39 var productIDx = ""; 40 41 try 42 { 43 productIDx = product.Id; 44 } 45 catch (Exception ex) 46 { 47 productIDx = "no product field found"; 48 } 49 } 50 51 @{ 52 var userIDx = (Pageview.User != null) ? Pageview.User.ID.ToString() : "56895"; 53 54 } 55 56 @if (!UserHasAccessToProduct(userIDx, productIDx)) { 57 58 <script> 59 var overlay = document.createElement('div'); 60 overlay.style.width = '100%'; 61 overlay.style.height = '100%'; 62 overlay.style.backgroundColor = 'rgba(0, 0, 23, 0.99)'; 63 overlay.style.zIndex = '1000'; 64 overlay.style.top = '0'; 65 overlay.style.left = '0'; 66 overlay.classList.add('position-fixed'); 67 var button = document.createElement('button'); 68 button.textContent = 'Nu ai acces la acest produs!'; 69 button.classList.add('btn', 'btn-primary'); 70 button.style.position = 'absolute'; 71 button.style.top = '50%'; 72 button.style.left = '50%'; 73 button.style.transform = 'translate(-50%, -50%)'; 74 button.addEventListener('click', function() { 75 window.location.href = '/'; 76 }); 77 78 79 overlay.appendChild(button); 80 81 82 document.body.appendChild(overlay); 83 84 85 </script> 86 } 87 88 89 90 @functions { 91 public bool UserHasAccessToProduct(string UserID, string ProductID) 92 { 93 bool hasAccess = false; 94 using (var command = Dynamicweb.Data.Database.CreateConnection().CreateCommand()) 95 { 96 command.CommandText = @" 97 WITH UserGroupTable AS (SELECT a.[GroupId] 98 ,a.[AccessUserID] 99 100 FROM [altexrtc.cloud.dynamicweb-cms.com].[dbo].[vwGroupUsers] AS a 101 INNER JOIN AccessUser AS b 102 ON a.GroupId = b.AccessUserID 103 104 WHERE a.AccessUserID = @UserID 105 AND b.AccessUserCustomerNumber = a.AccessUserCustomerNumber 106 ), 107 CombinedUserGroupTable AS ( 108 SELECT 109 AccessUserID, 110 NULL AS GroupID 111 FROM [AccessUser] 112 WHERE AccessUserID = @UserID 113 UNION ALL 114 SELECT 115 AccessUserID, 116 GroupID 117 FROM UserGroupTable 118 ) 119 SELECT 120 CASE 121 WHEN COUNT(*) > 0 THEN 'True' 122 ELSE 'False' 123 END AS UserHasAccess 124 FROM CombinedUserGroupTable c 125 JOIN [EcomAssortmentPermissions] p 126 ON c.AccessUserID = p.AssortmentPermissionAccessUserID OR c.GroupID = p.AssortmentPermissionAccessUserID 127 JOIN [EcomAssortmentItems] a 128 ON p.AssortmentPermissionAssortmentID = a.AssortmentItemAssortmentID 129 WHERE a.AssortmentItemProductID = @ProductID 130 "; 131 132 133 134 command.Parameters.Add(new System.Data.SqlClient.SqlParameter() 135 { 136 ParameterName = "UserID", 137 SqlDbType = System.Data.SqlDbType.NVarChar, 138 Value = UserID 139 }); 140 141 command.Parameters.Add(new System.Data.SqlClient.SqlParameter() 142 { 143 ParameterName = "ProductID", 144 SqlDbType = System.Data.SqlDbType.NVarChar, 145 Value = ProductID 146 }); 147 148 using (var reader = command.ExecuteReader()) 149 { 150 if (reader.Read()) 151 { 152 string result = reader.GetString(0); 153 hasAccess = result == "True"; 154 } 155 } 156 } 157 return hasAccess; 158 } 159 } 160 161 162
Solutii complete pentru mediul tau de lucru
Noi și partenerii noștri folosim tehnologii, inclusiv cookie-uri, pentru a colecta informații despre dumneavoastră în diverse scopuri, inclusiv::
Prin click pe „Acceptați Tot”, vă exprimați consimțământul pentru toate aceste scopuri..
Puteți afla mai multe despre utilizarea noastră a cookie-urilor și a altor tehnologii, precum și despre colectarea și prelucrarea datelor cu caracter personal, făcând clic aici: