public ActionResult Register()
        {
            var res = _UseradminService.GetCustomerList();

            if (TempData["EditUserId"] != null)
            {
                Login_tbl Login_tbl = _UseradminService.EditUser(Convert.ToInt32(TempData["EditUserId"]));
                return(View("Register", new RegistrationVM
                {
                    ID = Login_tbl.ID,
                    FirstName = Login_tbl.FirstName,
                    LastName = Login_tbl.LastName,
                    Email = Login_tbl.UserName,
                    Password = UrlSecurityManager.Decrypt(Login_tbl.Password, ConfigurationManager.AppSettings["SecurityKey"]),
                    ConfirmPassword = UrlSecurityManager.Decrypt(Login_tbl.Password, ConfigurationManager.AppSettings["SecurityKey"]),
                    MobileNo = Login_tbl.MobileNo,
                    CustomerId = Login_tbl.CustomerId,
                    CustomerList = res
                }));
            }
            else
            {
                return(View("Register", new RegistrationVM {
                    CustomerList = res
                }));
            }
        }
        public ActionResult ProductsById(string ProductId)
        {
            ProductViewModel viewModel;

            if (!string.IsNullOrEmpty(ProductId))
            {
                var res = _productService.GetProduct(Convert.ToDecimal(UrlSecurityManager.Decrypt(ProductId, System.Configuration.ConfigurationManager.AppSettings["SecurityKey"])));
                if (res != null)
                {
                    viewModel = AutoMapper.Mapper.Map <ProductEntity, ProductViewModel>(res);
                    if (viewModel.ProductUserGuide == null)
                    {
                        viewModel.ProductUserGuide = new ProductUserGuideViewModel();
                    }
                    if (viewModel.ProductFAQs != null)
                    {
                        foreach (var item in viewModel.ProductFAQs)
                        {
                            var productFaq   = _productService.GetProductFAQ(item.Id);
                            var viewModelFAQ = AutoMapper.Mapper.Map <ProductFAQs, ProductFaqViewModel>(productFaq);
                            if (viewModelFAQ.ProductFAQVideoList == null)
                            {
                                viewModelFAQ.ProductFAQVideoList = new List <ProductFAQVideoViewModel>();
                            }
                            else
                            {
                                var videos = AutoMapper.Mapper.Map <List <ProductFAQVideos>, List <ProductFAQVideoViewModel> >(productFaq.ProductFAQVideos.ToList());
                                viewModelFAQ.ProductFAQVideoList = videos.Where(y => y.IsDeleted != true).ToList();
                            }
                            item.ProductFAQVideoList = viewModelFAQ.ProductFAQVideoList;
                        }
                    }
                }
                else
                {
                    viewModel = new ProductViewModel();
                    return(Redirect("/Home/Index"));
                }
            }
            else
            {
                viewModel = new ProductViewModel();
                return(Redirect("/Home/Index"));
            }

            ViewBag.SubCategoryList = _subCategoryService.GetSubCategoryList();
            //_homeService.AddProductToRecentViewed(new RecentVisitedProduct() { ProductId = ProductId, UserId = Guid.Parse("6A68CDB1-167F-4323-9D90-34602D20E06D") });
            _homeService.AddProductToRecentViewed(new RecentVisitedProduct()
            {
                ProductId = Convert.ToDecimal(UrlSecurityManager.Decrypt(ProductId, "iPsUniversity2020")), UserId = Convert.ToInt32(Session["UserLoginID"])
            });

            return(View(viewModel));
        }