Example #1
0
        public async Task <IActionResult> AddBalance(Balance balance)
        {
            try
            {
                balance.AddedBy = LocalStorageExtensions.Get(StorageType.UserId);

                string response = await APICallerExtensions.APICallAsync("User/AddBalance", balance, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(RedirectToAction(nameof(UserController.Index), "User"));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <Balance> >(response);
                if (!content.DidError)
                {
                    return(RedirectToAction(nameof(UserController.Index), "User"));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(RedirectToAction(nameof(UserController.Index), "User"));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(RedirectToAction(nameof(UserController.Index), "User"));
            }
        }
Example #2
0
        public void Load(string fileName = "Settings.txt")
        {
#if WINDOWS
            if (File.Exists(fileName))
#else
            if (!LocalStorageExtensions.FileExists(fileName))
#endif

            {
                Save(fileName);
            }

            try
            {
#if WINDOWS
                using (var stream = new FileStream(fileName, FileMode.OpenOrCreate))
#else
                using (var stream = LocalStorageExtensions.OpenStreamForRead(fileName))
#endif
                {
                    using (StreamReader sr = new StreamReader(stream))
                    {
                        DataContractJsonSerializer serializer = new DataContractJsonSerializer(_settings.GetType());
                        _settings = (Dictionary <string, object>)serializer.ReadObject(sr.BaseStream);
                    }
                }
            }
            catch
            {
                Save(fileName);
            }
        }
Example #3
0
        public async Task <IActionResult> Create(ShopViewModel shopViewModel)
        {
            try
            {
                shopViewModel.UserId = LocalStorageExtensions.Get(StorageType.UserId);
                shopViewModel.Photo  = shopViewModel.base64Picture;
                string response = await APICallerExtensions.APICallAsync("Shop/Create", shopViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(RedirectToAction(nameof(ShopController.Index), "Shop"));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <Shop> >(response);
                if (!content.DidError)
                {
                    return(RedirectToAction(nameof(ShopController.Index), "Shop"));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(RedirectToAction(nameof(ShopController.Index), "Shop"));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(RedirectToAction(nameof(ShopController.Index), "Shop"));
            }
        }
        public async Task <IActionResult> Update(ProfileViewModel profileViewModel)
        {
            try
            {
                string response = await APICallerExtensions.APICallAsync("Profile/Save", profileViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(View(profileViewModel));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <ApplicationUser> >(response);
                if (!content.DidError)
                {
                    LocalStorageExtensions.Store(StorageType.Picture, content.Model.Picture);
                    return(RedirectToAction("Index"));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(View(profileViewModel));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(View(profileViewModel));
            }
        }
Example #5
0
        // GET: Shop
        public async Task <ActionResult> Index()
        {
            if (!LocalStorageExtensions.ValidSession(ControllerContext.ActionDescriptor.ControllerName))
            {
                LocalStorageExtensions.Clear();
                return(RedirectToAction(nameof(AccountController.Login), "Account"));
            }

            try
            {
                PaginationViewModel paginationViewModel = new PaginationViewModel()
                {
                    userId   = LocalStorageExtensions.Get(StorageType.UserId),
                    pageId   = 1,
                    pageSize = -1,
                };
                string response = await APICallerExtensions.APICallAsync("Shop/GetAll", paginationViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(View());
                }
                ShopViewModel shopViewModel = new ShopViewModel();
                var           content       = JsonConvert.DeserializeObject <SingleResponse <List <Shop> > >(response);
                if (!content.DidError)
                {
                    shopViewModel.listShops = content.Model;

                    PaginationViewModel paginationViewModel2 = new PaginationViewModel()
                    {
                        pageId   = 1,
                        pageSize = -1,
                    };
                    string response2 = await APICallerExtensions.APICallAsync("Company/GetAll", paginationViewModel2, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                    if (response.ToLower().Contains("exception:"))
                    {
                        ModelState.AddModelError(string.Empty, response2);
                    }
                    var content2 = JsonConvert.DeserializeObject <SingleResponse <List <Company> > >(response2);
                    if (!content.DidError)
                    {
                        shopViewModel.listCompanies = content2.Model;
                    }

                    return(View(shopViewModel));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(View());
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(View());
            }
        }
 public async Task <IActionResult> Logout()
 {
     LocalStorageExtensions.Clear();
     //HttpContext.Session.Clear();
     _logger.LogInformation("User logged out.");
     return(RedirectToAction(nameof(AccountController.Login), "Account"));
 }
 // GET: Dashboard
 public ActionResult Index()
 {
     if (!LocalStorageExtensions.ValidSession(ControllerContext.ActionDescriptor.ControllerName))
     {
         LocalStorageExtensions.Clear();
         return(RedirectToAction(nameof(AccountController.Login), "Account"));
     }
     return(View());
 }
Example #8
0
        public async Task <IActionResult> Create([FromBody] SaleViewModel saleViewModel)
        {
            try
            {
                //SaleViewModel saleViewModel = new SaleViewModel();
                string userId = LocalStorageExtensions.Get(StorageType.UserId);
                saleViewModel.UserId = userId;
                string response = await APICallerExtensions.APICallAsync("Sale/Create", saleViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(Json(response));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <CreateSaleViewModel> >(response);
                if (!content.DidError)
                {
                    //Get Remaining Balance
                    RemainingBalanceViewModel remainingBalanceViewModel = new RemainingBalanceViewModel()
                    {
                        UserId = userId
                    };

                    string responseBalance = await APICallerExtensions.APICallAsync("RemainingBalance/GetByUserId", remainingBalanceViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                    if (responseBalance.ToLower().Contains("exception:"))
                    {
                        ModelState.AddModelError(string.Empty, responseBalance);
                    }
                    var contentBalance = JsonConvert.DeserializeObject <SingleResponse <RemainingBalance> >(responseBalance);
                    if (!contentBalance.DidError)
                    {
                        if (contentBalance.Model != null)
                        {
                            LocalStorageExtensions.Store(StorageType.Balance, contentBalance.Model.CurrentAmount.ToString());
                        }
                    }

                    return(Json(content.Model));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(Json(content.Message));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(Json(ex.Message));
            }
        }
        // GET: Profile
        public async Task <ActionResult> Index()
        {
            try
            {
                if (!LocalStorageExtensions.ValidSession(ControllerContext.ActionDescriptor.ControllerName))
                {
                    LocalStorageExtensions.Clear();
                    return(RedirectToAction(nameof(AccountController.Login), "Account"));
                }

                string userId = LocalStorageExtensions.Get(StorageType.UserId).ToString();// HttpContext.Session.GetObject(StorageType.UserId).ToString();

                ProfileViewModel profileViewModel = new ProfileViewModel();

                profileViewModel.UserId = userId;
                string response = await APICallerExtensions.APICallAsync("Profile/Get", profileViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(View());
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <ProfileViewModel> >(response);
                if (!content.DidError)
                {
                    if (string.IsNullOrEmpty(content.Model.Picture))
                    {
                        if (_hostingEnvironment.IsDevelopment())
                        {
                            content.Model.Picture = "/app-assets/images/user.png";
                        }
                        else
                        {
                            content.Model.Picture = "../app-assets/images/user.png";
                        }
                    }

                    return(View(content.Model));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(View());
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(View());
            }
        }
Example #10
0
        public async Task <JsonResult> SaveSettings(UserSettingsViewModel userSettingsViewModel)
        {
            try
            {
                string response = await APICallerExtensions.APICallAsync("User/SaveSettings", userSettingsViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(Json(new
                    {
                        result = false,
                        error = response
                    }));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <ApplicationUser> >(response);
                if (!content.DidError)
                {
                    if (content.Model.IsCompanySelected)
                    {
                        LocalStorageExtensions.Store(StorageType.IsCompanySelected, "true");
                    }
                    if (content.Model.IsShopSelected)
                    {
                        LocalStorageExtensions.Store(StorageType.IsShopSelected, "true");
                    }

                    return(Json(new
                    {
                        content.Model,
                    }));
                }
                else
                {
                    return(Json(new
                    {
                        result = false,
                        error = content == null ? "Content is null or empty" : content.ErrorMessage
                    }));
                }
            }
            catch (Exception ex)
            {
                return(Json(new
                {
                    result = false,
                    error = ex.Message
                }));
            }
        }
Example #11
0
        public void Save(string fileName = "Settings.txt")
        {
#if WINDOWS
            using (var stream = new FileStream(fileName, FileMode.OpenOrCreate))
#else
            using (var stream = LocalStorageExtensions.OpenStreamForWrite(fileName, CreationCollisionOption.ReplaceExisting))
#endif
            {
                using (StreamWriter sw = new StreamWriter(stream))
                {
                    DataContractJsonSerializer serializer = new DataContractJsonSerializer(_settings.GetType());
                    serializer.WriteObject(sw.BaseStream, _settings);
                }
            }
        }
Example #12
0
        // GET: Template
        public async Task <ActionResult> Index()
        {
            if (!LocalStorageExtensions.ValidSession(ControllerContext.ActionDescriptor.ControllerName))
            {
                LocalStorageExtensions.Clear();
                return(RedirectToAction(nameof(AccountController.Login), "Account"));
            }

            TemplateViewModel templateViewModel = new TemplateViewModel();

            templateViewModel.listTemplate = new List <EmailTemplate>();

            try
            {
                PaginationViewModel paginationViewModel = new PaginationViewModel()
                {
                    pageId   = 1,
                    pageSize = -1,
                };
                string response = await APICallerExtensions.APICallAsync("Template/GetAll", paginationViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(View());
                }

                var content = JsonConvert.DeserializeObject <SingleResponse <List <EmailTemplate> > >(response);
                if (!content.DidError)
                {
                    templateViewModel.listTemplate = content.Model;
                    return(View(templateViewModel));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(View(templateViewModel));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(View(templateViewModel));
            }
        }
Example #13
0
        // GET: Sale
        public async Task <ActionResult> Index()
        {
            if (!LocalStorageExtensions.ValidSession(ControllerContext.ActionDescriptor.ControllerName))
            {
                LocalStorageExtensions.Clear();
                return(RedirectToAction(nameof(AccountController.Login), "Account"));
            }
            SaleViewModel saleViewModel = new SaleViewModel();

            try
            {
                saleViewModel.UserId   = LocalStorageExtensions.Get(StorageType.UserId);
                saleViewModel.pageId   = 1;
                saleViewModel.pageSize = -1;
                string response = await APICallerExtensions.APICallAsync("Sale/GetCardsByUserId", saleViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(View());
                }

                var content = JsonConvert.DeserializeObject <SingleResponse <SaleViewModel> >(response);
                if (!content.DidError)
                {
                    saleViewModel = content.Model;
                    return(View(saleViewModel));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(View(saleViewModel));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(View(saleViewModel));
            }
        }
Example #14
0
        public async Task <IActionResult> Create(CodeViewModel codeViewModel)
        {
            try
            {
                string userId = LocalStorageExtensions.Get(StorageType.UserId);
                codeViewModel.UserId = userId;
                if (codeViewModel.AddType == "Range")
                {
                    codeViewModel.IsRange = true;
                }
                else if (codeViewModel.AddType == "Bulk")
                {
                    codeViewModel.IsRange = false;
                }
                string response = await APICallerExtensions.APICallAsync("Code/Create", codeViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(RedirectToAction(nameof(CodeController.Index), "Code"));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <List <Code> > >(response);
                if (!content.DidError)
                {
                    return(RedirectToAction(nameof(CodeController.Index), "Code"));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(RedirectToAction(nameof(CodeController.Index), "Code"));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(RedirectToAction(nameof(CodeController.Index), "Code"));
            }
        }
Example #15
0
        public async Task <IActionResult> Create(CreateUserViewModel createUserViewModel)
        {
            try
            {
                string userRole = LocalStorageExtensions.Get(StorageType.Role);
                if (userRole == "Company")
                {
                    createUserViewModel.UserRole  = "Shop";
                    createUserViewModel.CompanyId = 0;
                }
                createUserViewModel.Picture   = createUserViewModel.base64Picture;
                createUserViewModel.CreatedBy = LocalStorageExtensions.Get(StorageType.UserId);

                string response = await APICallerExtensions.APICallAsync("User/Create", createUserViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(RedirectToAction(nameof(UserController.Index), "User"));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <CreateUserViewModel> >(response);
                if (!content.DidError)
                {
                    return(RedirectToAction(nameof(UserController.Index), "User"));
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(RedirectToAction(nameof(UserController.Index), "User"));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(string.Empty, ex.Message);
                return(RedirectToAction(nameof(UserController.Index), "User"));
            }
        }
Example #16
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"

            ViewData["Title"] = "Shops";

#line default
#line hidden
            DefineSection("Styles", async() => {
                BeginContext(138, 37, true);
                WriteLiteral("\r\n    <!-- BEGIN: Vendor CSS-->\r\n    ");
                EndContext();
                BeginContext(175, 87, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "b4376029b6a44442a4d223215a9062ed", 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);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(262, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(268, 107, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "207bcc3f33d4427c9bfca466bd52b5a8", 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);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(375, 31, true);
                WriteLiteral("\r\n    <!-- END: Vendor CSS-->\r\n");
                EndContext();
            }
                          );
            DefineSection("Scripts", async() => {
                BeginContext(426, 41, true);
                WriteLiteral("\r\n    <!-- BEGIN: Page Vendor JS-->\r\n    ");
                EndContext();
                BeginContext(467, 82, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "ac4e8365a56047e18c4440a49eacf4f7", 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_4);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(549, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(555, 93, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "bc2f4d3d39f24bc18320b32eb9805632", 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_5);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(648, 39, true);
                WriteLiteral("\r\n    <!-- END: Page Vendor JS-->\r\n    ");
                EndContext();
                BeginContext(687, 80, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "77bf3e5d9f624fc692dfaa2d7c7d3c57", 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_6);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(767, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(773, 89, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "7d24dc09137a4d978907bd94b2d22ae6", 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_7);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(862, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(868, 75, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "1208e895d2c043baa16c1fe57434a55a", 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_8);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(943, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(949, 80, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c88a7b98ad144f8b90c5f5fada9b7d14", 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_9);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1029, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(1035, 74, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5f51e309a10d41c58d608d22af9923be", 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_10);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1109, 3000, true);
                WriteLiteral(@"
    <script>
        var oTable = $('#tableShops').DataTable({
            //data: [],
            filter: true,
            lengthChange: true,
            paging: true,
            info: true,
            autoWidth: false,
            lengthMenu: [[5, 10, 25, 50, -1], [5, 10, 25, 50, ""All""]],
            pageLength: 5,
            aaSorting: [[0, 'asc']],
            columns: [
                { title: ""name"", width: ""20%"" },
                { title: ""description"", width: ""20%"" },
                { title: ""photo"", width: ""15%"" },
                { title: ""phone"", width: ""15%"" },
                { title: ""address"", width: ""10%"" },
                //{ title: ""status"", width: ""10%"" },
                { title: ""actions"", width: ""10%"" },
            ]
        });

        oTable.on('click', "".edit"", function () {
            if (confirm(""Are you sure you want to edit this shop?"")) {
                var shopId = $(this).attr(""shop-id"");
                
            }
            else ");
                WriteLiteral(@"{
                alert(""False"");
                return false;
            }
        });

        oTable.on('click', "".block"", function (e) {
            if (confirm(""Are you sure you want to block this shop?"")) {
                var shopId = $(this).attr(""shop-id"");
                var row = $(e.currentTarget).closest(""tr"");
                oTable.row(row).remove().draw(true);
                var dataContract = {
                    shopId: shopId,
                };
                $.ajax({
                    type: ""POST"",
                    url: ""/Shop/Block/"",
                    async: true,
                    dataType: ""json"",
                    data: dataContract,
                    success: function (resp) {
                    },
                    failure: function (resp) {
                    },
                    error: function (resp) {
                    }
                });
            }
            else {
                return false;
            }
    ");
                WriteLiteral(@"    });
    </script>
    <script>
        $(""#btnSelectPhoto"").click(function (e) {
            $(""#imageUpload"").click();
        });
        $(""#btnResetPhoto"").click(function (e) {
            $('#profileImage').attr('src', ""/app-assets/images/logo/topup_64.png"");
            $('#base64Picture').val("""");
        });

        function readFile() {
            if (this.files && this.files[0]) {
                $('#profileImage').attr('src', window.URL.createObjectURL(this.files[0]));
                var FR = new FileReader();
                FR.addEventListener(""load"", function (e) {
                    document.getElementById(""b64"").innerHTML = e.target.result;
                    $('#base64Picture').val($('#b64').text());
                });
                FR.readAsDataURL(this.files[0]);
            }
        }
        document.getElementById(""imageUpload"").addEventListener(""change"", readFile);
    </script>
");
                EndContext();
            }
                          );
            BeginContext(4112, 317, true);
            WriteLiteral(@"
<div class=""content-wrapper"">
    <div class=""content-header row"">
        <div class=""content-header-left col-12 mb-2 mt-1"">
            <div class=""row breadcrumbs-top"">
                <div class=""col-6"">
                    <h5 class=""content-header-title float-left pr-1 mb-0"" style=""border-right: none;"">");
            EndContext();
            BeginContext(4430, 17, false);
#line 111 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
            Write(ViewData["Title"]);

#line default
#line hidden
            EndContext();
            BeginContext(4447, 818, true);
            WriteLiteral(@"</h5>
                </div>
                <div class=""col-6"">
                    <button class=""btn btn-primary glow float-right"" data-toggle=""modal"" data-target=""#modalAddShop"" data-backdrop=""false"">Add Shop</button>
                </div>
            </div>
        </div>
    </div>
    <div class=""content-body"">
        <!-- shops list start -->
        <section class=""users-list-wrapper"">
            <div class=""users-list-table"">
                <div class=""card"">
                    <div class=""card-content"">
                        <div class=""card-body"">
                            <!-- datatable start -->
                            <div class=""table-responsive"">
                                <table id=""tableShops"" class=""table"">
                                    <tbody>
");
            EndContext();
#line 130 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
            foreach (var item in Model.listShops)
            {
#line default
#line hidden
                BeginContext(5388, 131, true);
                WriteLiteral("                                            <tr>\r\n                                                <td><a href=\"javascript:void(0)\">");
                EndContext();
                BeginContext(5520, 9, false);
#line 133 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(item.Name);

#line default
#line hidden
                EndContext();
                BeginContext(5529, 63, true);
                WriteLiteral("</a></td>\r\n                                                <td>");
                EndContext();
                BeginContext(5593, 16, false);
#line 134 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(item.Description);

#line default
#line hidden
                EndContext();
                BeginContext(5609, 61, true);
                WriteLiteral("</td>\r\n                                                <td>\r\n");
                EndContext();
#line 136 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                if (string.IsNullOrEmpty(item.Photo))
                {
#line default
#line hidden
                    BeginContext(5817, 56, true);
                    WriteLiteral("                                                        ");
                    EndContext();
                    BeginContext(5873, 94, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "09c65d885c544a668d8a6616da9d5aa2", 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_11);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_12);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_13);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_14);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(5967, 2, true);
                    WriteLiteral("\r\n");
                    EndContext();
#line 139 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(6137, 60, true);
                    WriteLiteral("                                                        <img");
                    EndContext();
                    BeginWriteAttribute("src", " src=\"", 6197, "\"", 6214, 1);
#line 142 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                    WriteAttributeValue("", 6203, item.Photo, 6203, 11, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(6215, 48, true);
                    WriteLiteral(" class=\"rounded mr-75\" height=\"32\" width=\"32\">\r\n");
                    EndContext();
#line 143 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                }

#line default
#line hidden
                BeginContext(6318, 107, true);
                WriteLiteral("                                                </td>\r\n                                                <td>");
                EndContext();
                BeginContext(6426, 10, false);
#line 145 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(item.Phone);

#line default
#line hidden
                EndContext();
                BeginContext(6436, 59, true);
                WriteLiteral("</td>\r\n                                                <td>");
                EndContext();
                BeginContext(6496, 12, false);
#line 146 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(item.Address);

#line default
#line hidden
                EndContext();
                BeginContext(6508, 7, true);
                WriteLiteral("</td>\r\n");
                EndContext();
                BeginContext(7209, 54, true);
                WriteLiteral("                                                <td>\r\n");
                EndContext();
                BeginContext(7595, 125, true);
                WriteLiteral("                                                    <a href=\"javascript:void(0)\" class=\"block\" data-toggle=\"tooltip\" title=\"\"");
                EndContext();
                BeginWriteAttribute("shop-id", " shop-id=\"", 7720, "\"", 7742, 1);
#line 161 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                WriteAttributeValue("", 7730, item.ShopId, 7730, 12, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(7743, 289, true);
                WriteLiteral(@" data-original-title=""Block Shop"">
                                                        <i class=""bx bxs-x-circle""></i>
                                                    </a>
                                                </td>
                                            </tr>
");
                EndContext();
#line 166 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(8075, 761, true);
            WriteLiteral(@"                                    </tbody>
                                </table>
                            </div>
                            <!-- datatable ends -->
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- shops list ends -->
    </div>
</div>

<!--Default size Modal -->
<div class=""modal fade text-left"" id=""modalAddShop"" tabindex=""-1"" role=""dialog"" aria-labelledby=""myModalLabel18"" aria-hidden=""true"">
    <div class=""modal-dialog modal-dialog-centered"" role=""document"">
        <div class=""modal-content"">
            <div class=""modal-header"">
                <h4 class=""modal-title"" id=""myModalLabel18"">Add Shop</h4>
            </div>
");
            EndContext();
#line 187 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
            using (Html.BeginForm("Create", "Shop", FormMethod.Post, new { @id = "form-shop" }))
            {
#line default
#line hidden
                BeginContext(8950, 491, true);
                WriteLiteral(@"                <div class=""modal-body"">
                    <div class=""card-content"">
                        <div class=""card-body"">
                            <div class=""form-body"">
                                <div class=""row"">
                                    <div class=""col-12"">
                                        <div class=""form-group"">
                                            <label>Registration Number</label>
                                            ");
                EndContext();
                BeginContext(9442, 97, false);
#line 197 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(Html.TextBoxFor(m => m.RegistrationNumber, new { @class = "form-control", @id = "registration" }));

#line default
#line hidden
                EndContext();
                BeginContext(9539, 327, true);
                WriteLiteral(@"
                                        </div>
                                    </div>
                                    <div class=""col-12"">
                                        <div class=""form-group"">
                                            <label>Name</label>
                                            ");
                EndContext();
                BeginContext(9867, 75, false);
#line 203 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(Html.TextBoxFor(m => m.Name, new { @class = "form-control", @id = "name" }));

#line default
#line hidden
                EndContext();
                BeginContext(9942, 330, true);
                WriteLiteral(@"
                                        </div>
                                    </div>
                                    <div class=""col-12"">
                                        <div class=""form-group"">
                                            <label>Address</label>
                                            ");
                EndContext();
                BeginContext(10273, 81, false);
#line 209 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(Html.TextBoxFor(m => m.Address, new { @class = "form-control", @id = "address" }));

#line default
#line hidden
                EndContext();
                BeginContext(10354, 328, true);
                WriteLiteral(@"
                                        </div>
                                    </div>
                                    <div class=""col-12"">
                                        <div class=""form-group"">
                                            <label>Phone</label>
                                            ");
                EndContext();
                BeginContext(10683, 77, false);
#line 215 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(Html.TextBoxFor(m => m.Phone, new { @class = "form-control", @id = "phone" }));

#line default
#line hidden
                EndContext();
                BeginContext(10760, 334, true);
                WriteLiteral(@"
                                        </div>
                                    </div>
                                    <div class=""col-12"">
                                        <div class=""form-group"">
                                            <label>Description</label>
                                            ");
                EndContext();
                BeginContext(11095, 114, false);
#line 221 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                Write(Html.TextArea("Description", Model.Description, new { @class = "form-control", @id = "description", @rows = "3" }));

#line default
#line hidden
                EndContext();
                BeginContext(11209, 94, true);
                WriteLiteral("\r\n                                        </div>\r\n                                    </div>\r\n");
                EndContext();
#line 224 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                if (LocalStorageExtensions.Exists(StorageType.Token) &&
                    LocalStorageExtensions.Get(StorageType.Role) == "Admin")
                {
#line default
#line hidden
#line 227 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                    if (Model.listCompanies != null && Model.listCompanies.Count > 0)
                    {
#line default
#line hidden
                        BeginContext(11676, 284, true);
                        WriteLiteral(@"                                            <div class=""col-12"" id=""divCompany"">
                                                <div class=""form-group"">
                                                    <label>Company</label>
                                                    ");
                        EndContext();
                        BeginContext(11961, 151, false);
#line 232 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                        Write(Html.DropDownListFor(m => m.CompanyId, new MultiSelectList(Model.listCompanies, "CompanyId", "Name"), new { @class = "form-control", @id = "company" }));

#line default
#line hidden
                        EndContext();
                        BeginContext(12112, 110, true);
                        WriteLiteral("\r\n                                                </div>\r\n                                            </div>\r\n");
                        EndContext();
#line 235 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                    }

#line default
#line hidden
#line 235 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
                }

#line default
#line hidden
                BeginContext(12304, 303, true);
                WriteLiteral(@"                                    <div class=""col-12"">
                                        <div class=""form-group"">
                                            <label>Photo</label>
                                            <div class=""media"">
                                                ");
                EndContext();
                BeginContext(12607, 132, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "88ffa4e0356a43cb8a643e995d9df52c", 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_15);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_11);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_12);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_16);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_17);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_18);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(12739, 2124, true);
                WriteLiteral(@"
                                                <p id=""b64"" style=""display:none;""></p>
                                                <input type=""hidden"" id=""base64Picture"" name=""base64Picture"" />
                                                <div class=""media-body mt-25"">
                                                    <div class=""col-12 px-0 d-flex flex-sm-row flex-column justify-content-start"">
                                                        <input type=""file"" id=""imageUpload"" style=""display: none;"">
                                                        <button type=""button"" id=""btnSelectPhoto"" class=""btn btn-sm btn-light-primary ml-50 mb-50 mb-sm-0 dz-clickable"">Select new photo</button>
                                                        <button type=""button"" id=""btnResetPhoto"" class=""btn btn-sm btn-light-secondary ml-50"">Reset</button>
                                                    </div>
                                                    <p class=""text-muted ml-1 m");
                WriteLiteral(@"t-50"">
                                                        <small>Allowed JPG, GIF or PNG.</small>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class=""modal-footer"">
                    <button type=""button"" class=""btn btn-light-secondary"" data-dismiss=""modal"">
                        <i class=""bx bx-x d-block d-sm-none""></i>
                        <span class=""d-none d-sm-block"">Close</span>
                    </button>
                    <button type=""submit"" class=""btn btn-primary ml-1"">
                        <i class=""bx bx-check d-block d-sm-none""></i>
                        <span class=""d-none d-sm");
                WriteLiteral("-block\">Save</span>\r\n                    </button>\r\n                </div>\r\n");
                EndContext();
#line 272 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shop\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(14878, 34, true);
            WriteLiteral("        </div>\r\n    </div>\r\n</div>");
            EndContext();
        }
Example #17
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"

            ViewData["Title"] = "Profile";

#line default
#line hidden
            DefineSection("Styles", async() => {
                BeginContext(143, 4, true);
                WriteLiteral("\r\n\r\n");
                EndContext();
            }
                          );
            DefineSection("Scripts", async() => {
                BeginContext(167, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(173, 80, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "a289428d3edb4cff86acb6e7f5954b3b", 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);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(253, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(259, 89, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "693cf0c9fd204baf83cbc3db9595b962", 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_1);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(348, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(354, 75, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "3b805fc7f26b45aba82009db7d212a1d", 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_2);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(429, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(435, 80, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "a4b193d9531f41d2b08732d7127bfca1", 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_3);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(515, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(521, 74, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "1b337b31a83b41c0b067c2c577404133", 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_4);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(595, 921, true);
                WriteLiteral(@"
    <script>
        $(""#btnSelectPhoto"").click(function (e) {
            $(""#imageUpload"").click();
        });
        $(""#btnResetPhoto"").click(function (e) {
            $('#profileImage').attr('src', ""/app-assets/images/user.png"");
            $('#base64Picture').val("""");
        });

        function readFile() {
            if (this.files && this.files[0]) {
                $('#profileImage').attr('src', window.URL.createObjectURL(this.files[0]));
                var FR = new FileReader();
                FR.addEventListener(""load"", function (e) {
                    document.getElementById(""b64"").innerHTML = e.target.result;
                    $('#base64Picture').val($('#b64').text());
                });
                FR.readAsDataURL(this.files[0]);
            }
        }
        document.getElementById(""imageUpload"").addEventListener(""change"", readFile);
    </script>
");
                EndContext();
            }
                          );
            BeginContext(1519, 315, true);
            WriteLiteral(@"<div class=""content-wrapper"">
    <div class=""content-header row"">
        <div class=""content-header-left col-12 mb-2 mt-1"">
            <div class=""row breadcrumbs-top"">
                <div class=""col-6"">
                    <h5 class=""content-header-title float-left pr-1 mb-0"" style=""border-right: none;"">");
            EndContext();
            BeginContext(1835, 17, false);
#line 43 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
            Write(ViewData["Title"]);

#line default
#line hidden
            EndContext();
            BeginContext(1852, 1963, true);
            WriteLiteral(@"</h5>
                </div>
            </div>
        </div>
    </div>
    <div class=""content-body"">
        <section id=""page-account-settings"">
            <div class=""row"">
                <div class=""col-12"">
                    <div class=""row"">
                        <!-- left menu section -->
                        <div class=""col-md-3 mb-2 mb-md-0 pills-stacked"">
                            <ul class=""nav nav-pills flex-column"">
                                <li class=""nav-item"">
                                    <a class=""nav-link d-flex align-items-center active"" id=""account-pill-general"" data-toggle=""pill"" href=""#account-vertical-general"" aria-expanded=""true"">
                                        <i class=""bx bx-cog""></i>
                                        <span>General</span>
                                    </a>
                                </li>
                                <li class=""nav-item"">
                                    <a class=""nav-link");
            WriteLiteral(@" d-flex align-items-center"" id=""account-pill-password"" data-toggle=""pill"" href=""#account-vertical-password"" aria-expanded=""false"">
                                        <i class=""bx bx-lock""></i>
                                        <span>Change Password</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                        <!-- right content section -->
                        <div class=""col-md-9"">
                            <div class=""card"">
                                <div class=""card-content"">
                                    <div class=""card-body"">
                                        <div class=""tab-content"">
                                            <div role=""tabpanel"" class=""tab-pane active"" id=""account-vertical-general"" aria-labelledby=""account-pill-general"" aria-expanded=""true"">
");
            EndContext();
#line 77 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
            using (Html.BeginForm("Update", "Profile", FormMethod.Post, new { @id = "form-profile" }))
            {
#line default
#line hidden
                BeginContext(4060, 29, false);
#line 79 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.HiddenFor(m => m.UserId));

#line default
#line hidden
                EndContext();
                BeginContext(4144, 32, false);
#line 80 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.HiddenFor(m => m.CompanyId));

#line default
#line hidden
                EndContext();
                BeginContext(4231, 29, false);
#line 81 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.HiddenFor(m => m.ShopId));

#line default
#line hidden
                EndContext();
                BeginContext(4262, 151, true);
                WriteLiteral("                                                    <div class=\"media\">\r\n                                                        <img id=\"profileImage\"");
                EndContext();
                BeginWriteAttribute("src", " src=\"", 4413, "\"", 4433, 1);
#line 83 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                WriteAttributeValue("", 4419, Model.Picture, 4419, 14, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(4434, 2004, true);
                WriteLiteral(@" class=""rounded mr-75"" alt=""profile image"" height=""64"" width=""64"">
                                                        <p id=""b64"" style=""display:none;""></p>
                                                        <input type=""hidden"" id=""base64Picture"" name=""base64Picture"" />
                                                        <div class=""media-body mt-25"">
                                                            <div class=""col-12 px-0 d-flex flex-sm-row flex-column justify-content-start"">
                                                                <input type=""file"" id=""imageUpload"" style=""display: none;"">
                                                                <button type=""button"" id=""btnSelectPhoto"" class=""btn btn-sm btn-light-primary ml-50 mb-50 mb-sm-0 dz-clickable"">Select new photo</button>
                                                                <button type=""button"" id=""btnResetPhoto"" class=""btn btn-sm btn-light-secondary ml-50"">Reset</button>
                 ");
                WriteLiteral(@"                                           </div>
                                                            <p class=""text-muted ml-1 mt-50"">
                                                                <small>Allowed JPG, GIF or PNG.</small>
                                                            </p>
                                                        </div>
                                                    </div>
                                                    <hr>
                                                    <div class=""row"">
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>Email</label>
                                                                    ");
                EndContext();
                BeginContext(6439, 100, false);
#line 103 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.TextBoxFor(m => m.Email, new { @class = "form-control", id = "email", @readonly = "readonly" }));

#line default
#line hidden
                EndContext();
                BeginContext(6539, 621, true);
                WriteLiteral(@"
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>First Name</label>
                                                                    ");
                EndContext();
                BeginContext(7161, 85, false);
#line 111 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.TextBoxFor(m => m.FirstName, new { @class = "form-control", @id = "firstName" }));

#line default
#line hidden
                EndContext();
                BeginContext(7246, 620, true);
                WriteLiteral(@"
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>Last Name</label>
                                                                    ");
                EndContext();
                BeginContext(7867, 83, false);
#line 119 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.TextBoxFor(m => m.LastName, new { @class = "form-control", @id = "lastName" }));

#line default
#line hidden
                EndContext();
                BeginContext(7950, 616, true);
                WriteLiteral(@"
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>Phone</label>
                                                                    ");
                EndContext();
                BeginContext(8567, 77, false);
#line 127 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.TextBoxFor(m => m.Phone, new { @class = "form-control", @id = "phone" }));

#line default
#line hidden
                EndContext();
                BeginContext(8644, 622, true);
                WriteLiteral(@"
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>Description</label>
                                                                    ");
                EndContext();
                BeginContext(9267, 101, false);
#line 135 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.TextArea("Description", Model.Description, new { @class = "form-control", @id = "description" }));

#line default
#line hidden
                EndContext();
                BeginContext(9368, 206, true);
                WriteLiteral("\r\n                                                                </div>\r\n                                                            </div>\r\n                                                        </div>\r\n");
                EndContext();
#line 139 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                if (LocalStorageExtensions.Exists(StorageType.Token) &&
                    (LocalStorageExtensions.Get(StorageType.Role) == "Company" || LocalStorageExtensions.Get(StorageType.Role) == "Shop") &&
                    LocalStorageExtensions.Get(StorageType.Role) != "Admin")
                {
#line default
#line hidden
#line 143 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                    if (Model.listCompanies != null && Model.listCompanies.Count > 0)
                    {
#line default
#line hidden
                        BeginContext(10222, 348, true);
                        WriteLiteral(@"                                                                <div class=""col-12"">
                                                                    <div class=""form-group"">
                                                                        <label>Company</label>
                                                                        ");
                        EndContext();
                        BeginContext(10571, 175, false);
#line 148 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                        Write(Html.DropDownListFor(m => m.CompanyId, new MultiSelectList(Model.listCompanies, "CompanyId", "Name"), new { @class = "form-control", @id = "company", @disabled = "disabled" }));

#line default
#line hidden
                        EndContext();
                        BeginContext(10746, 150, true);
                        WriteLiteral("\r\n                                                                    </div>\r\n                                                                </div>\r\n");
                        EndContext();
#line 151 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                    }

#line default
#line hidden
#line 151 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                }

#line default
#line hidden
                BeginContext(11018, 56, true);
                WriteLiteral("                                                        ");
                EndContext();
#line 153 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                if (LocalStorageExtensions.Exists(StorageType.Token) &&
                    LocalStorageExtensions.Get(StorageType.Role) == "Shop" &&
                    LocalStorageExtensions.Get(StorageType.Role) != "Admin")
                {
#line default
#line hidden
#line 157 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                    if (Model.listShops != null && Model.listShops.Count > 0)
                    {
#line default
#line hidden
                        BeginContext(11595, 345, true);
                        WriteLiteral(@"                                                                <div class=""col-12"">
                                                                    <div class=""form-group"">
                                                                        <label>Shop</label>
                                                                        ");
                        EndContext();
                        BeginContext(11941, 162, false);
#line 162 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                        Write(Html.DropDownListFor(m => m.ShopId, new MultiSelectList(Model.listShops, "ShopId", "Name"), new { @class = "form-control", @id = "shop", @disabled = "disabled" }));

#line default
#line hidden
                        EndContext();
                        BeginContext(12103, 150, true);
                        WriteLiteral("\r\n                                                                    </div>\r\n                                                                </div>\r\n");
                        EndContext();
#line 165 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                    }

#line default
#line hidden
#line 165 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                }

#line default
#line hidden
                BeginContext(12375, 593, true);
                WriteLiteral(@"                                                        <div class=""col-12 d-flex flex-sm-row flex-column justify-content-end"">
                                                            <button type=""submit"" class=""btn btn-primary glow mr-sm-1 mb-1"">
                                                                Save
                                                                changes
                                                            </button>
                                                        </div>
                                                    </div>
");
                EndContext();
#line 174 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(13019, 235, true);
            WriteLiteral("                                            </div>\r\n                                            <div class=\"tab-pane fade \" id=\"account-vertical-password\" role=\"tabpanel\" aria-labelledby=\"account-pill-password\" aria-expanded=\"false\">\r\n");
            EndContext();
#line 177 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
            using (Html.BeginForm("ChangePassword", "Profile", FormMethod.Post, new { @id = "form-password" }))
            {
#line default
#line hidden
                BeginContext(13508, 29, false);
#line 179 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.HiddenFor(m => m.UserId));

#line default
#line hidden
                EndContext();
                BeginContext(13539, 424, true);
                WriteLiteral(@"                                                    <div class=""row"">
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>Current Password</label>
");
                EndContext();
                BeginContext(14192, 68, true);
                WriteLiteral("                                                                    ");
                EndContext();
                BeginContext(14261, 98, false);
#line 186 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.PasswordFor(m => m.CurrentPassword, new { @class = "form-control", @id = "currentPassword" }));

#line default
#line hidden
                EndContext();
                BeginContext(14359, 555, true);
                WriteLiteral(@"
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>New Password</label>
");
                EndContext();
                BeginContext(15168, 68, true);
                WriteLiteral("                                                                    ");
                EndContext();
                BeginContext(15237, 90, false);
#line 195 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.PasswordFor(m => m.NewPassword, new { @class = "form-control", @id = "newPassword" }));

#line default
#line hidden
                EndContext();
                BeginContext(15327, 562, true);
                WriteLiteral(@"
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class=""col-12"">
                                                            <div class=""form-group"">
                                                                <div class=""controls"">
                                                                    <label>Retype new Password</label>
");
                EndContext();
                BeginContext(16194, 68, true);
                WriteLiteral("                                                                    ");
                EndContext();
                BeginContext(16263, 94, false);
#line 204 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
                Write(Html.PasswordFor(m => m.NewPassword, new { @class = "form-control", @id = "confirmPassword" }));

#line default
#line hidden
                EndContext();
                BeginContext(16357, 799, true);
                WriteLiteral(@"
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class=""col-12 d-flex flex-sm-row flex-column justify-content-end"">
                                                            <button type=""submit"" class=""btn btn-primary glow mr-sm-1 mb-1"">
                                                                Save
                                                                changes
                                                            </button>
                                                        </div>
                                                    </div>
");
                EndContext();
#line 215 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Profile\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(17207, 362, true);
            WriteLiteral(@"                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>");
            EndContext();
        }
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(33, 2, true);
            WriteLiteral("\r\n");
            EndContext();
#line 3 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shared\_LoginPartial.cshtml"
            if (LocalStorageExtensions.Exists(StorageType.Token))
            {
#line default
#line hidden
                BeginContext(94, 4, true);
                WriteLiteral("    ");
                EndContext();
                BeginContext(98, 1093, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "78898586cf624d599b95f0b323735012", async() => {
                    BeginContext(212, 258, true);
                    WriteLiteral(@"
        <li class=""dropdown dropdown-user nav-item"">
            <a class=""dropdown-toggle nav-link dropdown-user-link"" href=""#"" data-toggle=""dropdown"">
                <div class=""user-nav d-sm-flex d-none"">
                    <span class=""user-name"">");
                    EndContext();
                    BeginContext(471, 44, false);
#line 9 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shared\_LoginPartial.cshtml"
                    Write(LocalStorageExtensions.Get(StorageType.Name));

#line default
#line hidden
                    EndContext();
                    BeginContext(515, 77, true);
                    WriteLiteral("</span>\r\n                </div><span>\r\n                    <img class=\"round\"");
                    EndContext();
                    BeginWriteAttribute("src", " src=\"", 592, "\"", 646, 1);
#line 11 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shared\_LoginPartial.cshtml"
                    WriteAttributeValue("", 598, LocalStorageExtensions.Get(StorageType.Picture), 598, 48, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(647, 164, true);
                    WriteLiteral(" alt=\"avatar\" height=\"40\" width=\"40\">\r\n                </span>\r\n            </a>\r\n            <div class=\"dropdown-menu dropdown-menu-right pb-0\">\r\n                ");
                    EndContext();
                    BeginContext(811, 158, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "7018ad125d06463fb2205da8de157870", async() => {
                        BeginContext(880, 85, true);
                        WriteLiteral("\r\n                    <i class=\"bx bx-user mr-50\"></i> Edit Profile\r\n                ");
                        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_0.Value;
                    __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
                    __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(969, 215, true);
                    WriteLiteral("\r\n                <div class=\"dropdown-divider mb-0\"></div>\r\n                <button type=\"submit\" class=\"dropdown-item\"><i class=\"bx bx-power-off mr-50\"></i> Logout</button>\r\n            </div>\r\n        </li>\r\n    ");
                    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);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Area = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_5.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_6.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1191, 2, true);
                WriteLiteral("\r\n");
                EndContext();
#line 23 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shared\_LoginPartial.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(1205, 65, true);
                WriteLiteral("    <div class=\"row\">\r\n        <div class=\"col-12\">\r\n            ");
                EndContext();
                BeginContext(1270, 132, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "0c0ed868014f43138f5287f8f5dd9887", async() => {
                    BeginContext(1393, 5, true);
                    WriteLiteral("Login");
                    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.Area = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_9.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_9);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_10);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_11);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1402, 14, true);
                WriteLiteral("\r\n            ");
                EndContext();
                BeginContext(1416, 138, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "34cbe0084527438fae8e34c054c85c99", async() => {
                    BeginContext(1542, 8, true);
                    WriteLiteral("Register");
                    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.Area = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_12.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_12);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_10);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_11);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1554, 30, true);
                WriteLiteral("\r\n        </div>\r\n    </div>\r\n");
                EndContext();
#line 32 "D:\UtviklingMujahid\Sample Projects\EasyTopup\Source\EasyTopup.Web\Views\Shared\_LoginPartial.cshtml"
            }

#line default
#line hidden
        }
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(34, 2, true);
            WriteLiteral("\r\n");
            EndContext();
#line 3 "D:\Pacsquare\Projects\Health Portal\Source\CarePortal.Web\Views\Shared\_LoginPartial.cshtml"
            if (LocalStorageExtensions.Exists(StorageType.Token))
            {
#line default
#line hidden
                BeginContext(95, 46, true);
                WriteLiteral("    <div class=\"navbar-custom-menu\">\r\n        ");
                EndContext();
                BeginContext(141, 1859, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9cb184c232f847909d14a104528f03dc", async() => {
                    BeginContext(255, 361, true);
                    WriteLiteral(@"
            <ul class=""nav navbar-nav"">
                <!-- User Account Menu -->
                <li class=""dropdown user user-menu"">
                    <!-- Menu Toggle Button -->
                    <a href=""#"" class=""dropdown-toggle"" data-toggle=""dropdown"">
                        <!-- The user image in the navbar-->
                        <img");
                    EndContext();
                    BeginWriteAttribute("src", " src=\"", 616, "\"", 670, 1);
#line 13 "D:\Pacsquare\Projects\Health Portal\Source\CarePortal.Web\Views\Shared\_LoginPartial.cshtml"
                    WriteAttributeValue("", 622, LocalStorageExtensions.Get(StorageType.Picture), 622, 48, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(671, 177, true);
                    WriteLiteral(" class=\"user-image\">\r\n                        <!-- hidden-xs hides the username on small devices so only the image appears. -->\r\n                        <span class=\"hidden-xs\">");
                    EndContext();
                    BeginContext(849, 48, false);
#line 15 "D:\Pacsquare\Projects\Health Portal\Source\CarePortal.Web\Views\Shared\_LoginPartial.cshtml"
                    Write(LocalStorageExtensions.Get(StorageType.Username));

#line default
#line hidden
                    EndContext();
                    BeginContext(897, 226, true);
                    WriteLiteral("</span>\r\n                    </a>\r\n                    <ul class=\"dropdown-menu\">\r\n                        <!-- The user image in the menu -->\r\n                        <li class=\"user-header\">\r\n                            <img");
                    EndContext();
                    BeginWriteAttribute("src", " src=\"", 1123, "\"", 1177, 1);
#line 20 "D:\Pacsquare\Projects\Health Portal\Source\CarePortal.Web\Views\Shared\_LoginPartial.cshtml"
                    WriteAttributeValue("", 1129, LocalStorageExtensions.Get(StorageType.Picture), 1129, 48, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(1178, 87, true);
                    WriteLiteral(" class=\"img-circle\">\r\n                            <p>\r\n                                ");
                    EndContext();
                    BeginContext(1266, 48, false);
#line 22 "D:\Pacsquare\Projects\Health Portal\Source\CarePortal.Web\Views\Shared\_LoginPartial.cshtml"
                    Write(LocalStorageExtensions.Get(StorageType.Username));

#line default
#line hidden
                    EndContext();
                    BeginContext(1314, 247, true);
                    WriteLiteral("\r\n                            </p>\r\n                        </li>\r\n                        <!-- Menu Footer-->\r\n                        <li class=\"user-footer\">\r\n                            <div class=\"pull-left\">\r\n                                ");
                    EndContext();
                    BeginContext(1561, 91, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5753a80b45604d30a51629268af3c4fa", async() => {
                        BeginContext(1641, 7, true);
                        WriteLiteral("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(1652, 341, true);
                    WriteLiteral(@"
                            </div>
                            <div class=""pull-right"">
                                <button type=""submit"" class=""btn btn-default btn-flat"">Log out</button>
                            </div>
                        </li>
                    </ul>
                </li>
            </ul>
        ");
                    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);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Area = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_5.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
                __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_6.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2000, 14, true);
                WriteLiteral("\r\n    </div>\r\n");
                EndContext();
#line 39 "D:\Pacsquare\Projects\Health Portal\Source\CarePortal.Web\Views\Shared\_LoginPartial.cshtml"
            }
            else
            {
#line default
#line hidden
                BeginContext(2026, 59, true);
                WriteLiteral("    <div class=\"pull-right\" style=\"margin: 7px;\">\r\n        ");
                EndContext();
                BeginContext(2085, 107, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "694c32b1ea5449a0b56a7f5b9088a763", async() => {
                    BeginContext(2180, 8, true);
                    WriteLiteral("Register");
                    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.Area = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_9.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_9);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2192, 73, true);
                WriteLiteral("\r\n    </div>\r\n    <div class=\"pull-right\" style=\"margin: 7px;\">\r\n        ");
                EndContext();
                BeginContext(2265, 102, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "247fcee318e34019b1559d8095795e21", async() => {
                    BeginContext(2357, 6, true);
                    WriteLiteral("Log in");
                    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.Area = (string)__tagHelperAttribute_3.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_10.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_10);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2367, 14, true);
                WriteLiteral("\r\n    </div>\r\n");
                EndContext();
#line 48 "D:\Pacsquare\Projects\Health Portal\Source\CarePortal.Web\Views\Shared\_LoginPartial.cshtml"
            }

#line default
#line hidden
        }
        public async Task <IActionResult> Login(LoginViewModel model, string returnUrl = null)
        {
            ViewData["ReturnUrl"] = returnUrl;
            if (ModelState.IsValid)
            {
                string response = await APICallerExtensions.APICallAsync("Account/Login", model, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                if (string.IsNullOrEmpty(response) || response.ToLower().Contains("exception:"))
                {
                    ModelState.AddModelError(string.Empty, response);
                    return(View(model));
                }
                var content = JsonConvert.DeserializeObject <SingleResponse <UserModel> >(response);
                if (!content.DidError)
                {
                    if (content.Model.Role == "Shop")
                    {
                        RemainingBalanceViewModel remainingBalanceViewModel = new RemainingBalanceViewModel()
                        {
                            UserId = content.Model.Id
                        };

                        string responseBalance = await APICallerExtensions.APICallAsync("RemainingBalance/GetByUserId", remainingBalanceViewModel, false, HttpContext.Session.GetObject(StorageType.Token).ToString());

                        if (responseBalance.ToLower().Contains("exception:"))
                        {
                            ModelState.AddModelError(string.Empty, responseBalance);
                        }
                        var contentBalance = JsonConvert.DeserializeObject <SingleResponse <RemainingBalance> >(responseBalance);
                        if (!contentBalance.DidError)
                        {
                            if (contentBalance.Model != null)
                            {
                                LocalStorageExtensions.Store(StorageType.Balance, contentBalance.Model.CurrentAmount.ToString());
                            }
                            else
                            {
                                LocalStorageExtensions.Store(StorageType.Balance, "0.00");
                            }
                        }
                    }


                    LocalStorageExtensions.Store(StorageType.Token, content.Token);
                    LocalStorageExtensions.Store(StorageType.UserId, content.Model.Id);
                    LocalStorageExtensions.Store(StorageType.Username, content.Model.UserName);

                    //Sample get/set of http context sessions
                    //HttpContext.Session.SetObject(StorageType.Token, content.Token);
                    //var objComplex = HttpContext.Session.GetObject(StorageType.Token);

                    if (string.IsNullOrEmpty(content.Model.Picture))
                    {
                        if (_hostingEnvironment.IsDevelopment())
                        {
                            LocalStorageExtensions.Store(StorageType.Picture, "/app-assets/images/user.png");
                        }
                        else
                        {
                            LocalStorageExtensions.Store(StorageType.Picture, "../app-assets/images/user.png");
                        }
                    }
                    else
                    {
                        LocalStorageExtensions.Store(StorageType.Picture, content.Model.Picture);
                    }
                    LocalStorageExtensions.Store(StorageType.Role, content.Model.Role);
                    LocalStorageExtensions.Store(StorageType.Name, content.Model.FirstName + " " + content.Model.LastName);

                    LocalStorageExtensions.Store(StorageType.IsCompanySelected, content.Model.IsCompanySelected.ToString());
                    LocalStorageExtensions.Store(StorageType.IsShopSelected, content.Model.IsShopSelected.ToString());

                    if (content.Model.Role == "Admin" || content.Model.Role == "Company")
                    {
                        return(RedirectToAction("Index", "Dashboard"));
                    }
                    else if (content.Model.Role == "Shop")
                    {
                        return(RedirectToAction("Index", "Sale"));
                    }
                }
                else
                {
                    ModelState.AddModelError(string.Empty, content.Message);
                    return(View(model));
                }
            }

            // If we got this far, something failed, redisplay form
            return(View(model));
        }