public User returnUser() { String email = User.Identity.Name; fridgepzContext db = new fridgepzContext(); var query = from p in db.User where p.Email.Equals(email) select p; User user = query.Single(); return(user); }
public HomeController(fridgepzContext context) { _context = context; }
public ItemsController(fridgepzContext context) { _context = context; }
public AccountController(fridgepzContext context) { db = context; }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { BeginContext(42, 2, true); WriteLiteral("\r\n"); EndContext(); #line 3 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" ViewData["Title"] = "Index"; #line default #line hidden BeginContext(85, 29, true); WriteLiteral("\r\n<h1>Index</h1>\r\n\r\n<p>\r\n "); EndContext(); BeginContext(114, 111, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "44a0cfaf7229be62fdc13df57997ff6b3ec7ddac4557", async() => { BeginContext(137, 84, true); WriteLiteral("<button type=\"button\" class=\"btn btn-secondary btn-info\">Dodaj nowy produkt</button>"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_0.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(225, 1350, true); WriteLiteral(@" </p> <div class=""limiter""> <div class=""table100 ver5 m-b-110""> <table data-vertable=""ver5"" width: 100%> <thead> <tr class=""row100 head""> <th class=""column100 column2"" data-column=""column2""> BarCode </th> <th class=""column100 column2"" data-column=""column2""> Measure Unit </th> <th class=""column100 column3"" data-column=""column3""> How much left </th> <th class=""column100 column4"" data-column=""column4""> Name </th> <th class=""column100 column5"" data-column=""column5""> CategoryItemPattern </th> <th class=""column100 column6"" data-column=""column6""> Photo </th> "); WriteLiteral(@" <th class=""column100 column7"" data-column=""column7""> Expiration date </th > <th class=""column100 column8"" data-column=""column8""> Actions </th> </tr> </thead> <tbody> "); EndContext(); #line 44 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" foreach (var item in Model) { fridgepzContext _context = new fridgepzContext(); Itempattern pat = await _context.Itempattern.FindAsync(item.ItemPatternId); Categoryitempattern cat = await _context.Categoryitempattern.FindAsync(pat.CategoryItemPatternId); DateTime date = item.ExpirationDate ?? DateTime.Now; String only_date = date.ToString("dd/MM/yyyy"); #line default #line hidden BeginContext(2073, 132, true); WriteLiteral(" <tr>\r\n <td class=\"column100 column2\" data-column=\"column2\">\r\n "); EndContext(); BeginContext(2206, 11, false); #line 54 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" Write(pat.BarCode); #line default #line hidden EndContext(); BeginContext(2217, 139, true); WriteLiteral("\r\n </td>\r\n <td class=\"column100 column2\" data-column=\"column2\">\r\n "); EndContext(); BeginContext(2357, 8, false); #line 57 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" Write(pat.Unit); #line default #line hidden EndContext(); BeginContext(2365, 139, true); WriteLiteral("\r\n </td>\r\n <td class=\"column100 column3\" data-column=\"column3\">\r\n "); EndContext(); BeginContext(2505, 16, false); #line 60 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" Write(item.HowMuchLeft); #line default #line hidden EndContext(); BeginContext(2521, 139, true); WriteLiteral("\r\n </td>\r\n <td class=\"column100 column4\" data-column=\"column4\">\r\n "); EndContext(); BeginContext(2661, 8, false); #line 63 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" Write(pat.Name); #line default #line hidden EndContext(); BeginContext(2669, 139, true); WriteLiteral("\r\n </td>\r\n <td class=\"column100 column5\" data-column=\"column5\">\r\n "); EndContext(); BeginContext(2809, 8, false); #line 66 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" Write(cat.Name); #line default #line hidden EndContext(); BeginContext(2817, 143, true); WriteLiteral("\r\n </td>\r\n <td class=\"column100 column6\" data-column=\"column6\">\r\n <img"); EndContext(); BeginWriteAttribute("src", " src=\"", 2960, "\"", 2988, 2); WriteAttributeValue("", 2966, "/images/", 2966, 8, true); #line 69 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" WriteAttributeValue("", 2974, pat.PhotoName, 2974, 14, false); #line default #line hidden EndWriteAttribute(); BeginContext(2989, 153, true); WriteLiteral(" width=\"60\" />\r\n </td>\r\n <td class=\"column100 column7\" data-column=\"column7\">\r\n "); EndContext(); BeginContext(3143, 9, false); #line 72 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" Write(only_date); #line default #line hidden EndContext(); BeginContext(3152, 236, true); WriteLiteral("\r\n </td>\r\n <td class=\"column100 column8\" data-column=\"column8\">\r\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\r\n "); EndContext(); BeginContext(3388, 126, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "44a0cfaf7229be62fdc13df57997ff6b3ec7ddac12273", async() => { BeginContext(3441, 69, true); WriteLiteral("<button type=\"button\" class=\"btn btn-secondary btn-danger\">-</button>"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 76 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" WriteLiteral(item.ItemId); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], 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(3514, 151, true); WriteLiteral("\r\n </div>\r\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\r\n "); EndContext(); BeginContext(3665, 127, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "44a0cfaf7229be62fdc13df57997ff6b3ec7ddac14895", async() => { BeginContext(3716, 72, true); WriteLiteral("<button type=\"button\" class=\"btn btn-secondary btn-danger\">Usuń</button>"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_2.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2); if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null) { throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); } BeginWriteTagHelperAttribute(); #line 79 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" WriteLiteral(item.ItemId); #line default #line hidden __tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer; __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], 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(3792, 98, true); WriteLiteral("\r\n </div>\r\n </td>\r\n\r\n </tr>\r\n"); EndContext(); #line 84 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Index.cshtml" } #line default #line hidden BeginContext(3909, 743, true); WriteLiteral(@" </tbody> </table> </div> </div> <!--===============================================================================================--> <script src=""vendor/jquery/jquery-3.2.1.min.js""></script> <!--===============================================================================================--> <script src=""vendor/bootstrap/js/popper.js""></script> <script src=""vendor/bootstrap/js/bootstrap.min.js""></script> <!--===============================================================================================--> <script src=""vendor/select2/select2.min.js""></script> <!--===============================================================================================--> <script src=""js/main.js""></script>"); EndContext(); }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { BeginContext(42, 2, true); WriteLiteral("\r\n"); EndContext(); #line 3 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" ViewData["Title"] = "Status"; #line default #line hidden BeginContext(86, 87, true); WriteLiteral("\r\n<h1>Twoje przeterminowane produkty</h1>\r\n\r\n<table class=\"table\">\r\n \r\n <tbody>\r\n"); EndContext(); #line 12 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" foreach (var item in Model) { #line default #line hidden BeginContext(224, 18, true); WriteLiteral(" <tr>\r\n"); EndContext(); #line 16 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" fridgepzContext data = new fridgepzContext(); var query3 = from itempattern in data.Itempattern join _item in data.Item on itempattern.ItemPatternId equals item.ItemPatternId where _item.ItemPatternId == item.ItemPatternId && _item.NotificationId == 1 select itempattern; Itempattern product = query3.Distinct().FirstOrDefault(); DateTime date = item.ExpirationDate ?? DateTime.Now; String only_date = date.ToString("dd/MM/yyyy"); #line default #line hidden BeginContext(919, 118, true); WriteLiteral("\r\n <td>\r\n <div class=\"alert alert-danger\">\r\n <strong>Produkt "); EndContext(); BeginContext(1038, 42, false); #line 29 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" Write(Html.DisplayFor(modelItem => product.Name)); #line default #line hidden EndContext(); BeginContext(1080, 35, true); WriteLiteral(": </strong> został przeterminowany "); EndContext(); BeginContext(1116, 9, false); #line 29 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" Write(only_date); #line default #line hidden EndContext(); BeginContext(1125, 74, true); WriteLiteral("\r\n </div>\r\n </td>\r\n\r\n </tr>\r\n"); EndContext(); #line 34 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" } #line default #line hidden BeginContext(1210, 8, true); WriteLiteral(" "); EndContext(); #line 35 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" String email = User.Identity.Name; fridgepzContext db = new fridgepzContext(); var query = from p in db.User where p.Email.Equals(email) select p; User cur_user = query.Single(); fridgepzContext _context = new fridgepzContext(); var query2 = from itempattern in _context.Itempattern join item in _context.Item on itempattern.ItemPatternId equals item.ItemPatternId join shelf in _context.Shelf on item.ShelfId equals shelf.ShelfId join storage in _context.Storage on shelf.StorageId equals storage.StorageId join privelege in _context.Privilege on storage.StorageId equals privelege.StorageId join user in _context.User on privelege.UserId equals user.UserId where user == cur_user && item.NotificationId == 3 select item; List <Item> item_not3 = query2.ToList(); foreach (var not3 in item_not3) { #line default #line hidden BeginContext(2324, 22, true); WriteLiteral(" <tr>\r\n"); EndContext(); #line 56 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" var query4 = from itempattern in db.Itempattern join _item in db.Item on itempattern.ItemPatternId equals _item.ItemPatternId where _item.ItemPatternId == not3.ItemPatternId && _item.NotificationId == 3 select itempattern; Itempattern product = query4.Distinct().FirstOrDefault(); DateTime date = not3.ExpirationDate ?? DateTime.Now; DateTime nowdate = DateTime.Now.Date; double diff = (date - nowdate).TotalDays; #line default #line hidden BeginContext(3048, 126, true); WriteLiteral(" <td>\r\n <div class=\"alert alert-info\">\r\n <strong>Produkt "); EndContext(); BeginContext(3175, 42, false); #line 69 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" Write(Html.DisplayFor(modelItem => product.Name)); #line default #line hidden EndContext(); BeginContext(3217, 40, true); WriteLiteral(": </strong> zostanie przeterminowany za "); EndContext(); BeginContext(3258, 4, false); #line 69 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" Write(diff); #line default #line hidden EndContext(); BeginContext(3262, 90, true); WriteLiteral(" dni\r\n </div>\r\n </td>\r\n\r\n </tr>\r\n"); EndContext(); #line 74 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Items\Status.cshtml" } #line default #line hidden BeginContext(3380, 24, true); WriteLiteral(" </tbody>\r\n</table>\r\n"); EndContext(); }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { #line 2 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" ViewData["Title"] = "Home Page"; #line default #line hidden BeginContext(94, 76, true); WriteLiteral(" <div class=\"text-center\">\r\n <h1 class=\"display-4\">Fridge</h1>\r\n\r\n"); EndContext(); #line 8 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" String email = User.Identity.Name; fridgepzContext db = new fridgepzContext(); var query = from p in db.User where p.Email.Equals(email) select p; User user = query.Single(); var query1 = from _user in db.User join _privilege in db.Privilege on _user.UserId equals _privilege.UserId join _storage in db.Storage on _privilege.StorageId equals _storage.StorageId join _shelf in db.Shelf on _storage.StorageId equals _shelf.StorageId join _item in db.Item on _shelf.ShelfId equals _item.ShelfId where _item.NotificationId == 1 && user.UserId == _user.UserId select _item; var query2 = from _user in db.User join _privilege in db.Privilege on _user.UserId equals _privilege.UserId join _storage in db.Storage on _privilege.StorageId equals _storage.StorageId join _shelf in db.Shelf on _storage.StorageId equals _shelf.StorageId join _item in db.Item on _shelf.ShelfId equals _item.ShelfId where _item.NotificationId == 3 && user.UserId == _user.UserId select _item; List <Item> product = query1.ToList(); List <Item> awareProduct = query2.ToList(); if (product != null) { if (product.Count == 0) { if (awareProduct.Count == 0) { } else { #line default #line hidden BeginContext(1876, 134, true); WriteLiteral(" <div class=\"alert alert-info\">\r\n <strong>Number of products with alerts: </strong> "); EndContext(); BeginContext(2011, 18, false); #line 42 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(awareProduct.Count); #line default #line hidden EndContext(); BeginContext(2029, 34, true); WriteLiteral("\r\n </div>\r\n"); EndContext(); #line 44 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" } } else { if (awareProduct.Count == 0) { #line default #line hidden BeginContext(2219, 132, true); WriteLiteral(" <div class=\"alert alert-danger\">\r\n <strong>Number of products expired: </strong> "); EndContext(); BeginContext(2352, 13, false); #line 51 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(product.Count); #line default #line hidden EndContext(); BeginContext(2365, 34, true); WriteLiteral("\r\n </div>\r\n"); EndContext(); #line 53 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" } else { #line default #line hidden BeginContext(2475, 132, true); WriteLiteral(" <div class=\"alert alert-danger\">\r\n <strong>Number of products expired: </strong> "); EndContext(); BeginContext(2608, 13, false); #line 59 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(product.Count); #line default #line hidden EndContext(); BeginContext(2621, 168, true); WriteLiteral("\r\n </div>\r\n <div class=\"alert alert-info\">\r\n <strong>Number of products with alerts: </strong> "); EndContext(); BeginContext(2790, 18, false); #line 62 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(awareProduct.Count); #line default #line hidden EndContext(); BeginContext(2808, 34, true); WriteLiteral("\r\n </div>\r\n"); EndContext(); #line 64 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" } } } #line default #line hidden BeginContext(2910, 81, true); WriteLiteral("\r\n\r\n\r\n\r\n\r\n <p>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(2991, 73, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "74dde996cad106941126be6574cc2aefa2a0977711654", async() => { BeginContext(3037, 23, true); WriteLiteral("Add item to application"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_0.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(3064, 12, true); WriteLiteral(" </button>\r\n"); EndContext(); #line 75 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" if (User.Identity.IsAuthenticated) { #line default #line hidden BeginContext(3140, 62, true); WriteLiteral(" <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(3202, 87, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "74dde996cad106941126be6574cc2aefa2a0977713531", async() => { BeginContext(3266, 19, true); WriteLiteral("Show all your items"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_2.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_3.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(3289, 12, true); WriteLiteral(" </button>\r\n"); EndContext(); #line 78 "C:\Users\Lenovo\Documents\FridgeWspolne\fridge-master\Fridge_PZ(najnowsza)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" } else { } #line default #line hidden BeginContext(3338, 58, true); WriteLiteral(" <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(3396, 80, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "74dde996cad106941126be6574cc2aefa2a0977715579", async() => { BeginContext(3445, 27, true); WriteLiteral("Add category to application"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_4.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(3476, 70, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(3546, 72, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "74dde996cad106941126be6574cc2aefa2a0977717130", async() => { BeginContext(3594, 20, true); WriteLiteral("Show all categories "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_5.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(3618, 70, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(3688, 64, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "74dde996cad106941126be6574cc2aefa2a0977718674", async() => { BeginContext(3733, 15, true); WriteLiteral("Show all items "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_6.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(3752, 70, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(3822, 74, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "74dde996cad106941126be6574cc2aefa2a0977720213", async() => { BeginContext(3868, 24, true); WriteLiteral("Add item to application "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_0.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(3896, 69, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-danger\">"); EndContext(); BeginContext(3965, 69, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "74dde996cad106941126be6574cc2aefa2a0977721760", async() => { BeginContext(4009, 21, true); WriteLiteral("Your expired products"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_7.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(4034, 40, true); WriteLiteral(" </button>\r\n\r\n </p>\r\n </div>\r\n"); EndContext(); }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { #line 2 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" ViewData["Title"] = "Home Page"; #line default #line hidden BeginContext(94, 76, true); WriteLiteral(" <div class=\"text-center\">\r\n <h1 class=\"display-4\">Fridge</h1>\r\n\r\n"); EndContext(); #line 8 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" fridgepzContext db = new fridgepzContext(); var query1 = from itempattern in db.Itempattern join _item in db.Item on itempattern.ItemPatternId equals _item.ItemPatternId where _item.NotificationId == 1 select _item; var query2 = from itempattern in db.Itempattern join _item in db.Item on itempattern.ItemPatternId equals _item.ItemPatternId where _item.NotificationId == 3 select _item; List <Item> product = query1.ToList(); List <Item> awareProduct = query2.ToList(); if (product != null) { if (product.Count == 0) { if (awareProduct.Count == 0) { } else { #line default #line hidden BeginContext(1092, 134, true); WriteLiteral(" <div class=\"alert alert-info\">\r\n <strong>Number of products with alerts: </strong> "); EndContext(); BeginContext(1227, 18, false); #line 32 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(awareProduct.Count); #line default #line hidden EndContext(); BeginContext(1245, 34, true); WriteLiteral("\r\n </div>\r\n"); EndContext(); #line 34 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" } } else { if (awareProduct.Count == 0) { #line default #line hidden BeginContext(1435, 132, true); WriteLiteral(" <div class=\"alert alert-danger\">\r\n <strong>Number of products expired: </strong> "); EndContext(); BeginContext(1568, 13, false); #line 41 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(product.Count); #line default #line hidden EndContext(); BeginContext(1581, 34, true); WriteLiteral("\r\n </div>\r\n"); EndContext(); #line 43 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" } else { #line default #line hidden BeginContext(1691, 132, true); WriteLiteral(" <div class=\"alert alert-danger\">\r\n <strong>Number of products expired: </strong> "); EndContext(); BeginContext(1824, 13, false); #line 49 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(product.Count); #line default #line hidden EndContext(); BeginContext(1837, 168, true); WriteLiteral("\r\n </div>\r\n <div class=\"alert alert-info\">\r\n <strong>Number of products with alerts: </strong> "); EndContext(); BeginContext(2006, 18, false); #line 52 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" Write(awareProduct.Count); #line default #line hidden EndContext(); BeginContext(2024, 34, true); WriteLiteral("\r\n </div>\r\n"); EndContext(); #line 54 "C:\Users\LENOVO\Desktop\Nowy folder (16)\Fridge_PZ\FridgePZ\Views\Home\Index.cshtml" } } } #line default #line hidden BeginContext(2126, 81, true); WriteLiteral("\r\n\r\n\r\n\r\n\r\n <p>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(2207, 73, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9114ec1226beec53a645eb21cddfe1044da87ab79858", async() => { BeginContext(2253, 23, true); WriteLiteral("Add item to application"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_0.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2280, 70, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(2350, 63, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9114ec1226beec53a645eb21cddfe1044da87ab711404", async() => { BeginContext(2395, 14, true); WriteLiteral("Show all items"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_2.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2413, 70, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(2483, 76, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9114ec1226beec53a645eb21cddfe1044da87ab712942", async() => { BeginContext(2532, 23, true); WriteLiteral("Add item to application"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_3.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2559, 70, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-primary\">"); EndContext(); BeginContext(2629, 66, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9114ec1226beec53a645eb21cddfe1044da87ab714489", async() => { BeginContext(2677, 14, true); WriteLiteral("Show all items"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_4.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2695, 69, true); WriteLiteral(" </button>\r\n <button type=\"button\" class=\"btn btn-danger\">"); EndContext(); BeginContext(2764, 69, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9114ec1226beec53a645eb21cddfe1044da87ab716026", async() => { BeginContext(2808, 21, true); WriteLiteral("Your expired products"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper); __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_5.Value; __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(2833, 40, true); WriteLiteral(" </button>\r\n\r\n </p>\r\n </div>\r\n"); EndContext(); }
public CategoryitempatternsController(fridgepzContext context) { _context = context; }