#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { BeginContext(13, 550, true); WriteLiteral(@" <div class=""table-responsive rounded""> <table class=""table table-striped table-bordered table-hover table-condensed table-sm table-active table-secondary""> <thead class=""thead-dark""> <tr> <th style=""width:30%;""></th> <th style=""width:10%;"">Item</th> <th style=""width:10%;"">Seller</th> <th style=""width:10%;"">Attributes</th> <th style=""width:10%;"">Quantity</th> <th class=""text-right"" style=""width:10%;"">Price</th> <th class=""text-right"" style=""width:10%;"">Subtotal</th> </tr> </thead> <tbody> "); EndContext(); #line 17 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" ECommerceService eCommerce = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService]; short count = 0; string removeAction = Url.Action("RemoveFromCart", "Cart"); string changeQuantityAction = Url.Action("ChangeQuantity", "Cart"); foreach (CartLine line in Model.Lines) { ProductView product = eCommerce.GetProductBy(line.SellerId, line.ProductTypeId); #line default #line hidden BeginContext(966, 32, true); WriteLiteral("\t\t\t\t\t<tr class=\"cartTableRow\">\r\n"); EndContext(); #line 26 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" if (product == null || product.Status != ProductStatus.Active || !product.Active || eCommerce.GetProductTypeBy(int.Parse(product.ProductTypeId)).Status != ProductTypeStatus.Active) { #line default #line hidden BeginContext(1220, 76, true); WriteLiteral("\t\t\t\t\t\t\t<td>This product is currently unavailable</td>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t"); EndContext(); BeginContext(1296, 236, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c698839", async() => { BeginContext(1370, 44, true); WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"index\""); EndContext(); BeginWriteAttribute("value", " value=\"", 1414, "\"", 1432, 1); #line 34 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" WriteAttributeValue("", 1422, count++, 1422, 10, false); #line default #line hidden EndWriteAttribute(); BeginContext(1433, 92, true); WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn btn-sm btn-danger\" value=\"Remove\" />\r\n\t\t\t\t\t\t\t\t"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); #line 33 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" AddHtmlAttributeValue("", 1341, removeAction, 1341, 13, false); #line default #line hidden EndAddHtmlAttributeValues(__tagHelperExecutionContext); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_1.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1532, 16, true); WriteLiteral("\r\n\t\t\t\t\t\t\t</td>\r\n"); EndContext(); #line 38 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" } else { #line default #line hidden BeginContext(1587, 11, true); WriteLiteral("\t\t\t\t\t\t\t<td>"); EndContext(); BeginContext(1598, 107, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c6911946", async() => { } ); __ECommerce_UI_MVC_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.MVC.Infrastructure.ImageTagHelper>(); __tagHelperExecutionContext.Add(__ECommerce_UI_MVC_Infrastructure_ImageTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); #line 42 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent = product.RepresentativeImage; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_MVC_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); #line 42 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" AddHtmlAttributeValue("", 1677, product.ProductTypeName, 1677, 24, false); #line default #line hidden EndAddHtmlAttributeValues(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1705, 36, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-left\">"); EndContext(); BeginContext(1742, 23, false); #line 43 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" Write(product.ProductTypeName); #line default #line hidden EndContext(); BeginContext(1765, 36, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-left\">"); EndContext(); BeginContext(1802, 18, false); #line 44 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" Write(product.SellerName); #line default #line hidden EndContext(); BeginContext(1820, 38, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-left\">\r\n"); EndContext(); #line 46 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" foreach (var attribute in line.Attributes) { #line default #line hidden BeginContext(1922, 12, true); WriteLiteral("\t\t\t\t\t\t\t\t\t<p>"); EndContext(); BeginContext(1935, 13, false); #line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" Write(attribute.Key); #line default #line hidden EndContext(); BeginContext(1948, 2, true); WriteLiteral(": "); EndContext(); BeginContext(1951, 15, false); #line 48 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" Write(attribute.Value); #line default #line hidden EndContext(); BeginContext(1966, 6, true); WriteLiteral("</p>\r\n"); EndContext(); #line 49 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" } #line default #line hidden BeginContext(1983, 55, true); WriteLiteral("\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t\t\t"); EndContext(); BeginContext(2038, 369, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c6916355", async() => { BeginContext(2124, 82, true); WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"quantity\" class=\"form-control quantityInput\""); EndContext(); BeginWriteAttribute("value", " value=\"", 2206, "\"", 2228, 1); #line 53 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" WriteAttributeValue("", 2214, line.Quantity, 2214, 14, false); #line default #line hidden EndWriteAttribute(); BeginContext(2229, 47, true); WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"index\""); EndContext(); BeginWriteAttribute("value", " value=\"", 2276, "\"", 2290, 1); #line 54 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" WriteAttributeValue("", 2284, count, 2284, 6, false); #line default #line hidden EndWriteAttribute(); BeginContext(2291, 109, true); WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn btn-sm btn-warning\" value=\"Change\" disabled hidden />\r\n\t\t\t\t\t\t\t\t"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); #line 52 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" AddHtmlAttributeValue("", 2087, changeQuantityAction, 2087, 21, false); #line default #line hidden EndAddHtmlAttributeValues(__tagHelperExecutionContext); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_1.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2407, 46, true); WriteLiteral("\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"text-right\">"); EndContext(); BeginContext(2454, 36, false); #line 58 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" Write(CurrencyFormat.Format(product.Price)); #line default #line hidden EndContext(); BeginContext(2490, 37, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td class=\"text-right\">"); EndContext(); BeginContext(2528, 67, false); #line 59 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" Write(CurrencyFormat.Format(decimal.Parse(product.Price) * line.Quantity)); #line default #line hidden EndContext(); BeginContext(2595, 28, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t"); EndContext(); BeginContext(2623, 236, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2b32a9e2a5d0dffa59fc4d3d8d5d8c17f62e8c6920703", async() => { BeginContext(2697, 44, true); WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"index\""); EndContext(); BeginWriteAttribute("value", " value=\"", 2741, "\"", 2759, 1); #line 62 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" WriteAttributeValue("", 2749, count++, 2749, 10, false); #line default #line hidden EndWriteAttribute(); BeginContext(2760, 92, true); WriteLiteral(" />\r\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn btn-sm btn-danger\" value=\"Remove\" />\r\n\t\t\t\t\t\t\t\t"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "action", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); #line 61 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" AddHtmlAttributeValue("", 2668, removeAction, 2668, 13, false); #line default #line hidden EndAddHtmlAttributeValues(__tagHelperExecutionContext); __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_1.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2859, 16, true); WriteLiteral("\r\n\t\t\t\t\t\t\t</td>\r\n"); EndContext(); #line 66 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" } #line default #line hidden BeginContext(2884, 12, true); WriteLiteral("\t\t\t\t\t</tr>\r\n"); EndContext(); #line 68 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" } #line default #line hidden BeginContext(2909, 111, true); WriteLiteral("\t\t</tbody>\r\n\t\t<tfoot>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"6\" class=\"text-right\">Total:</td>\r\n\t\t\t\t<td class=\"text-right\">"); EndContext(); BeginContext(3021, 65, false); #line 74 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.MVC\Views\Shared\Components\CartTable\Default.cshtml" Write(CurrencyFormat.FormatWithUnit(Model.ComputeTotalValue(eCommerce))); #line default #line hidden EndContext(); BeginContext(3086, 46, true); WriteLiteral("</td>\r\n\t\t\t</tr>\r\n\t\t</tfoot>\r\n\t</table>\r\n</div>"); EndContext(); }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { BeginContext(31, 550, true); WriteLiteral(@" <div class=""table-responsive rounded""> <table class=""table table-striped table-bordered table-hover table-condensed table-sm table-active table-secondary""> <thead class=""thead-dark""> <tr> <th style=""width:30%;""></th> <th style=""width:10%;"">Item</th> <th style=""width:10%;"">Seller</th> <th style=""width:10%;"">Attributes</th> <th style=""width:10%;"">Quantity</th> <th class=""text-right"" style=""width:10%;"">Price</th> <th class=""text-right"" style=""width:10%;"">Subtotal</th> </tr> </thead> <tbody> "); EndContext(); #line 17 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" ECommerceService eCommerce = (ECommerceService)ViewData[GlobalViewBagKeys.ECommerceService]; string removeAction = Url.Action("RemoveFromCart", "Cart"); string changeQuantityAction = Url.Action("ChangeQuantity", "Cart"); foreach (OrderView order in Model) { ProductView product = eCommerce.GetProductBy(int.Parse(order.SellerId), int.Parse(order.ProductTypeId)); #line default #line hidden BeginContext(982, 45, true); WriteLiteral("\t\t\t\t\t<tr class=\"orderTableRow\">\r\n\t\t\t\t\t\t<td>\r\n"); EndContext(); #line 26 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" if (product != null) { #line default #line hidden BeginContext(1065, 7, true); WriteLiteral("\t\t\t\t\t\t\t"); EndContext(); BeginContext(1072, 105, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "22910b03a2e4ab43cb8ff370c3ba50625d0eb9588895", async() => { } ); __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper = CreateTagHelper <global::ECommerce.UI.AdminSite.Infrastructure.ImageTagHelper>(); __tagHelperExecutionContext.Add(__ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); #line 28 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent = product.RepresentativeImage; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("file-content", __ECommerce_UI_AdminSite_Infrastructure_ImageTagHelper.FileContent, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); #line 28 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" AddHtmlAttributeValue("", 1151, order.ProductTypeName, 1151, 22, false); #line default #line hidden EndAddHtmlAttributeValues(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1177, 2, true); WriteLiteral("\r\n"); EndContext(); #line 29 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" } else { #line default #line hidden BeginContext(1209, 7, true); WriteLiteral("\t\t\t\t\t\t\t"); EndContext(); BeginContext(1216, 88, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "22910b03a2e4ab43cb8ff370c3ba50625d0eb95811256", async() => { } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "alt", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); #line 32 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" AddHtmlAttributeValue("", 1278, order.ProductTypeName, 1278, 22, false); #line default #line hidden EndAddHtmlAttributeValues(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1304, 2, true); WriteLiteral("\r\n"); EndContext(); #line 33 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" } #line default #line hidden BeginContext(1315, 41, true); WriteLiteral("\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class=\"text-left\">"); EndContext(); BeginContext(1356, 160, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "22910b03a2e4ab43cb8ff370c3ba50625d0eb95813282", async() => { BeginContext(1491, 21, false); #line 35 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" Write(order.ProductTypeName); #line default #line hidden EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_3.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-productTypeId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 35 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" WriteLiteral(order.ProductTypeId); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-productTypeId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["productTypeId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1516, 35, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-left\">"); EndContext(); BeginContext(1551, 140, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "22910b03a2e4ab43cb8ff370c3ba50625d0eb95816446", async() => { BeginContext(1671, 16, false); #line 36 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" Write(order.SellerName); #line default #line hidden EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_3.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_5.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-sellerId", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 36 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" WriteLiteral(order.SellerId); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-sellerId", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["sellerId"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(1691, 37, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-left\">\r\n"); EndContext(); #line 38 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" foreach (var attribute in order.Attributes) { #line default #line hidden BeginContext(1791, 11, true); WriteLiteral("\t\t\t\t\t\t\t\t<p>"); EndContext(); BeginContext(1803, 13, false); #line 40 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" Write(attribute.Key); #line default #line hidden EndContext(); BeginContext(1816, 2, true); WriteLiteral(": "); EndContext(); BeginContext(1819, 15, false); #line 40 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" Write(attribute.Value); #line default #line hidden EndContext(); BeginContext(1834, 6, true); WriteLiteral("</p>\r\n"); EndContext(); #line 41 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" } #line default #line hidden BeginContext(1850, 43, true); WriteLiteral("\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class=\"text-center\">"); EndContext(); BeginContext(1894, 14, false); #line 43 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" Write(order.Quantity); #line default #line hidden EndContext(); BeginContext(1908, 36, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-right\">"); EndContext(); BeginContext(1945, 41, false); #line 44 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" Write(CurrencyFormat.Format(order.CurrentPrice)); #line default #line hidden EndContext(); BeginContext(1986, 36, true); WriteLiteral("</td>\r\n\t\t\t\t\t\t<td class=\"text-right\">"); EndContext(); BeginContext(2023, 84, false); #line 45 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" Write(CurrencyFormat.Format(decimal.Parse(order.CurrentPrice) * int.Parse(order.Quantity))); #line default #line hidden EndContext(); BeginContext(2107, 19, true); WriteLiteral("</td>\r\n\t\t\t\t\t</tr>\r\n"); EndContext(); #line 47 "C:\Users\hando\Desktop\ECommerce\ECommerce.UI.AdminSite\Views\Shared\DisplayTemplates\OrdersTable.cshtml" } #line default #line hidden BeginContext(2139, 29, true); WriteLiteral("\t\t</tbody>\r\n\t</table>\r\n</div>"); EndContext(); }
public async Task <IActionResult> UpdateProduct(UpdateProductViewModel updateViewModel, IFormFile representativeImage, IList <string> keys, IList <string> values, IEnumerable <IFormFile> images) { SellerView seller = loginPersistence.PersistLogin(); ViewData[GlobalViewBagKeys.ECommerceService] = eCommerce; if (ModelState.IsValid) { ICollection <string> errors = new List <string>(); //product attributes var attributes = new Dictionary <string, HashSet <string> >(); for (short i = 0; i < keys.Count; i++) { if (!string.IsNullOrEmpty(keys[i]) && !attributes.Any(a => a.Key == keys[i]) && values[i] != null) { HashSet <string> separatedValues = values[i] .Split(',', StringSplitOptions.RemoveEmptyEntries) .ToHashSet(); if (separatedValues.Any()) { attributes.Add(keys[i], separatedValues); } } } updateViewModel.UpdateModel.Attributes = attributes; //product images if (updateViewModel.UpdateImages) { if (images.Any()) { var imagesList = new List <FileContent>(); foreach (IFormFile image in images) { using (MemoryStream memoryStream = new MemoryStream()) { await image.CopyToAsync(memoryStream); imagesList.Add(new FileContent(memoryStream.ToArray(), image.ContentType)); } } updateViewModel.UpdateModel.Images = imagesList; } } else //keep old images { updateViewModel.UpdateModel.Images = eCommerce .GetProductImages(int.Parse(seller.Id), updateViewModel.ProductTypeId); } //product representative image if (updateViewModel.UpdateRepresentativeImage) { if (representativeImage != null) { using (MemoryStream memoryStream = new MemoryStream()) { await representativeImage.CopyToAsync(memoryStream); updateViewModel.UpdateModel.RepresentativeImage = new FileContent(memoryStream.ToArray(), representativeImage.ContentType); } } else { errors.Add("Representative image is required"); } } else //keep old representative image { updateViewModel.UpdateModel.RepresentativeImage = eCommerce.GetProductBy(int.Parse(seller.Id), updateViewModel.ProductTypeId).RepresentativeImage; } if (errors.Any()) { return(View(updateViewModel)); } eCommerce.UpdateProduct(int.Parse(seller.Id), updateViewModel.ProductTypeId, updateViewModel.UpdateModel, out errors); if (errors.Any()) { ViewData[GlobalViewBagKeys.Errors] = errors; } else { ICollection <string> messages = new List <string>(); messages.Add("Update product succeed"); ViewData[GlobalViewBagKeys.Messages] = messages; return(RedirectToAction("Product")); } } return(View(updateViewModel)); }
public IActionResult Detail(int sellerId, int productTypeId) { ViewData[GlobalViewBagKeys.ECommerceService] = eCommerce; return(View(eCommerce.GetProductBy(sellerId, productTypeId))); }
public virtual decimal ComputeTotalValue(ECommerceService eCommerce) { return(Lines .Sum(l => decimal.Parse(eCommerce.GetProductBy(l.SellerId, l.ProductTypeId).Price) * l.Quantity)); }