예제 #1
0
        public async Task <IActionResult> AccountSettings()
        {
            AccountSettingsViewModel accountSettingsViewModel = new AccountSettingsViewModel();
            User user = await profileManager.GetUserAsync(User.Identity.Name);

            accountSettingsViewModel.FirstName = user.FirstName;
            accountSettingsViewModel.LastName  = user.LastName;
            accountSettingsViewModel.Email     = user.Email;
            if (user.UserPhoto != null)
            {
                accountSettingsViewModel.Photo = user.UserPhoto;
            }
            else
            {
                accountSettingsViewModel.Photo = "Error";
            }

            return(View(accountSettingsViewModel));
        }
예제 #2
0
        public async Task <IActionResult> Index()
        {
            string        username      = User.FindFirstValue(ClaimTypes.Name);
            HomeViewModel homeViewModel = new HomeViewModel();

            homeViewModel.Photo     = "photo";
            homeViewModel.FirstName = (await identityProfileManager.GetUserAsync(User.Identity.Name)).FirstName;
            homeViewModel.Cars      = carManager.GetParkedCars(User.Identity.Name);
            homeViewModel.CarItems  = homeViewModel.Cars.Select(c => new SelectListItem {
                Text = c.StateNumber, Value = c.StateNumber
            });
            homeViewModel.ParkingItems = parkingManager.GetParkings().Select(p => new SelectListItem {
                Text = p.ParkingName, Value = p.ParkingName
            });
            foreach (Car car in homeViewModel.Cars)
            {
                homeViewModel.Parkings.Add(car.Id, await parkingManager.GetParkingNameByCarId(car.Id));
            }

            return(View(homeViewModel));
        }
예제 #3
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(71, 1, true);
            WriteLiteral("\n");
            EndContext();
#line 4 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"

            Layout = "Layout";


#line default
#line hidden
#line 9 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"
            Educo.Parking.Business.User user = await IdentityProfileManager.GetUserAsync(User);

#line default
#line hidden
            BeginContext(243, 322, true);
            WriteLiteral(@"
<div class=""body-main-layout"">
    <div class=""row"">
        <div class=""col l3 m0"">
            <ul id=""slide-out"" class=""sidenav sidenav-fixed"">
                <li>
                    <div class=""user-view"">
                        <img asp-controller=""Home"" asp-action=""AccountSettings"" class=""circle responsive-img""");
            EndContext();
            BeginWriteAttribute("src", " src=\"", 565, "\"", 607, 1);
#line 17 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"
            WriteAttributeValue("", 571, Url.Content($"~/{user?.UserPhoto}"), 571, 36, false);

#line default
#line hidden
            EndWriteAttribute();
            BeginWriteAttribute("onerror", " onerror=\"", 608, "\"", 706, 4);
            WriteAttributeValue("", 618, "this.onerror=null;", 618, 18, true);
            WriteAttributeValue(" ", 636, "this.src=\'", 637, 11, true);
#line 17 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"
            WriteAttributeValue("", 647, Url.Content("~/images/UsersImages/Anonymous_emblem.svg"), 647, 57, false);

#line default
#line hidden
            WriteAttributeValue("", 704, "\';", 704, 2, true);
            EndWriteAttribute();
            BeginContext(707, 82, true);
            WriteLiteral(" style=\"height:auto;width:5rem;\">\n                        <h6 class=\"indigo-text\">");
            EndContext();
            BeginContext(790, 15, false);
#line 18 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"
            Write(user?.FirstName);

#line default
#line hidden
            EndContext();
            BeginContext(805, 1, true);
            WriteLiteral(" ");
            EndContext();
            BeginContext(807, 14, false);
#line 18 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"
            Write(user?.LastName);

#line default
#line hidden
            EndContext();
            BeginContext(821, 123, true);
            WriteLiteral("</h6>\n                    </div>\n                    <div class=\"divider\"></div>\n                </li>\n                <li>");
            EndContext();
            BeginContext(944, 131, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "994cb6ec9ffd4d0eacb1bf0925ccc44d", async() => {
                BeginContext(1009, 62, true);
                WriteLiteral("<i class=\"small material-icons\">account_circle</i>User Profile");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_2.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(1075, 26, true);
            WriteLiteral("</li>\n                <li>");
            EndContext();
            BeginContext(1101, 128, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "35592ea76b564258ad91e9d979c02d25", async() => {
                BeginContext(1171, 54, true);
                WriteLiteral("<i class=\"small material-icons\">directions_car</i>Cars");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_3.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_4.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(1229, 145, true);
            WriteLiteral("</li>\n                <li><a class=\"waves-effect\" href=\"#!\"><i class=\"small material-icons\">equalizer</i>Statistics</a></li>\n                <li>");
            EndContext();
            BeginContext(1374, 142, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "8d6e766a0c7549b3b767862ee6615e55", async() => {
                BeginContext(1452, 60, true);
                WriteLiteral("<i class=\"small material-icons\">settings</i>Account Settings");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_5.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_6.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(1516, 26, true);
            WriteLiteral("</li>\n                <li>");
            EndContext();
            BeginContext(1542, 127, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "1313c37bb25c441ea6d7c78f14911ca2", async() => {
                BeginContext(1611, 54, true);
                WriteLiteral("<i class=\"small material-icons\">exit_to_app</i>Log out");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_7.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_8.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_8);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(1669, 195, true);
            WriteLiteral("</li>\n            </ul>\n            <a href=\"#\" data-target=\"slide-out\" class=\"sidenav-trigger\"><i class=\"material-icons\">menu</i></a>\n        </div>\n        <div class=\"col l8 m12\">\n            ");
            EndContext();
            BeginContext(1865, 12, false);
#line 31 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"
            Write(RenderBody());

#line default
#line hidden
            EndContext();
            BeginContext(1877, 34, true);
            WriteLiteral("\n        </div>\n    </div>\n</div>\n");
            EndContext();
            BeginContext(1912, 41, false);
#line 35 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Shared/Menu.cshtml"
            Write(RenderSection("Scripts", required: false));

#line default
#line hidden
            EndContext();
            BeginContext(1953, 1, true);
            WriteLiteral("\n");
            EndContext();
        }