├── .gitignore ├── GameStore.Domain ├── App.config ├── GameStore.Domain.csproj ├── Helper │ └── GameStorePasswordHasher.cs ├── Identity │ ├── AppRole.cs │ ├── AppRoleManager.cs │ ├── AppSignInManager.cs │ ├── AppUser.cs │ ├── AppUserManager.cs │ └── AppUserStore.cs ├── Infrastructure │ ├── GameStoreDBContext.cs │ └── IdentityDbInitializer.cs ├── Model │ ├── Category.cs │ ├── Order.cs │ ├── OrderItem.cs │ ├── Product.cs │ └── Review.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── GameStore.Extension ├── CustomHelpers.cs ├── GameStore.Extension.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── GameStore.WebUI ├── Apis │ ├── AccountController.cs │ ├── BaseApiController.cs │ ├── CategoryController.cs │ ├── OrderController.cs │ ├── ProductController.cs │ ├── RoleController.cs │ └── UserController.cs ├── App_Data │ ├── gamestore.mdf │ └── gamestore_log.ldf ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── RouteConfig.cs │ ├── Startup.Auth.cs │ └── WebApiConfig.cs ├── Areas │ └── Admin │ │ ├── AdminAreaRegistration.cs │ │ ├── Controllers │ │ ├── AccountController.cs │ │ ├── DashboardController.cs │ │ └── StoreController.cs │ │ ├── Models │ │ ├── CategoryViewModel.cs │ │ ├── DTO │ │ │ ├── CategoryDTO.cs │ │ │ ├── OrderDTO.cs │ │ │ ├── OrderItemDTO.cs │ │ │ ├── ProductDTO.cs │ │ │ ├── ProductOrderDTO.cs │ │ │ ├── RoleDTO.cs │ │ │ └── UserDTO.cs │ │ ├── ProductViewModel.cs │ │ ├── RoleViewModel.cs │ │ └── UserViewModel.cs │ │ └── Views │ │ ├── Account │ │ ├── AppRole.cshtml │ │ └── AppUser.cshtml │ │ ├── Dashboard │ │ └── Index.cshtml │ │ ├── Store │ │ ├── Category.cshtml │ │ ├── Order.cshtml │ │ └── Product.cshtml │ │ ├── _ViewStart.cshtml │ │ └── web.config ├── Content │ ├── Site.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap-theme.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ ├── fancybox │ │ ├── blank.gif │ │ ├── fancybox_buttons.png │ │ ├── fancybox_loading.gif │ │ ├── fancybox_loading@2x.gif │ │ ├── fancybox_overlay.png │ │ ├── fancybox_sprite.png │ │ └── fancybox_sprite@2x.png │ ├── jquery.fancybox-buttons.css │ ├── jquery.fancybox-thumbs.css │ ├── jquery.fancybox.css │ ├── popup.css │ └── themes │ │ └── base │ │ ├── accordion.css │ │ ├── all.css │ │ ├── autocomplete.css │ │ ├── base.css │ │ ├── button.css │ │ ├── core.css │ │ ├── datepicker.css │ │ ├── dialog.css │ │ ├── draggable.css │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── menu.css │ │ ├── progressbar.css │ │ ├── resizable.css │ │ ├── selectable.css │ │ ├── selectmenu.css │ │ ├── slider.css │ │ ├── sortable.css │ │ ├── spinner.css │ │ ├── tabs.css │ │ ├── theme.css │ │ └── tooltip.css ├── Controllers │ ├── AccountController.cs │ ├── BaseController.cs │ ├── HomeController.cs │ ├── MyOrderController.cs │ ├── ProductController.cs │ └── ShoppingCartController.cs ├── GameStore.WebUI.csproj ├── Global.asax ├── Global.asax.cs ├── Helper │ ├── ConfigurationHelper.cs │ └── CreditAuthorizationClient.cs ├── Models │ ├── CartItem.cs │ ├── ShoppingCart.cs │ ├── State.cs │ └── ViewModels │ │ ├── AccountViewModels.cs │ │ ├── CartViewModel.cs │ │ ├── CheckoutViewModel.cs │ │ ├── OrderItemViewModel.cs │ │ └── OrderViewModel.cs ├── Properties │ └── AssemblyInfo.cs ├── Startup.cs ├── Views │ ├── Account │ │ ├── ChangePassword.cshtml │ │ ├── Login.cshtml │ │ ├── MemberProfile.cshtml │ │ ├── ProcessCreditResponse.cshtml │ │ └── Register.cshtml │ ├── Home │ │ └── Index.cshtml │ ├── MyOrder │ │ ├── Detail.cshtml │ │ └── Index.cshtml │ ├── Product │ │ ├── Detail.cshtml │ │ ├── List.cshtml │ │ ├── MyProductOrders.cshtml │ │ └── MyProducts.cshtml │ ├── Shared │ │ ├── _FrontLayout.cshtml │ │ ├── _FrontPartial.cshtml │ │ ├── _Layout.cshtml │ │ └── _LoginPartial.cshtml │ ├── ShoppingCart │ │ ├── Checkout.cshtml │ │ ├── Index.cshtml │ │ └── PlaceOrder.cshtml │ ├── _ViewStart.cshtml │ └── web.config ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── images │ ├── accessories │ │ ├── Turtle Beach Headset.jpg │ │ ├── XBOX controller.jpg │ │ ├── XBOX360-SpeedWheel.jpg │ │ ├── chartboost.jpg │ │ ├── ps3_controller.jpg │ │ ├── ps3_diskcontroller.jpg │ │ ├── ps4_controllercharger.jpg │ │ ├── wii_chargingsystem.jpg │ │ ├── wii_remoteplus.jpg │ │ ├── wiiu_fightingpad.jpg │ │ ├── wiiu_gamecube.jpg │ │ └── xbox360_wa.png │ ├── bag.png │ ├── consoles │ │ ├── PS4-console-bundle.jpg │ │ ├── ps3-console.jpg │ │ ├── wii.jpg │ │ ├── wiiu.jpg │ │ ├── xbox1.jpg │ │ └── xbox360.jpg │ ├── favorite.ico │ ├── games │ │ ├── activision_cod.jpg │ │ ├── activision_prot.jpg │ │ ├── ea_fifa.jpg │ │ ├── ea_nfs.jpg │ │ ├── tti_evolve.jpg │ │ └── tti_gta.jpg │ └── search.png ├── packages.config └── scripts │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.10.2.intellisense.js │ ├── jquery-1.10.2.js │ ├── jquery-1.10.2.min.js │ ├── jquery-1.10.2.min.map │ ├── jquery-ui-1.11.4.js │ ├── jquery-ui-1.11.4.min.js │ ├── jquery.fancybox-buttons.js │ ├── jquery.fancybox-media.js │ ├── jquery.fancybox-thumbs.js │ ├── jquery.fancybox.js │ ├── jquery.fancybox.pack.js │ ├── jquery.mousewheel-3.0.6.pack.js │ ├── jquery.unobtrusive-ajax.js │ ├── jquery.unobtrusive-ajax.min.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ └── modernizr-2.6.2.js ├── GameStore.sln ├── LICENSE.md ├── README.md └── public └── games.png /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | packages/ 4 | .vs/ 5 | *.userprefs 6 | -------------------------------------------------------------------------------- /GameStore.Domain/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /GameStore.Domain/Helper/GameStorePasswordHasher.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Security.Cryptography; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace GameStore.Domain.Helper 10 | { 11 | public class GameStorePasswordHasher : IPasswordHasher 12 | { 13 | public string HashPassword(string password) 14 | { 15 | 16 | //WARNING: This code does not reflect best practice. It is a simplistic implementation designed to introduce the concept of hashing. 17 | password = "$$$$$" + password + "$#!%^"; 18 | var pwdBytes = Encoding.UTF8.GetBytes(password); 19 | 20 | SHA256 hashAlg = new SHA256Managed(); 21 | hashAlg.Initialize(); 22 | var hashedBytes = hashAlg.ComputeHash(pwdBytes); 23 | var hash = Convert.ToBase64String(hashedBytes); 24 | return hash; 25 | } 26 | 27 | public PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword) 28 | { 29 | String hash = this.HashPassword(providedPassword); 30 | if (hash == hashedPassword) 31 | return PasswordVerificationResult.Success; 32 | else 33 | return PasswordVerificationResult.Failed; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /GameStore.Domain/Identity/AppRole.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity.EntityFramework; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace GameStore.Domain.Identity 10 | { 11 | [MetadataType(typeof(RoleMetaData))] 12 | public class AppRole : IdentityRole 13 | { 14 | public AppRole() : base() { } 15 | 16 | public AppRole(string description) 17 | : base() 18 | { 19 | this.Description = description; 20 | } 21 | 22 | public virtual string Description { get; set; } 23 | } 24 | 25 | public class RoleMetaData 26 | { 27 | [Required(ErrorMessage = "Please enter a role name")] 28 | public string Name { get; set; } 29 | [DataType(DataType.MultilineText)] 30 | [Required(ErrorMessage = "Please enter a description")] 31 | public string Description { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /GameStore.Domain/Identity/AppRoleManager.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Infrastructure; 2 | using Microsoft.AspNet.Identity; 3 | using Microsoft.AspNet.Identity.EntityFramework; 4 | using Microsoft.AspNet.Identity.Owin; 5 | using Microsoft.Owin; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace GameStore.Domain.Identity 13 | { 14 | public class AppRoleManager : RoleManager, IDisposable 15 | { 16 | 17 | public AppRoleManager(RoleStore store) 18 | : base(store) 19 | { 20 | } 21 | 22 | public static AppRoleManager Create( 23 | IdentityFactoryOptions options, 24 | IOwinContext context) 25 | { 26 | return new AppRoleManager(new 27 | RoleStore(context.Get())); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /GameStore.Domain/Identity/AppSignInManager.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity; 2 | using Microsoft.AspNet.Identity.Owin; 3 | using Microsoft.Owin; 4 | using Microsoft.Owin.Security; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Security.Claims; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace GameStore.Domain.Identity 13 | { 14 | public class AppSignInManager : SignInManager 15 | { 16 | public AppSignInManager(AppUserManager userManager, IAuthenticationManager authenticationManager) 17 | : base(userManager, authenticationManager) 18 | { 19 | 20 | } 21 | 22 | public override Task PasswordSignInAsync(string userName, string password, bool isPersistent, bool shouldLockout) 23 | { 24 | 25 | var user = UserManager.Find(userName, password); 26 | if (user == null) 27 | return Task.FromResult(SignInStatus.Failure); 28 | else 29 | return Task.FromResult(SignInStatus.Success); 30 | } 31 | 32 | public override Task CreateUserIdentityAsync(AppUser user) 33 | { 34 | return user.GenerateUserIdentityAsync((AppUserManager)UserManager); 35 | } 36 | 37 | public static AppSignInManager Create(IdentityFactoryOptions options, IOwinContext context) 38 | { 39 | return new AppSignInManager(context.GetUserManager(), context.Authentication); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /GameStore.Domain/Identity/AppUser.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.Linq; 7 | using System.Security.Claims; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace GameStore.Domain.Identity 12 | { 13 | public class AppUser : IdentityUser 14 | { 15 | public async Task GenerateUserIdentityAsync(UserManager manager) 16 | { 17 | // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType 18 | var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie); 19 | // Add custom user claims here 20 | return userIdentity; 21 | } 22 | 23 | public virtual string Membership { get; set; } 24 | 25 | public ICollection UserRoles { get; set; } 26 | } 27 | 28 | public class UserMetaData 29 | { 30 | [Required(ErrorMessage = "Please enter a role name")] 31 | public string Name { get; set; } 32 | [DataType(DataType.MultilineText)] 33 | [Required(ErrorMessage = "Please enter a description")] 34 | public string Description { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /GameStore.Domain/Identity/AppUserManager.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Helper; 2 | using GameStore.Domain.Infrastructure; 3 | using Microsoft.AspNet.Identity; 4 | using Microsoft.AspNet.Identity.EntityFramework; 5 | using Microsoft.AspNet.Identity.Owin; 6 | using Microsoft.Owin; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Data.Entity; 10 | using System.Linq; 11 | using System.Security.Claims; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | 15 | namespace GameStore.Domain.Identity 16 | { 17 | public class AppUserManager : UserManager 18 | { 19 | private AppUserStore _store; 20 | private string _membership = ""; 21 | public AppUserManager(AppUserStore store) 22 | : base(store) 23 | { 24 | _store = store; 25 | } 26 | 27 | public override Task CreateAsync(AppUser user, string password) 28 | { 29 | try 30 | { 31 | if (!user.Membership.Equals("Regular") && !user.Membership.Equals("Advanced")) 32 | { 33 | return Task.FromResult(IdentityResult.Failed("Invalid membership!")); 34 | } 35 | AppUser existUser = _store.Users.Where(u => u.Email == user.Email).FirstOrDefault(); 36 | if (existUser != null) 37 | { 38 | return Task.FromResult(IdentityResult.Failed("User with email ["+ user.Email + "] already exists!")); 39 | } 40 | 41 | GameStoreDBContext context = (GameStoreDBContext)_store.Context; 42 | var newUser = context.Users.Create(); 43 | newUser.Email = user.Email; 44 | newUser.UserName = user.UserName; 45 | newUser.PasswordHash = PasswordHasher.HashPassword(password); 46 | newUser.PhoneNumber = user.PhoneNumber; 47 | newUser.Membership = user.Membership; 48 | 49 | var role = context.Roles.Where(r => r.Name == user.Membership).First(); 50 | newUser.Roles.Add(new IdentityUserRole { RoleId = role.Id, UserId = newUser.Id }); 51 | context.Users.Add(newUser); 52 | 53 | context.SaveChanges(); 54 | 55 | return Task.FromResult(IdentityResult.Success); 56 | } 57 | catch (Exception ex) 58 | { 59 | return Task.FromResult(IdentityResult.Failed("DB Error")); 60 | } 61 | 62 | } 63 | public override Task CreateIdentityAsync(AppUser user, string authenticationType) 64 | { 65 | ClaimsIdentity identity = new ClaimsIdentity(authenticationType); 66 | var claims = new List(); 67 | 68 | claims.Add(new Claim(ClaimTypes.Name, user.UserName)); 69 | claims.Add(new Claim(ClaimTypes.Email, user.Email)); 70 | claims.Add(new Claim(ClaimTypes.NameIdentifier, user.Id)); 71 | 72 | var roles = _store.GetRolesAsync(user).Result; 73 | foreach (string role in roles) 74 | claims.Add(new Claim(ClaimTypes.Role, role)); 75 | 76 | identity.AddClaims(claims); 77 | 78 | return Task.FromResult(identity); 79 | 80 | } 81 | public override Task FindAsync(string userName, string password) 82 | { 83 | 84 | string hashedPassword = PasswordHasher.HashPassword(password); 85 | return _store.Users.Where(u => u.Email == userName && u.PasswordHash == hashedPassword).FirstOrDefaultAsync(); 86 | 87 | } 88 | 89 | public override Task FindByEmailAsync(string email) 90 | { 91 | return _store.Users.Where(u => u.Email == email).FirstOrDefaultAsync(); 92 | } 93 | public static AppUserManager Create(IdentityFactoryOptions options, IOwinContext context) 94 | { 95 | var manager = new AppUserManager(new AppUserStore(context.Get())); 96 | // Configure validation logic for usernames 97 | manager.UserValidator = new UserValidator(manager) 98 | { 99 | AllowOnlyAlphanumericUserNames = false, 100 | RequireUniqueEmail = true 101 | }; 102 | 103 | manager.PasswordHasher = new GameStorePasswordHasher(); 104 | 105 | // Configure validation logic for passwords 106 | manager.PasswordValidator = new PasswordValidator 107 | { 108 | RequiredLength = 6, 109 | RequireNonLetterOrDigit = true, 110 | RequireDigit = true, 111 | RequireLowercase = true, 112 | RequireUppercase = true, 113 | }; 114 | 115 | // Configure user lockout defaults 116 | manager.UserLockoutEnabledByDefault = true; 117 | manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(5); 118 | manager.MaxFailedAccessAttemptsBeforeLockout = 5; 119 | 120 | return manager; 121 | } 122 | 123 | public void SetMembership(string membership) 124 | { 125 | _membership = membership; 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /GameStore.Domain/Identity/AppUserStore.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Infrastructure; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace GameStore.Domain.Identity 10 | { 11 | public class AppUserStore : UserStore 12 | { 13 | public AppUserStore(GameStoreDBContext context) : base(context) 14 | { 15 | 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GameStore.Domain/Infrastructure/GameStoreDBContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using GameStore.Domain.Model; 8 | using Microsoft.AspNet.Identity.EntityFramework; 9 | using GameStore.Domain.Identity; 10 | 11 | namespace GameStore.Domain.Infrastructure 12 | { 13 | public partial class GameStoreDBContext : IdentityDbContext 14 | { 15 | public GameStoreDBContext() 16 | : base("name=GameStoreDBContext", throwIfV1Schema: false) 17 | { 18 | Database.SetInitializer(new IdentityDbInitializer()); 19 | } 20 | 21 | public static GameStoreDBContext Create() 22 | { 23 | return new GameStoreDBContext(); 24 | } 25 | 26 | //public virtual DbSet Roles { get; set; } 27 | //public virtual DbSet Users { get; set; } 28 | public virtual DbSet Products { get; set; } 29 | public virtual DbSet Categories { get; set; } 30 | public virtual DbSet Reviews { get; set; } 31 | public virtual DbSet OrderItems { get; set; } 32 | public virtual DbSet Orders { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /GameStore.Domain/Model/Category.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace GameStore.Domain.Model 9 | { 10 | public partial class Category 11 | { 12 | public Category() 13 | { 14 | 15 | } 16 | [Required] 17 | public int CategoryId { get; set; } 18 | [Display(Name = "Category Name")] 19 | [Required] 20 | public string CategoryName { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /GameStore.Domain/Model/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace GameStore.Domain.Model 9 | { 10 | public partial class Order 11 | { 12 | public Order() 13 | { 14 | this.OrderItems = new HashSet(); 15 | } 16 | [Required] 17 | public int OrderId { get; set; } 18 | [Required] 19 | public string UserId { get; set; } 20 | [Required] 21 | public string FullName { get; set; } 22 | [Required] 23 | public string Address { get; set; } 24 | [Required] 25 | public string City { get; set; } 26 | [Required] 27 | public string State { get; set; } 28 | [Required] 29 | public string Zip { get; set; } 30 | [Required] 31 | public string ConfirmationNumber { get; set; } 32 | [Required] 33 | public DateTime DeliveryDate { get; set; } 34 | public virtual ICollection OrderItems { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /GameStore.Domain/Model/OrderItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace GameStore.Domain.Model 9 | { 10 | public partial class OrderItem 11 | { 12 | public OrderItem() 13 | { 14 | 15 | } 16 | //public OrderItem(int OrderId, int ProductId, int Quantity) 17 | //{ 18 | // this.OrderId = OrderId; 19 | // this.ProductId = ProductId; 20 | // this.Quantity = Quantity; 21 | //} 22 | [Required] 23 | public int OrderItemId { get; set; } 24 | [Required] 25 | public int OrderId { get; set; } 26 | [Required] 27 | public int ProductId { get; set; } 28 | [Required] 29 | public int Quantity { get; set; } 30 | public virtual Order Order { get; set; } 31 | public virtual Product Product { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /GameStore.Domain/Model/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace GameStore.Domain.Model 9 | { 10 | public partial class Product 11 | { 12 | public Product() 13 | { 14 | this.Reviews = new HashSet(); 15 | } 16 | [Required] 17 | public int ProductId { get; set; } 18 | [Display(Name = "Product Name")] 19 | [Required] 20 | public string ProductName { get; set; } 21 | [Display(Name = "Category")] 22 | public int CategoryId { get; set; } 23 | [Required] 24 | public double Price { get; set; } 25 | [Required] 26 | public string Image { get; set; } 27 | [Required] 28 | public string Condition { get; set; } 29 | [Required] 30 | public int Discount { get; set; } 31 | [Required] 32 | public string UserId { get; set; } 33 | public virtual Category Category { get; set; } 34 | public virtual ICollection Reviews { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /GameStore.Domain/Model/Review.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Identity; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace GameStore.Domain.Model 10 | { 11 | public partial class Review 12 | { 13 | public Review() 14 | { 15 | 16 | } 17 | [Required] 18 | public int ReviewId { get; set; } 19 | [Required] 20 | public int ProductId { get; set; } 21 | [Required] 22 | public int UserId { get; set; } 23 | [Required] 24 | public int Rating { get; set; } 25 | public string Comments { get; set; } 26 | [Required] 27 | public DateTime ReviewDate { get; set; } 28 | public virtual Product Product { get; set; } 29 | public virtual AppUser User { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /GameStore.Domain/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ECTDBDal")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("ECTDBDal")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("89668e5c-bfae-41ed-913f-b039c6898b27")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GameStore.Domain/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /GameStore.Extension/CustomHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Web.Mvc; 8 | using System.Web.Routing; 9 | 10 | namespace GameStore.Extension 11 | { 12 | public static class CustomHelpers 13 | { 14 | public static string IsSelected(this HtmlHelper html, string controllers = "", string actions = "", string cssClass = "active") 15 | { 16 | ViewContext viewContext = html.ViewContext; 17 | bool isChildAction = viewContext.Controller.ControllerContext.IsChildAction; 18 | 19 | if (isChildAction) 20 | viewContext = html.ViewContext.ParentActionViewContext; 21 | 22 | RouteValueDictionary routeValues = viewContext.RouteData.Values; 23 | string currentAction = routeValues["action"].ToString(); 24 | string currentController = routeValues["controller"].ToString(); 25 | 26 | if (String.IsNullOrEmpty(actions)) 27 | actions = currentAction; 28 | 29 | if (String.IsNullOrEmpty(controllers)) 30 | controllers = currentController; 31 | 32 | string[] acceptedActions = actions.Trim().Split(',').Distinct().ToArray(); 33 | string[] acceptedControllers = controllers.Trim().Split(',').Distinct().ToArray(); 34 | 35 | return acceptedActions.Contains(currentAction) && acceptedControllers.Contains(currentController) ? 36 | cssClass : String.Empty; 37 | } 38 | 39 | public static string FormattedCurrency(this HtmlHelper html, double value) 40 | { 41 | CultureInfo cultureInfo = new CultureInfo("en-US"); 42 | return string.Format(cultureInfo, "{0:C}", value); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /GameStore.Extension/GameStore.Extension.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E3686E98-B47F-42F7-8DB6-2CF476FBF652} 8 | Library 9 | Properties 10 | GameStore.Extension 11 | GameStore.Extension 12 | v4.5.2 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll 35 | True 36 | 37 | 38 | 39 | 40 | 41 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll 42 | True 43 | 44 | 45 | ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll 46 | True 47 | 48 | 49 | ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll 50 | True 51 | 52 | 53 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll 54 | True 55 | 56 | 57 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll 58 | True 59 | 60 | 61 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll 62 | True 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 86 | -------------------------------------------------------------------------------- /GameStore.Extension/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GameStore.Extension")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("GameStore.Extension")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e3686e98-b47f-42f7-8db6-2cf476fbf652")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GameStore.Extension/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /GameStore.WebUI/Apis/AccountController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Web.Http; 7 | using System.Web.Mvc; 8 | 9 | namespace GameStore.WebUI.Apis 10 | { 11 | public class AccountController : BaseApiController 12 | { 13 | /* 14 | [HttpPost] 15 | [AllowAnonymous] 16 | [ValidateAntiForgeryToken] 17 | public async HttpResponseMessage Register(RegisterViewModel model) 18 | { 19 | if (ModelState.IsValid) 20 | { 21 | var user = new AppUser { UserName = model.Email, Email = model.Email }; 22 | var result = await UserManager.CreateAsync(user, model.Password); 23 | if (result.Succeeded) 24 | { 25 | var newUser = UserManager.FindByEmail(model.Email); 26 | var identity = await UserManager.CreateIdentityAsync(newUser, DefaultAuthenticationTypes.ApplicationCookie); 27 | AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = false }, identity); 28 | 29 | 30 | // For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=320771 31 | // Send an email with this link 32 | // string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id); 33 | // var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme); 34 | // await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking here"); 35 | 36 | return RedirectToAction("Index", "Home"); 37 | } 38 | else 39 | { 40 | return Request.CreateResponse(HttpStatusCode.OK, GetErrorMessage(result)); 41 | } 42 | } 43 | 44 | // If we got this far, something failed, redisplay form 45 | return View(model); 46 | }*/ 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /GameStore.WebUI/Apis/BaseApiController.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Identity; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Net.Http; 7 | using System.Web; 8 | using System.Web.Http; 9 | using Microsoft.AspNet.Identity.Owin; 10 | using Microsoft.AspNet.Identity; 11 | using Microsoft.Owin.Security; 12 | 13 | namespace GameStore.WebUI.Apis 14 | { 15 | public class BaseApiController : ApiController 16 | { 17 | protected AppUserManager UserManager 18 | { 19 | get 20 | { 21 | return HttpContext.Current.GetOwinContext().GetUserManager(); 22 | } 23 | } 24 | protected AppRoleManager RoleManager 25 | { 26 | get 27 | { 28 | return HttpContext.Current.GetOwinContext().GetUserManager(); 29 | } 30 | } 31 | 32 | protected IAuthenticationManager AuthenticationManager 33 | { 34 | get 35 | { 36 | return HttpContext.Current.GetOwinContext().Authentication; 37 | } 38 | } 39 | 40 | protected string GetErrorMessage(IdentityResult result) 41 | { 42 | string message = ""; 43 | foreach (string error in result.Errors) 44 | { 45 | message = String.Concat(error, Environment.NewLine); 46 | } 47 | 48 | return message; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /GameStore.WebUI/Apis/OrderController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | using System.Web.Http; 7 | using GameStore.Domain.Infrastructure; 8 | using GameStore.Domain.Model; 9 | using System.Net.Http; 10 | using System.Net; 11 | using GameStore.WebUI.Areas.Admin.Models.DTO; 12 | using GameStore.WebUI.Areas.Admin.Models; 13 | 14 | namespace GameStore.WebUI.Apis 15 | { 16 | [Authorize(Roles = "Admin")] 17 | public class OrderController : ApiController 18 | { 19 | // GET api/ 20 | public List Get() 21 | { 22 | List list = new List(); 23 | 24 | using (GameStoreDBContext context = new GameStoreDBContext()) 25 | { 26 | var orders = from o in context.Orders 27 | join u in context.Users 28 | on o.UserId equals u.Id 29 | orderby o.OrderId descending 30 | select new { o.OrderId, o.UserId, u.UserName, o.FullName, o.Address, o.City, o.State, o.Zip, o.ConfirmationNumber, o.DeliveryDate }; 31 | list = orders.Select(o => new OrderDTO { OrderId = o.OrderId, UserId = o.UserId, UserName = o.UserName, FullName = o.FullName, Address = o.Address, City = o.City, State = o.State, Zip = o.Zip, ConfirmationNumber = o.ConfirmationNumber, DeliveryDate = o.DeliveryDate }).ToList(); 32 | 33 | } 34 | 35 | return list; 36 | } 37 | [Route("api/Order/GetOrderItems/{id}")] 38 | public List GetOrderItems(int id) 39 | { 40 | List list = new List(); 41 | 42 | using (GameStoreDBContext context = new GameStoreDBContext()) 43 | { 44 | var orderitems = from i in context.OrderItems 45 | join p in context.Products 46 | on i.ProductId equals p.ProductId 47 | join c in context.Categories 48 | on p.CategoryId equals c.CategoryId 49 | where i.OrderId == id 50 | select new { i.OrderItemId, i.OrderId, i.ProductId, p.ProductName, p.CategoryId, c.CategoryName, p.Price, p.Image, p.Condition, p.Discount, i.Quantity }; 51 | list = orderitems.Select(o => new OrderItemDTO { OrderItemId = o.OrderItemId, OrderId = o.OrderId, ProductId = o.ProductId, ProductName = o.ProductName, CategoryId = o.CategoryId, CategoryName = o.CategoryName, Price = o.Price, Image = o.Image, Condition = o.Condition, Discount = o.Discount, Quantity = o.Quantity }).ToList(); 52 | } 53 | 54 | return list; 55 | } 56 | 57 | // GET: api/Order/GetCount/ 58 | [Route("api/Order/GetCount")] 59 | public int GetCount() 60 | { 61 | using (GameStoreDBContext context = new GameStoreDBContext()) 62 | { 63 | return context.Orders.Count(); 64 | } 65 | } 66 | 67 | public HttpResponseMessage Delete(int id) 68 | { 69 | using (GameStoreDBContext context = new GameStoreDBContext()) 70 | { 71 | var order = context.Orders.Find(id); 72 | if (order == null) 73 | { 74 | return Request.CreateResponse(HttpStatusCode.OK, "No such order [" + id + "]."); 75 | } 76 | context.Orders.Remove(order); 77 | context.SaveChanges(); 78 | return Request.CreateResponse(HttpStatusCode.OK, "Okay"); 79 | } 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /GameStore.WebUI/App_Data/gamestore.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/App_Data/gamestore.mdf -------------------------------------------------------------------------------- /GameStore.WebUI/App_Data/gamestore_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/App_Data/gamestore_log.ldf -------------------------------------------------------------------------------- /GameStore.WebUI/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Optimization; 6 | 7 | namespace GameStore.WebUI 8 | { 9 | public class BundleConfig 10 | { 11 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 12 | public static void RegisterBundles(BundleCollection bundles) 13 | { 14 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 15 | "~/Scripts/jquery-{version}.js", "~/Scripts/jquery.unobtrusive-ajax.js")); 16 | 17 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( 18 | "~/Scripts/jquery.validate*")); 19 | bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( 20 | "~/Scripts/jquery-ui-{version}.js", 21 | "~/Scripts/jquery.fancybox.js")); 22 | 23 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 24 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 25 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 26 | "~/Scripts/modernizr-*")); 27 | 28 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 29 | "~/Scripts/bootstrap.js", 30 | "~/Scripts/respond.js")); 31 | 32 | bundles.Add(new StyleBundle("~/Content/popup").Include( 33 | "~/Content/bootstrap.css", 34 | "~/Content/popup.css")); 35 | 36 | bundles.Add(new StyleBundle("~/Content/css").Include( 37 | "~/Content/bootstrap.css", 38 | "~/Content/site.css")); 39 | bundles.Add(new StyleBundle("~/Content/fancy").Include( 40 | "~/Content/jquery.fancybox.css")); 41 | 42 | bundles.Add(new StyleBundle("~/Content/themes/base/css").Include( 43 | "~/Content/themes/base/jquery.ui.core.css", 44 | "~/Content/themes/base/jquery.ui.resizable.css", 45 | "~/Content/themes/base/jquery.ui.selectable.css", 46 | "~/Content/themes/base/jquery.ui.accordion.css", 47 | "~/Content/themes/base/jquery.ui.autocomplete.css", 48 | "~/Content/themes/base/jquery.ui.button.css", 49 | "~/Content/themes/base/jquery.ui.dialog.css", 50 | "~/Content/themes/base/jquery.ui.slider.css", 51 | "~/Content/themes/base/jquery.ui.tabs.css", 52 | "~/Content/themes/base/jquery.ui.datepicker.css", 53 | "~/Content/themes/base/jquery.ui.progressbar.css", 54 | "~/Content/themes/base/jquery.ui.theme.css")); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /GameStore.WebUI/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace GameStore.WebUI 8 | { 9 | public class FilterConfig 10 | { 11 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 12 | { 13 | filters.Add(new HandleErrorAttribute()); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /GameStore.WebUI/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace GameStore.WebUI 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, 20 | namespaces: new[] { "GameStore.WebUI.Controllers" } 21 | ); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /GameStore.WebUI/App_Start/Startup.Auth.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Identity; 2 | using GameStore.Domain.Infrastructure; 3 | using Microsoft.AspNet.Identity; 4 | using Microsoft.AspNet.Identity.Owin; 5 | using Microsoft.Owin; 6 | using Microsoft.Owin.Security.Cookies; 7 | using Owin; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Web; 12 | 13 | namespace GameStore.WebUI 14 | { 15 | public partial class Startup 16 | { 17 | // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 18 | public void ConfigureAuth(IAppBuilder app) 19 | { 20 | // Configure the db context, user manager and signin manager to use a single instance per request 21 | app.CreatePerOwinContext(GameStoreDBContext.Create); 22 | app.CreatePerOwinContext(AppUserManager.Create); 23 | app.CreatePerOwinContext(AppRoleManager.Create); 24 | app.CreatePerOwinContext(AppSignInManager.Create); 25 | 26 | // Enable the application to use a cookie to store information for the signed in user 27 | // and to use a cookie to temporarily store information about a user logging in with a third party login provider 28 | // Configure the sign in cookie 29 | app.UseCookieAuthentication(new CookieAuthenticationOptions 30 | { 31 | AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, 32 | LoginPath = new PathString("/Account/Login"), 33 | Provider = new CookieAuthenticationProvider 34 | { 35 | // Enables the application to validate the security stamp when the user logs in. 36 | // This is a security feature which is used when you change a password or add an external login to your account. 37 | OnValidateIdentity = SecurityStampValidator.OnValidateIdentity( 38 | validateInterval: TimeSpan.FromMinutes(30), 39 | regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager)) 40 | } 41 | }); 42 | //app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); 43 | 44 | // Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process. 45 | // app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.TwoFactorCookie, TimeSpan.FromMinutes(5)); 46 | 47 | // Enables the application to remember the second login verification factor such as phone or email. 48 | // Once you check this option, your second step of verification during the login process will be remembered on the device where you logged in from. 49 | // This is similar to the RememberMe option when you log in. 50 | //app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie); 51 | 52 | // Uncomment the following lines to enable logging in with third party login providers 53 | //app.UseMicrosoftAccountAuthentication( 54 | // clientId: "", 55 | // clientSecret: ""); 56 | 57 | //app.UseTwitterAuthentication( 58 | // consumerKey: "", 59 | // consumerSecret: ""); 60 | 61 | //app.UseFacebookAuthentication( 62 | // appId: "", 63 | // appSecret: ""); 64 | 65 | //app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() 66 | //{ 67 | // ClientId = "", 68 | // ClientSecret = "" 69 | //}); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /GameStore.WebUI/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace GameStore.WebUI 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | // Web API configuration and services 13 | 14 | // Web API routes 15 | config.MapHttpAttributeRoutes(); 16 | 17 | //config.Routes.MapHttpRoute( 18 | // name: "Others", 19 | // routeTemplate: "api/{controller}/{action}/{id}", 20 | // defaults: new { id = RouteParameter.Optional } 21 | //); 22 | 23 | config.Routes.MapHttpRoute( 24 | name: "DefaultApi", 25 | routeTemplate: "api/{controller}/{id}", 26 | defaults: new { id = RouteParameter.Optional } 27 | ); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/AdminAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace GameStore.WebUI.Areas.Admin 4 | { 5 | public class AdminAreaRegistration : AreaRegistration 6 | { 7 | public override string AreaName 8 | { 9 | get 10 | { 11 | return "Admin"; 12 | } 13 | } 14 | 15 | public override void RegisterArea(AreaRegistrationContext context) 16 | { 17 | context.MapRoute( 18 | "Admin_default", 19 | "Admin/{controller}/{action}/{id}", 20 | new { action = "Index", id = UrlParameter.Optional }, 21 | namespaces: new[] { "GameStore.WebUI.Areas.Admin.Controllers" } 22 | ); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Controllers/AccountController.cs: -------------------------------------------------------------------------------- 1 | using GameStore.WebUI.Areas.Admin.Models; 2 | using GameStore.Domain.Infrastructure; 3 | using GameStore.Domain.Model; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Web; 8 | using System.Web.Mvc; 9 | using GameStore.Domain.Identity; 10 | using GameStore.WebUI.Controllers; 11 | using GameStore.WebUI.Areas.Admin.Models.DTO; 12 | 13 | namespace GameStore.WebUI.Areas.Admin.Controllers 14 | { 15 | [Authorize(Roles = "Admin")] 16 | public class AccountController : BaseController 17 | { 18 | // GET: User 19 | public ActionResult AppUser() 20 | { 21 | var roles = RoleManager.Roles.ToList(); 22 | List list = roles.Select(r => new RoleDTO { Id = r.Id, Name = r.Name, Description = r.Description }).ToList(); 23 | ViewBag.Roles = list; 24 | return View(); 25 | } 26 | public ActionResult AppRole() 27 | { 28 | return View(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Controllers/DashboardController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace GameStore.WebUI.Areas.Admin.Controllers 8 | { 9 | [Authorize(Roles = "Admin")] 10 | public class DashboardController : Controller 11 | { 12 | // GET: Admin/Dashboard 13 | public ActionResult Index() 14 | { 15 | return View(); 16 | } 17 | 18 | public ActionResult ClearCache() 19 | { 20 | var itemsInCache = System.Web.HttpContext.Current.Cache.GetEnumerator(); 21 | 22 | while (itemsInCache.MoveNext()) 23 | { 24 | System.Web.HttpContext.Current.Cache.Remove(itemsInCache.Key.ToString()); 25 | 26 | } 27 | return View("Index"); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Controllers/StoreController.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Infrastructure; 2 | using GameStore.Domain.Model; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Web; 7 | using System.Web.Mvc; 8 | 9 | namespace GameStore.WebUI.Areas.Admin.Controllers 10 | { 11 | [Authorize(Roles = "Admin")] 12 | public class StoreController : Controller 13 | { 14 | // GET: Product 15 | public ActionResult Product() 16 | { 17 | List list = new List(); 18 | using (GameStoreDBContext context = new GameStoreDBContext()) 19 | { 20 | list = context.Categories.ToList(); 21 | } 22 | 23 | ViewBag.Categories = list; 24 | List alllist = new List(list); 25 | alllist.Insert(0, new Category { CategoryId = 0, CategoryName = "Select All" }); 26 | ViewBag.CategoryFilter = alllist; 27 | return View(); 28 | } 29 | 30 | public ActionResult Category() 31 | { 32 | return View(); 33 | } 34 | 35 | public ActionResult Order() 36 | { 37 | return View(); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/CategoryViewModel.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Identity; 2 | using GameStore.Domain.Model; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.Linq; 7 | using System.Web; 8 | 9 | namespace GameStore.WebUI.Areas.Admin.Models 10 | { 11 | public class CategoryViewModel 12 | { 13 | public int CategoryId { get; set; } 14 | [Required] 15 | public String CategoryName { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/DTO/CategoryDTO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GameStore.WebUI.Areas.Admin.Models.DTO 7 | { 8 | public class CategoryDTO 9 | { 10 | public int CategoryId { get; set; } 11 | public string CategoryName { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/DTO/OrderDTO.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace GameStore.WebUI.Areas.Admin.Models.DTO 8 | { 9 | public class OrderDTO 10 | { 11 | public int OrderId { get; set; } 12 | public string UserId { get; set; } 13 | public string UserName { get; set; } 14 | public string FullName { get; set; } 15 | public string Address { get; set; } 16 | public string City { get; set; } 17 | public string State { get; set; } 18 | public string Zip { get; set; } 19 | public string ConfirmationNumber { get; set; } 20 | public DateTime DeliveryDate { get; set; } 21 | public List Items { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/DTO/OrderItemDTO.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace GameStore.WebUI.Areas.Admin.Models.DTO 8 | { 9 | public class OrderItemDTO 10 | { 11 | public int OrderItemId { get; set; } 12 | public int OrderId { get; set; } 13 | public int ProductId { get; set; } 14 | public string ProductName { get; set; } 15 | public int CategoryId { get; set; } 16 | public string CategoryName { get; set; } 17 | public double Price { get; set; } 18 | public string Image { get; set; } 19 | public string Condition { get; set; } 20 | public int Discount { get; set; } 21 | public int Quantity { get; set; } 22 | public double GetDiscountedPrice() 23 | { 24 | return Price * (100 - Discount) / 100; 25 | } 26 | public double GetTotalCost() 27 | { 28 | return Quantity * GetDiscountedPrice(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/DTO/ProductDTO.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace GameStore.WebUI.Areas.Admin.Models.DTO 9 | { 10 | public class ProductDTO : Product 11 | { 12 | public string CategoryName { get; set; } 13 | 14 | public double GetDiscountedPrice() 15 | { 16 | return Price * (100 - Discount) / 100; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/DTO/ProductOrderDTO.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace GameStore.WebUI.Areas.Admin.Models.DTO 9 | { 10 | public class ProductOrderDTO : Product 11 | { 12 | public string CategoryName { get; set; } 13 | 14 | public double GetDiscountedPrice() 15 | { 16 | return Price * (100 - Discount) / 100; 17 | } 18 | 19 | public IEnumerable Orders { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/DTO/RoleDTO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GameStore.WebUI.Areas.Admin.Models.DTO 7 | { 8 | public class RoleDTO 9 | { 10 | public String Id { get; set; } 11 | public String Name { get; set; } 12 | public String Description { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/DTO/UserDTO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GameStore.WebUI.Areas.Admin.Models.DTO 7 | { 8 | public class UserDTO 9 | { 10 | public String Id { get; set; } 11 | public String Email { get; set; } 12 | public String UserName { get; set; } 13 | public String Membership { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/ProductViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace GameStore.WebUI.Areas.Admin.Models 8 | { 9 | public class ProductViewModel 10 | { 11 | public int ProductId { get; set; } 12 | [Display(Name = "Product Name")] 13 | [Required] 14 | public string ProductName { get; set; } 15 | [Display(Name = "Category")] 16 | public int CategoryId { get; set; } 17 | [Required] 18 | public double Price { get; set; } 19 | [Required] 20 | public string Image { get; set; } 21 | [Required] 22 | public string Condition { get; set; } 23 | [Required] 24 | public int Discount { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/RoleViewModel.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Identity; 2 | using GameStore.Domain.Model; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.Linq; 7 | using System.Web; 8 | 9 | namespace GameStore.WebUI.Areas.Admin.Models 10 | { 11 | public class RoleViewModel 12 | { 13 | public String Id { get; set; } 14 | [Required] 15 | public String Name { get; set; } 16 | [Required] 17 | public String Description { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Models/UserViewModel.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Identity; 2 | using GameStore.Domain.Model; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.Linq; 7 | using System.Web; 8 | 9 | namespace GameStore.WebUI.Areas.Admin.Models 10 | { 11 | public class UserViewModel 12 | { 13 | public string Id { get; set; } 14 | [Required] 15 | [EmailAddress] 16 | [Display(Name = "Email")] 17 | public string Email { get; set; } 18 | 19 | [Required] 20 | [Display(Name = "User Name")] 21 | public string UserName { get; set; } 22 | 23 | [Required] 24 | [Display(Name = "Membership")] 25 | public string Membership { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Views/Dashboard/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Admin: Dashboard"; 3 | } 4 | 5 |

Game Store Management

6 |
7 |
8 |
    9 |
  • Statistics
  • 10 |
  • 0@Html.ActionLink("Users", "AppUser", "Account", new { area = "Admin" }, new { @class = "btn btn-primary" })
  • 11 |
  • 0@Html.ActionLink("Roles", "AppRole", "Account", new { area = "Admin" }, new { @class = "btn btn-primary" })
  • 12 |
  • 0@Html.ActionLink("Products", "Product", "Store", new { area = "Admin" }, new { @class = "btn btn-primary" })
  • 13 |
  • 0@Html.ActionLink("Categories", "Category", "Store", new { area = "Admin" }, new { @class = "btn btn-primary" })
  • 14 |
  • 0@Html.ActionLink("Orders", "Order", "Store", new { area = "Admin" }, new { @class = "btn btn-primary" })
  • 15 |
16 |
17 |
18 |
    19 |
  • System
  • 20 |
  • @Html.ActionLink("Clear Cache", "ClearCache", "Dashboard", new { area = "Admin" }, new { @class = "btn btn-primary"})
  • 21 |
22 |
23 |
24 |
25 | @section Scripts 26 | { 27 | 101 | } 102 | -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Views/Store/Order.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Order List"; 3 | } 4 | 5 |

@ViewBag.Title

6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
Order IdUser NameAddressConfirmation NumberDelivery DateOperations
20 | 21 | 22 | 52 | 53 | @section Scripts 54 | { 55 | 115 | } 116 | 117 | -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Areas/Admin/Views/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | 19 | h5 { 20 | color:#ff4d4d; 21 | } 22 | 23 | .clear { 24 | clear: both; 25 | } 26 | 27 | .header_cart{ 28 | margin-top:20px; 29 | } 30 | 31 | 32 | /* 33 | .header_search{ 34 | margin-top:15px; 35 | } 36 | .header_search form{ 37 | width:100%; 38 | } 39 | */ 40 | 41 | .header_search{ 42 | position: relative; 43 | background: #f3f4f5; 44 | border: 1px solid #D8D8D8; 45 | margin-top:20px; 46 | width:90%; 47 | } 48 | .header_search form{ 49 | width:100%; 50 | } 51 | 52 | .header_search input[type="text"]{ 53 | margin:0px 0; 54 | font-family: 'Open Sans', sans-serif; 55 | padding:8px 16px; 56 | outline: none; 57 | color: #5a5a5a; 58 | background: none; 59 | border: none; 60 | width:95.33333%; 61 | line-height: 1.5em; 62 | position: relative; 63 | font-size: 0.8725em; 64 | -webkit-appearance: none; 65 | text-transform: capitalize; 66 | } 67 | 68 | .header_search input[type="text"]{ 69 | background: #ffffff; 70 | } 71 | 72 | .header_search input[type="submit"]{ 73 | background: url('../images/search.png') no-repeat 0px 1px; 74 | border: none; 75 | cursor: pointer; 76 | width: 24px; 77 | outline: none; 78 | position: absolute; 79 | height: 24px; 80 | top: 6px; 81 | right: 5px; 82 | } 83 | 84 | .productitem img { 85 | width: 180px; 86 | height: 180px; 87 | -webkit-transition-duration: 0.5s; 88 | /* Webkit: Animation duration; */ 89 | -moz-transition-duration: 0.5s; 90 | -o-transition-duration: 0.5s; 91 | width:100%; 92 | } 93 | .special_grid_col{ 94 | float: left; 95 | width: 25%; 96 | padding: 0.5em; 97 | text-align:center; 98 | } 99 | .special_grid_col:hover .special_box{ 100 | /*border: 1px solid #f54d56;*/ 101 | transition: 1s all ease; 102 | -webkit-transition: 0.5s all ease; 103 | -moz-transition: 0.5s all ease; 104 | -o-transition: 0.5s all ease; 105 | -ms-transition: 0.5s all ease; 106 | } 107 | .special_grid_col:hover .special_box img{ 108 | -webkit-transform: scale(0.9); 109 | /* Webkit: Scale up image to 1.2x original size; */ 110 | -moz-transform: scale(0.9); 111 | -o-transform: scale(0.9); 112 | opacity: 1; 113 | } 114 | 115 | .special_item_price { 116 | padding-bottom: 20px; 117 | } 118 | 119 | .special_item_price .price-new { 120 | color: #ff6978; 121 | margin-right: 15px; 122 | font-weight: 500; 123 | font-size: 1.2em; 124 | } 125 | .special_item_price .price-old { 126 | text-decoration: line-through; 127 | color: green; 128 | font-weight: normal; 129 | font-size: 1.2em; 130 | margin-right: 10px; 131 | } 132 | 133 | .order { 134 | border: 1px solid #ffa64d; 135 | padding: 10px; 136 | margin-bottom:5px; 137 | } 138 | 139 | .header_cart a { 140 | text-decoration:none; 141 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Content/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/fancybox/blank.gif -------------------------------------------------------------------------------- /GameStore.WebUI/Content/fancybox/fancybox_buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/fancybox/fancybox_buttons.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /GameStore.WebUI/Content/fancybox/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/fancybox/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /GameStore.WebUI/Content/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/fancybox/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/fancybox/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/jquery.fancybox-buttons.css: -------------------------------------------------------------------------------- 1 | #fancybox-buttons { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | z-index: 8050; 6 | } 7 | 8 | #fancybox-buttons.top { 9 | top: 10px; 10 | } 11 | 12 | #fancybox-buttons.bottom { 13 | bottom: 10px; 14 | } 15 | 16 | #fancybox-buttons ul { 17 | display: block; 18 | width: 166px; 19 | height: 30px; 20 | margin: 0 auto; 21 | padding: 0; 22 | list-style: none; 23 | border: 1px solid #111; 24 | border-radius: 3px; 25 | -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 26 | -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 27 | box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 28 | background: rgb(50,50,50); 29 | background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); 30 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); 31 | background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 32 | background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 33 | background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 34 | background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 35 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); 36 | } 37 | 38 | #fancybox-buttons ul li { 39 | float: left; 40 | margin: 0; 41 | padding: 0; 42 | } 43 | 44 | #fancybox-buttons a { 45 | display: block; 46 | width: 30px; 47 | height: 30px; 48 | text-indent: -9999px; 49 | background-color: transparent; 50 | background-image: url('fancybox/fancybox_buttons.png'); 51 | background-repeat: no-repeat; 52 | outline: none; 53 | opacity: 0.8; 54 | padding-left: 0; 55 | padding-right: 0; 56 | } 57 | 58 | #fancybox-buttons a:hover { 59 | opacity: 1; 60 | } 61 | 62 | #fancybox-buttons a.btnPrev { 63 | background-position: 5px 0; 64 | } 65 | 66 | #fancybox-buttons a.btnNext { 67 | background-position: -33px 0; 68 | border-right: 1px solid #3e3e3e; 69 | } 70 | 71 | #fancybox-buttons a.btnPlay { 72 | background-position: 0 -30px; 73 | } 74 | 75 | #fancybox-buttons a.btnPlayOn { 76 | background-position: -30px -30px; 77 | } 78 | 79 | #fancybox-buttons a.btnToggle { 80 | background-position: 3px -60px; 81 | border-left: 1px solid #111; 82 | border-right: 1px solid #3e3e3e; 83 | width: 35px 84 | } 85 | 86 | #fancybox-buttons a.btnToggleOn { 87 | background-position: -27px -60px; 88 | } 89 | 90 | #fancybox-buttons a.btnClose { 91 | border-left: 1px solid #111; 92 | width: 35px; 93 | background-position: -56px 0px; 94 | } 95 | 96 | #fancybox-buttons a.btnDisabled { 97 | opacity : 0.4; 98 | cursor: default; 99 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Content/jquery.fancybox-thumbs.css: -------------------------------------------------------------------------------- 1 | #fancybox-thumbs { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | overflow: hidden; 6 | z-index: 8050; 7 | } 8 | 9 | #fancybox-thumbs.bottom { 10 | bottom: 2px; 11 | } 12 | 13 | #fancybox-thumbs.top { 14 | top: 2px; 15 | } 16 | 17 | #fancybox-thumbs ul { 18 | position: relative; 19 | list-style: none; 20 | margin: 0; 21 | padding: 0; 22 | } 23 | 24 | #fancybox-thumbs ul li { 25 | float: left; 26 | padding: 1px; 27 | opacity: 0.5; 28 | } 29 | 30 | #fancybox-thumbs ul li.active { 31 | opacity: 0.75; 32 | padding: 0; 33 | border: 1px solid #fff; 34 | } 35 | 36 | #fancybox-thumbs ul li:hover { 37 | opacity: 1; 38 | } 39 | 40 | #fancybox-thumbs ul li a { 41 | display: block; 42 | position: relative; 43 | overflow: hidden; 44 | border: 1px solid #222; 45 | background: #111; 46 | outline: none; 47 | } 48 | 49 | #fancybox-thumbs ul li img { 50 | display: block; 51 | position: relative; 52 | border: 0; 53 | padding: 0; 54 | max-width: none; 55 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Content/popup.css: -------------------------------------------------------------------------------- 1 | /*body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | }*/ 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | /* max-width: 280px;*/ 17 | } 18 | 19 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/accordion/#theming 10 | */ 11 | .ui-accordion .ui-accordion-header { 12 | display: block; 13 | cursor: pointer; 14 | position: relative; 15 | margin: 2px 0 0 0; 16 | padding: .5em .5em .5em .7em; 17 | min-height: 0; /* support: IE7 */ 18 | font-size: 100%; 19 | } 20 | .ui-accordion .ui-accordion-icons { 21 | padding-left: 2.2em; 22 | } 23 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 24 | padding-left: 2.2em; 25 | } 26 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 27 | position: absolute; 28 | left: .5em; 29 | top: 50%; 30 | margin-top: -8px; 31 | } 32 | .ui-accordion .ui-accordion-content { 33 | padding: 1em 2.2em; 34 | border-top: 0; 35 | overflow: auto; 36 | } 37 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import "base.css"; 12 | @import "theme.css"; 13 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/autocomplete/#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import url("core.css"); 12 | 13 | @import url("accordion.css"); 14 | @import url("autocomplete.css"); 15 | @import url("button.css"); 16 | @import url("datepicker.css"); 17 | @import url("dialog.css"); 18 | @import url("draggable.css"); 19 | @import url("menu.css"); 20 | @import url("progressbar.css"); 21 | @import url("resizable.css"); 22 | @import url("selectable.css"); 23 | @import url("selectmenu.css"); 24 | @import url("sortable.css"); 25 | @import url("slider.css"); 26 | @import url("spinner.css"); 27 | @import url("tabs.css"); 28 | @import url("tooltip.css"); 29 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/button.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Button 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/button/#theming 10 | */ 11 | .ui-button { 12 | display: inline-block; 13 | position: relative; 14 | padding: 0; 15 | line-height: normal; 16 | margin-right: .1em; 17 | cursor: pointer; 18 | vertical-align: middle; 19 | text-align: center; 20 | overflow: visible; /* removes extra width in IE */ 21 | } 22 | .ui-button, 23 | .ui-button:link, 24 | .ui-button:visited, 25 | .ui-button:hover, 26 | .ui-button:active { 27 | text-decoration: none; 28 | } 29 | /* to make room for the icon, a width needs to be set here */ 30 | .ui-button-icon-only { 31 | width: 2.2em; 32 | } 33 | /* button elements seem to need a little more width */ 34 | button.ui-button-icon-only { 35 | width: 2.4em; 36 | } 37 | .ui-button-icons-only { 38 | width: 3.4em; 39 | } 40 | button.ui-button-icons-only { 41 | width: 3.7em; 42 | } 43 | 44 | /* button text element */ 45 | .ui-button .ui-button-text { 46 | display: block; 47 | line-height: normal; 48 | } 49 | .ui-button-text-only .ui-button-text { 50 | padding: .4em 1em; 51 | } 52 | .ui-button-icon-only .ui-button-text, 53 | .ui-button-icons-only .ui-button-text { 54 | padding: .4em; 55 | text-indent: -9999999px; 56 | } 57 | .ui-button-text-icon-primary .ui-button-text, 58 | .ui-button-text-icons .ui-button-text { 59 | padding: .4em 1em .4em 2.1em; 60 | } 61 | .ui-button-text-icon-secondary .ui-button-text, 62 | .ui-button-text-icons .ui-button-text { 63 | padding: .4em 2.1em .4em 1em; 64 | } 65 | .ui-button-text-icons .ui-button-text { 66 | padding-left: 2.1em; 67 | padding-right: 2.1em; 68 | } 69 | /* no icon support for input elements, provide padding by default */ 70 | input.ui-button { 71 | padding: .4em 1em; 72 | } 73 | 74 | /* button icon element(s) */ 75 | .ui-button-icon-only .ui-icon, 76 | .ui-button-text-icon-primary .ui-icon, 77 | .ui-button-text-icon-secondary .ui-icon, 78 | .ui-button-text-icons .ui-icon, 79 | .ui-button-icons-only .ui-icon { 80 | position: absolute; 81 | top: 50%; 82 | margin-top: -8px; 83 | } 84 | .ui-button-icon-only .ui-icon { 85 | left: 50%; 86 | margin-left: -8px; 87 | } 88 | .ui-button-text-icon-primary .ui-button-icon-primary, 89 | .ui-button-text-icons .ui-button-icon-primary, 90 | .ui-button-icons-only .ui-button-icon-primary { 91 | left: .5em; 92 | } 93 | .ui-button-text-icon-secondary .ui-button-icon-secondary, 94 | .ui-button-text-icons .ui-button-icon-secondary, 95 | .ui-button-icons-only .ui-button-icon-secondary { 96 | right: .5em; 97 | } 98 | 99 | /* button sets */ 100 | .ui-buttonset { 101 | margin-right: 7px; 102 | } 103 | .ui-buttonset .ui-button { 104 | margin-left: 0; 105 | margin-right: -.3em; 106 | } 107 | 108 | /* workarounds */ 109 | /* reset extra padding in Firefox, see h5bp.com/l */ 110 | input.ui-button::-moz-focus-inner, 111 | button.ui-button::-moz-focus-inner { 112 | border: 0; 113 | padding: 0; 114 | } 115 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | 12 | /* Layout helpers 13 | ----------------------------------*/ 14 | .ui-helper-hidden { 15 | display: none; 16 | } 17 | .ui-helper-hidden-accessible { 18 | border: 0; 19 | clip: rect(0 0 0 0); 20 | height: 1px; 21 | margin: -1px; 22 | overflow: hidden; 23 | padding: 0; 24 | position: absolute; 25 | width: 1px; 26 | } 27 | .ui-helper-reset { 28 | margin: 0; 29 | padding: 0; 30 | border: 0; 31 | outline: 0; 32 | line-height: 1.3; 33 | text-decoration: none; 34 | font-size: 100%; 35 | list-style: none; 36 | } 37 | .ui-helper-clearfix:before, 38 | .ui-helper-clearfix:after { 39 | content: ""; 40 | display: table; 41 | border-collapse: collapse; 42 | } 43 | .ui-helper-clearfix:after { 44 | clear: both; 45 | } 46 | .ui-helper-clearfix { 47 | min-height: 0; /* support: IE7 */ 48 | } 49 | .ui-helper-zfix { 50 | width: 100%; 51 | height: 100%; 52 | top: 0; 53 | left: 0; 54 | position: absolute; 55 | opacity: 0; 56 | filter:Alpha(Opacity=0); /* support: IE8 */ 57 | } 58 | 59 | .ui-front { 60 | z-index: 100; 61 | } 62 | 63 | 64 | /* Interaction Cues 65 | ----------------------------------*/ 66 | .ui-state-disabled { 67 | cursor: default !important; 68 | } 69 | 70 | 71 | /* Icons 72 | ----------------------------------*/ 73 | 74 | /* states and images */ 75 | .ui-icon { 76 | display: block; 77 | text-indent: -99999px; 78 | overflow: hidden; 79 | background-repeat: no-repeat; 80 | } 81 | 82 | 83 | /* Misc visuals 84 | ----------------------------------*/ 85 | 86 | /* Overlays */ 87 | .ui-widget-overlay { 88 | position: fixed; 89 | top: 0; 90 | left: 0; 91 | width: 100%; 92 | height: 100%; 93 | } 94 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/datepicker.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Datepicker 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/datepicker/#theming 10 | */ 11 | .ui-datepicker { 12 | width: 17em; 13 | padding: .2em .2em 0; 14 | display: none; 15 | } 16 | .ui-datepicker .ui-datepicker-header { 17 | position: relative; 18 | padding: .2em 0; 19 | } 20 | .ui-datepicker .ui-datepicker-prev, 21 | .ui-datepicker .ui-datepicker-next { 22 | position: absolute; 23 | top: 2px; 24 | width: 1.8em; 25 | height: 1.8em; 26 | } 27 | .ui-datepicker .ui-datepicker-prev-hover, 28 | .ui-datepicker .ui-datepicker-next-hover { 29 | top: 1px; 30 | } 31 | .ui-datepicker .ui-datepicker-prev { 32 | left: 2px; 33 | } 34 | .ui-datepicker .ui-datepicker-next { 35 | right: 2px; 36 | } 37 | .ui-datepicker .ui-datepicker-prev-hover { 38 | left: 1px; 39 | } 40 | .ui-datepicker .ui-datepicker-next-hover { 41 | right: 1px; 42 | } 43 | .ui-datepicker .ui-datepicker-prev span, 44 | .ui-datepicker .ui-datepicker-next span { 45 | display: block; 46 | position: absolute; 47 | left: 50%; 48 | margin-left: -8px; 49 | top: 50%; 50 | margin-top: -8px; 51 | } 52 | .ui-datepicker .ui-datepicker-title { 53 | margin: 0 2.3em; 54 | line-height: 1.8em; 55 | text-align: center; 56 | } 57 | .ui-datepicker .ui-datepicker-title select { 58 | font-size: 1em; 59 | margin: 1px 0; 60 | } 61 | .ui-datepicker select.ui-datepicker-month, 62 | .ui-datepicker select.ui-datepicker-year { 63 | width: 45%; 64 | } 65 | .ui-datepicker table { 66 | width: 100%; 67 | font-size: .9em; 68 | border-collapse: collapse; 69 | margin: 0 0 .4em; 70 | } 71 | .ui-datepicker th { 72 | padding: .7em .3em; 73 | text-align: center; 74 | font-weight: bold; 75 | border: 0; 76 | } 77 | .ui-datepicker td { 78 | border: 0; 79 | padding: 1px; 80 | } 81 | .ui-datepicker td span, 82 | .ui-datepicker td a { 83 | display: block; 84 | padding: .2em; 85 | text-align: right; 86 | text-decoration: none; 87 | } 88 | .ui-datepicker .ui-datepicker-buttonpane { 89 | background-image: none; 90 | margin: .7em 0 0 0; 91 | padding: 0 .2em; 92 | border-left: 0; 93 | border-right: 0; 94 | border-bottom: 0; 95 | } 96 | .ui-datepicker .ui-datepicker-buttonpane button { 97 | float: right; 98 | margin: .5em .2em .4em; 99 | cursor: pointer; 100 | padding: .2em .6em .3em .6em; 101 | width: auto; 102 | overflow: visible; 103 | } 104 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { 105 | float: left; 106 | } 107 | 108 | /* with multiple calendars */ 109 | .ui-datepicker.ui-datepicker-multi { 110 | width: auto; 111 | } 112 | .ui-datepicker-multi .ui-datepicker-group { 113 | float: left; 114 | } 115 | .ui-datepicker-multi .ui-datepicker-group table { 116 | width: 95%; 117 | margin: 0 auto .4em; 118 | } 119 | .ui-datepicker-multi-2 .ui-datepicker-group { 120 | width: 50%; 121 | } 122 | .ui-datepicker-multi-3 .ui-datepicker-group { 123 | width: 33.3%; 124 | } 125 | .ui-datepicker-multi-4 .ui-datepicker-group { 126 | width: 25%; 127 | } 128 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, 129 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { 130 | border-left-width: 0; 131 | } 132 | .ui-datepicker-multi .ui-datepicker-buttonpane { 133 | clear: left; 134 | } 135 | .ui-datepicker-row-break { 136 | clear: both; 137 | width: 100%; 138 | font-size: 0; 139 | } 140 | 141 | /* RTL support */ 142 | .ui-datepicker-rtl { 143 | direction: rtl; 144 | } 145 | .ui-datepicker-rtl .ui-datepicker-prev { 146 | right: 2px; 147 | left: auto; 148 | } 149 | .ui-datepicker-rtl .ui-datepicker-next { 150 | left: 2px; 151 | right: auto; 152 | } 153 | .ui-datepicker-rtl .ui-datepicker-prev:hover { 154 | right: 1px; 155 | left: auto; 156 | } 157 | .ui-datepicker-rtl .ui-datepicker-next:hover { 158 | left: 1px; 159 | right: auto; 160 | } 161 | .ui-datepicker-rtl .ui-datepicker-buttonpane { 162 | clear: right; 163 | } 164 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { 165 | float: left; 166 | } 167 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, 168 | .ui-datepicker-rtl .ui-datepicker-group { 169 | float: right; 170 | } 171 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, 172 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { 173 | border-right-width: 0; 174 | border-left-width: 1px; 175 | } 176 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/dialog.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Dialog 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/dialog/#theming 10 | */ 11 | .ui-dialog { 12 | overflow: hidden; 13 | position: absolute; 14 | top: 0; 15 | left: 0; 16 | padding: .2em; 17 | outline: 0; 18 | } 19 | .ui-dialog .ui-dialog-titlebar { 20 | padding: .4em 1em; 21 | position: relative; 22 | } 23 | .ui-dialog .ui-dialog-title { 24 | float: left; 25 | margin: .1em 0; 26 | white-space: nowrap; 27 | width: 90%; 28 | overflow: hidden; 29 | text-overflow: ellipsis; 30 | } 31 | .ui-dialog .ui-dialog-titlebar-close { 32 | position: absolute; 33 | right: .3em; 34 | top: 50%; 35 | width: 20px; 36 | margin: -10px 0 0 0; 37 | padding: 1px; 38 | height: 20px; 39 | } 40 | .ui-dialog .ui-dialog-content { 41 | position: relative; 42 | border: 0; 43 | padding: .5em 1em; 44 | background: none; 45 | overflow: auto; 46 | } 47 | .ui-dialog .ui-dialog-buttonpane { 48 | text-align: left; 49 | border-width: 1px 0 0 0; 50 | background-image: none; 51 | margin-top: .5em; 52 | padding: .3em 1em .5em .4em; 53 | } 54 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 55 | float: right; 56 | } 57 | .ui-dialog .ui-dialog-buttonpane button { 58 | margin: .5em .4em .5em 0; 59 | cursor: pointer; 60 | } 61 | .ui-dialog .ui-resizable-se { 62 | width: 12px; 63 | height: 12px; 64 | right: -5px; 65 | bottom: -5px; 66 | background-position: 16px 16px; 67 | } 68 | .ui-draggable .ui-dialog-titlebar { 69 | cursor: move; 70 | } 71 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/draggable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Draggable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-draggable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/menu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Menu 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/menu/#theming 10 | */ 11 | .ui-menu { 12 | list-style: none; 13 | padding: 0; 14 | margin: 0; 15 | display: block; 16 | outline: none; 17 | } 18 | .ui-menu .ui-menu { 19 | position: absolute; 20 | } 21 | .ui-menu .ui-menu-item { 22 | position: relative; 23 | margin: 0; 24 | padding: 3px 1em 3px .4em; 25 | cursor: pointer; 26 | min-height: 0; /* support: IE7 */ 27 | /* support: IE10, see #8844 */ 28 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); 29 | } 30 | .ui-menu .ui-menu-divider { 31 | margin: 5px 0; 32 | height: 0; 33 | font-size: 0; 34 | line-height: 0; 35 | border-width: 1px 0 0 0; 36 | } 37 | .ui-menu .ui-state-focus, 38 | .ui-menu .ui-state-active { 39 | margin: -1px; 40 | } 41 | 42 | /* icon support */ 43 | .ui-menu-icons { 44 | position: relative; 45 | } 46 | .ui-menu-icons .ui-menu-item { 47 | padding-left: 2em; 48 | } 49 | 50 | /* left-aligned */ 51 | .ui-menu .ui-icon { 52 | position: absolute; 53 | top: 0; 54 | bottom: 0; 55 | left: .2em; 56 | margin: auto 0; 57 | } 58 | 59 | /* right-aligned */ 60 | .ui-menu .ui-menu-icon { 61 | left: auto; 62 | right: 0; 63 | } 64 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/progressbar.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Progressbar 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/progressbar/#theming 10 | */ 11 | .ui-progressbar { 12 | height: 2em; 13 | text-align: left; 14 | overflow: hidden; 15 | } 16 | .ui-progressbar .ui-progressbar-value { 17 | margin: -1px; 18 | height: 100%; 19 | } 20 | .ui-progressbar .ui-progressbar-overlay { 21 | background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); 22 | height: 100%; 23 | filter: alpha(opacity=25); /* support: IE8 */ 24 | opacity: 0.25; 25 | } 26 | .ui-progressbar-indeterminate .ui-progressbar-value { 27 | background-image: none; 28 | } 29 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-resizable { 10 | position: relative; 11 | } 12 | .ui-resizable-handle { 13 | position: absolute; 14 | font-size: 0.1px; 15 | display: block; 16 | -ms-touch-action: none; 17 | touch-action: none; 18 | } 19 | .ui-resizable-disabled .ui-resizable-handle, 20 | .ui-resizable-autohide .ui-resizable-handle { 21 | display: none; 22 | } 23 | .ui-resizable-n { 24 | cursor: n-resize; 25 | height: 7px; 26 | width: 100%; 27 | top: -5px; 28 | left: 0; 29 | } 30 | .ui-resizable-s { 31 | cursor: s-resize; 32 | height: 7px; 33 | width: 100%; 34 | bottom: -5px; 35 | left: 0; 36 | } 37 | .ui-resizable-e { 38 | cursor: e-resize; 39 | width: 7px; 40 | right: -5px; 41 | top: 0; 42 | height: 100%; 43 | } 44 | .ui-resizable-w { 45 | cursor: w-resize; 46 | width: 7px; 47 | left: -5px; 48 | top: 0; 49 | height: 100%; 50 | } 51 | .ui-resizable-se { 52 | cursor: se-resize; 53 | width: 12px; 54 | height: 12px; 55 | right: 1px; 56 | bottom: 1px; 57 | } 58 | .ui-resizable-sw { 59 | cursor: sw-resize; 60 | width: 9px; 61 | height: 9px; 62 | left: -5px; 63 | bottom: -5px; 64 | } 65 | .ui-resizable-nw { 66 | cursor: nw-resize; 67 | width: 9px; 68 | height: 9px; 69 | left: -5px; 70 | top: -5px; 71 | } 72 | .ui-resizable-ne { 73 | cursor: ne-resize; 74 | width: 9px; 75 | height: 9px; 76 | right: -5px; 77 | top: -5px; 78 | } 79 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-selectable { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | .ui-selectable-helper { 14 | position: absolute; 15 | z-index: 100; 16 | border: 1px dotted black; 17 | } 18 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/selectmenu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectmenu 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/selectmenu/#theming 10 | */ 11 | .ui-selectmenu-menu { 12 | padding: 0; 13 | margin: 0; 14 | position: absolute; 15 | top: 0; 16 | left: 0; 17 | display: none; 18 | } 19 | .ui-selectmenu-menu .ui-menu { 20 | overflow: auto; 21 | /* Support: IE7 */ 22 | overflow-x: hidden; 23 | padding-bottom: 1px; 24 | } 25 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { 26 | font-size: 1em; 27 | font-weight: bold; 28 | line-height: 1.5; 29 | padding: 2px 0.4em; 30 | margin: 0.5em 0 0 0; 31 | height: auto; 32 | border: 0; 33 | } 34 | .ui-selectmenu-open { 35 | display: block; 36 | } 37 | .ui-selectmenu-button { 38 | display: inline-block; 39 | overflow: hidden; 40 | position: relative; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | .ui-selectmenu-button span.ui-icon { 45 | right: 0.5em; 46 | left: auto; 47 | margin-top: -8px; 48 | position: absolute; 49 | top: 50%; 50 | } 51 | .ui-selectmenu-button span.ui-selectmenu-text { 52 | text-align: left; 53 | padding: 0.4em 2.1em 0.4em 1em; 54 | display: block; 55 | line-height: 1.4; 56 | overflow: hidden; 57 | text-overflow: ellipsis; 58 | white-space: nowrap; 59 | } 60 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/slider.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Slider 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/slider/#theming 10 | */ 11 | .ui-slider { 12 | position: relative; 13 | text-align: left; 14 | } 15 | .ui-slider .ui-slider-handle { 16 | position: absolute; 17 | z-index: 2; 18 | width: 1.2em; 19 | height: 1.2em; 20 | cursor: default; 21 | -ms-touch-action: none; 22 | touch-action: none; 23 | } 24 | .ui-slider .ui-slider-range { 25 | position: absolute; 26 | z-index: 1; 27 | font-size: .7em; 28 | display: block; 29 | border: 0; 30 | background-position: 0 0; 31 | } 32 | 33 | /* support: IE8 - See #6727 */ 34 | .ui-slider.ui-state-disabled .ui-slider-handle, 35 | .ui-slider.ui-state-disabled .ui-slider-range { 36 | filter: inherit; 37 | } 38 | 39 | .ui-slider-horizontal { 40 | height: .8em; 41 | } 42 | .ui-slider-horizontal .ui-slider-handle { 43 | top: -.3em; 44 | margin-left: -.6em; 45 | } 46 | .ui-slider-horizontal .ui-slider-range { 47 | top: 0; 48 | height: 100%; 49 | } 50 | .ui-slider-horizontal .ui-slider-range-min { 51 | left: 0; 52 | } 53 | .ui-slider-horizontal .ui-slider-range-max { 54 | right: 0; 55 | } 56 | 57 | .ui-slider-vertical { 58 | width: .8em; 59 | height: 100px; 60 | } 61 | .ui-slider-vertical .ui-slider-handle { 62 | left: -.3em; 63 | margin-left: 0; 64 | margin-bottom: -.6em; 65 | } 66 | .ui-slider-vertical .ui-slider-range { 67 | left: 0; 68 | width: 100%; 69 | } 70 | .ui-slider-vertical .ui-slider-range-min { 71 | bottom: 0; 72 | } 73 | .ui-slider-vertical .ui-slider-range-max { 74 | top: 0; 75 | } 76 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/sortable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Sortable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-sortable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/spinner.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Spinner 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/spinner/#theming 10 | */ 11 | .ui-spinner { 12 | position: relative; 13 | display: inline-block; 14 | overflow: hidden; 15 | padding: 0; 16 | vertical-align: middle; 17 | } 18 | .ui-spinner-input { 19 | border: none; 20 | background: none; 21 | color: inherit; 22 | padding: 0; 23 | margin: .2em 0; 24 | vertical-align: middle; 25 | margin-left: .4em; 26 | margin-right: 22px; 27 | } 28 | .ui-spinner-button { 29 | width: 16px; 30 | height: 50%; 31 | font-size: .5em; 32 | padding: 0; 33 | margin: 0; 34 | text-align: center; 35 | position: absolute; 36 | cursor: default; 37 | display: block; 38 | overflow: hidden; 39 | right: 0; 40 | } 41 | /* more specificity required here to override default borders */ 42 | .ui-spinner a.ui-spinner-button { 43 | border-top: none; 44 | border-bottom: none; 45 | border-right: none; 46 | } 47 | /* vertically center icon */ 48 | .ui-spinner .ui-icon { 49 | position: absolute; 50 | margin-top: -8px; 51 | top: 50%; 52 | left: 0; 53 | } 54 | .ui-spinner-up { 55 | top: 0; 56 | } 57 | .ui-spinner-down { 58 | bottom: 0; 59 | } 60 | 61 | /* TR overrides */ 62 | .ui-spinner .ui-icon-triangle-1-s { 63 | /* need to fix icons sprite */ 64 | background-position: -65px -16px; 65 | } 66 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/tabs.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tabs 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tabs/#theming 10 | */ 11 | .ui-tabs { 12 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 13 | padding: .2em; 14 | } 15 | .ui-tabs .ui-tabs-nav { 16 | margin: 0; 17 | padding: .2em .2em 0; 18 | } 19 | .ui-tabs .ui-tabs-nav li { 20 | list-style: none; 21 | float: left; 22 | position: relative; 23 | top: 0; 24 | margin: 1px .2em 0 0; 25 | border-bottom-width: 0; 26 | padding: 0; 27 | white-space: nowrap; 28 | } 29 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor { 30 | float: left; 31 | padding: .5em 1em; 32 | text-decoration: none; 33 | } 34 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { 35 | margin-bottom: -1px; 36 | padding-bottom: 1px; 37 | } 38 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, 39 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, 40 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { 41 | cursor: text; 42 | } 43 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { 44 | cursor: pointer; 45 | } 46 | .ui-tabs .ui-tabs-panel { 47 | display: block; 48 | border-width: 0; 49 | padding: 1em 1.4em; 50 | background: none; 51 | } 52 | -------------------------------------------------------------------------------- /GameStore.WebUI/Content/themes/base/tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tooltip/#theming 10 | */ 11 | .ui-tooltip { 12 | padding: 8px; 13 | position: absolute; 14 | z-index: 9999; 15 | max-width: 300px; 16 | -webkit-box-shadow: 0 0 5px #aaa; 17 | box-shadow: 0 0 5px #aaa; 18 | } 19 | body .ui-tooltip { 20 | border-width: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /GameStore.WebUI/Controllers/BaseController.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Identity; 2 | using Microsoft.AspNet.Identity; 3 | using Microsoft.AspNet.Identity.Owin; 4 | using Microsoft.Owin.Security; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Net; 9 | using System.Net.Http; 10 | using System.Web; 11 | using System.Web.Http; 12 | using System.Web.Mvc; 13 | 14 | namespace GameStore.WebUI.Controllers 15 | { 16 | public class BaseController : Controller 17 | { 18 | private AppUserManager _userManager; 19 | private AppRoleManager _roleManager; 20 | private AppSignInManager _signInManager; 21 | 22 | //public BaseController(AppUserManager userManager, AppSignInManager signInManager) 23 | //{ 24 | // UserManager = userManager; 25 | // SignInManager = signInManager; 26 | //} 27 | 28 | public AppUserManager UserManager 29 | { 30 | get 31 | { 32 | return _userManager ?? HttpContext.GetOwinContext().GetUserManager(); 33 | } 34 | private set 35 | { 36 | _userManager = value; 37 | } 38 | } 39 | 40 | protected AppRoleManager RoleManager 41 | { 42 | get 43 | { 44 | return _roleManager ?? HttpContext.GetOwinContext().GetUserManager(); 45 | } 46 | private set 47 | { 48 | _roleManager = value; 49 | } 50 | } 51 | public AppSignInManager SignInManager 52 | { 53 | get 54 | { 55 | return _signInManager ?? HttpContext.GetOwinContext().Get(); 56 | } 57 | private set 58 | { 59 | _signInManager = value; 60 | } 61 | } 62 | 63 | protected IAuthenticationManager AuthenticationManager 64 | { 65 | get 66 | { 67 | return HttpContext.GetOwinContext().Authentication; 68 | } 69 | } 70 | 71 | protected string GetErrorMessage(IdentityResult result) 72 | { 73 | string message = ""; 74 | foreach (string error in result.Errors) 75 | { 76 | message = String.Concat(error, Environment.NewLine); 77 | } 78 | 79 | return message; 80 | } 81 | 82 | protected void AddErrors(IdentityResult result) 83 | { 84 | foreach (var error in result.Errors) 85 | { 86 | ModelState.AddModelError("", error); 87 | } 88 | } 89 | 90 | protected ActionResult RedirectToLocal(string returnUrl) 91 | { 92 | if (Url.IsLocalUrl(returnUrl)) 93 | { 94 | return Redirect(returnUrl); 95 | } 96 | return RedirectToAction("Index", "Home"); 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /GameStore.WebUI/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace GameStore.WebUI.Controllers 4 | { 5 | //[OutputCache(CacheProfile = "StaticUser")] 6 | public class HomeController : Controller 7 | { 8 | // GET: Home 9 | public ActionResult Index() 10 | { 11 | 12 | return View(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Controllers/MyOrderController.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Infrastructure; 2 | using GameStore.WebUI.Models; 3 | using Microsoft.AspNet.Identity; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Web; 8 | using System.Web.Mvc; 9 | 10 | namespace GameStore.WebUI.Controllers 11 | { 12 | [Authorize] 13 | public class MyOrderController : Controller 14 | { 15 | // GET: MyOrder 16 | public ActionResult Index() 17 | { 18 | List list = new List(); 19 | try 20 | { 21 | String userid = User.Identity.GetUserId(); 22 | using (GameStoreDBContext context = new GameStoreDBContext()) 23 | { 24 | var orders = from o in context.Orders 25 | join u in context.Users 26 | on o.UserId equals u.Id 27 | where o.UserId == userid 28 | orderby o.OrderId descending 29 | select new { o.OrderId, o.UserId, u.UserName, o.FullName, o.Address, o.City, o.State, o.Zip, o.ConfirmationNumber, o.DeliveryDate }; 30 | list = orders.Select(o => new OrderViewModel { OrderId = o.OrderId, UserId = o.UserId, UserName = o.UserName, FullName = o.FullName, Address = o.Address, City = o.City, State = o.State, Zip = o.Zip, ConfirmationNumber = o.ConfirmationNumber, DeliveryDate = o.DeliveryDate }).ToList(); 31 | 32 | foreach (OrderViewModel order in list) 33 | { 34 | var orderitems = from i in context.OrderItems 35 | join p in context.Products 36 | on i.ProductId equals p.ProductId 37 | join c in context.Categories 38 | on p.CategoryId equals c.CategoryId 39 | where i.OrderId == order.OrderId 40 | select new { i.OrderItemId, i.OrderId, i.ProductId, p.ProductName, p.CategoryId, c.CategoryName, p.Price, p.Image, p.Condition, p.Discount, i.Quantity }; 41 | order.Items = orderitems.Select(o => new OrderItemViewModel { OrderItemId = o.OrderItemId, OrderId = o.OrderId, ProductId = o.ProductId, ProductName = o.ProductName, CategoryId = o.CategoryId, CategoryName = o.CategoryName, Price = o.Price, Image = o.Image, Condition = o.Condition, Discount = o.Discount, Quantity = o.Quantity }).ToList(); 42 | } 43 | Session["OrderCount"] = orders.Count(); 44 | } 45 | } 46 | catch (Exception ex) 47 | { 48 | ViewBag.Message = "Error Occurs:" + ex.Message; 49 | } 50 | 51 | return View(list); 52 | } 53 | 54 | public ActionResult Detail() 55 | { 56 | return View(); 57 | } 58 | 59 | [HttpPost] 60 | public ActionResult CancelOrder(int id) 61 | { 62 | using (GameStoreDBContext context = new GameStoreDBContext()) 63 | { 64 | var order = context.Orders.Find(id); 65 | if (order == null) 66 | { 67 | ViewBag.Message = string.Format("No such order [{0}] found.", id); 68 | } 69 | else { 70 | context.Orders.Remove(order); 71 | context.SaveChanges(); 72 | ViewBag.Message = string.Format("Order [{0}] has been deleted!", id); 73 | } 74 | } 75 | 76 | return RedirectToAction("Index"); 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="GameStore.WebUI.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /GameStore.WebUI/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | using System.Web.Security; 8 | using System.Web.SessionState; 9 | using System.Web.Http; 10 | using System.Net.Http.Formatting; 11 | using System.Net.Http.Headers; 12 | using System.Web.Optimization; 13 | using System.Web.Helpers; 14 | using System.Security.Claims; 15 | 16 | namespace GameStore.WebUI 17 | { 18 | public class Global : HttpApplication 19 | { 20 | void Session_Start(Object sender, EventArgs e) 21 | { 22 | Session["CartCount"] = 0; 23 | Session["OrderCount"] = 0; 24 | } 25 | void Application_Start(object sender, EventArgs e) 26 | { 27 | // Code that runs on application startup 28 | AreaRegistration.RegisterAllAreas(); 29 | GlobalConfiguration.Configure(WebApiConfig.Register); 30 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 31 | RouteConfig.RegisterRoutes(RouteTable.Routes); 32 | BundleConfig.RegisterBundles(BundleTable.Bundles); 33 | AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier; 34 | 35 | //GlobalConfiguration.Configuration.Formatters.JsonFormatter.MediaTypeMappings.Add( 36 | // new QueryStringMapping("type", "json", new MediaTypeHeaderValue("application/json"))); 37 | 38 | //GlobalConfiguration.Configuration.Formatters.XmlFormatter.MediaTypeMappings.Add( 39 | // new QueryStringMapping("type", "xml", new MediaTypeHeaderValue("application/xml"))); 40 | GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; 41 | GlobalConfiguration.Configuration.Formatters.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter); 42 | } 43 | 44 | public override string GetVaryByCustomString(HttpContext context, string custom) 45 | { 46 | if (custom == "User") 47 | { 48 | if (context.User.Identity == null || String.IsNullOrEmpty(context.User.Identity.Name)) 49 | return "None"; 50 | else 51 | return "User-" + context.User.Identity.Name; 52 | } 53 | return base.GetVaryByCustomString(context, custom); 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Helper/ConfigurationHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Configuration; 6 | 7 | namespace GameStore.WebUI.Helper 8 | { 9 | public class ConfigurationHelper 10 | { 11 | public static string GetDefaultPassword() 12 | { 13 | return WebConfigurationManager.AppSettings["configFile"]; 14 | } 15 | public static string GetAppId() 16 | { 17 | return WebConfigurationManager.AppSettings["CreditAppId"]; 18 | } 19 | public static string GetSharedKey() 20 | { 21 | return WebConfigurationManager.AppSettings["CreditAppSharedKey"]; 22 | } 23 | public static string GetAppId2() 24 | { 25 | return WebConfigurationManager.AppSettings["CreditAppId2"]; 26 | } 27 | public static string GetSharedKey2() 28 | { 29 | return WebConfigurationManager.AppSettings["CreditAppSharedKey2"]; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Helper/CreditAuthorizationClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Cryptography; 5 | using System.Text; 6 | using System.Web; 7 | 8 | namespace GameStore.WebUI.Helper 9 | { 10 | public class CreditAuthorizationClient 11 | { 12 | /* 13 | *pSecretValue - the secret key issued when you registered at the Credit Gateway 14 | *pAppId - the appid issued to you when you registered at the credit gateway 15 | *pTransId - the transaction id your system issues to identify the purchase 16 | *pTransAmount - the value you are charging for this transaction 17 | */ 18 | public static String GenerateClientRequestHash(String pSecretValue, String pAppId, String pTransId, String pTransAmount) 19 | { 20 | try 21 | { 22 | String secretPartA = pSecretValue.Substring(0, 5); 23 | String secretPartB = pSecretValue.Substring(5, 5); 24 | String val = secretPartA + "-" + pAppId + "-" + pTransId + "-" + pTransAmount + "-" + secretPartB; 25 | var pwdBytes = Encoding.UTF8.GetBytes(val); 26 | 27 | SHA256 hashAlg = new SHA256Managed(); 28 | hashAlg.Initialize(); 29 | var hashedBytes = hashAlg.ComputeHash(pwdBytes); 30 | var hash = Convert.ToBase64String(hashedBytes); 31 | return hash; 32 | } 33 | catch (Exception e) 34 | { 35 | return null; 36 | } 37 | } 38 | 39 | /* 40 | *pHash - is the Hash Returned from the Credit Service. You need to URLDecode the value before passing it in. 41 | *pSecretValue - the secret key issued when you registered at the Credit Gateway 42 | *pAppId - the appid issued to you when you registered at the credit gateway 43 | *pTransId - the transaction id your system issues to identify the purchase 44 | *pTransAmount - the value you are charging for this transaction 45 | *pAppStatus - The status of the credit transaction. Values : A = Accepted, D = Denied 46 | */ 47 | public static bool VerifyServerResponseHash(String pHash, String pSecretValue, String pAppId, String pTransId, String pTransAmount, String pAppStatus) 48 | { 49 | String secretPartA = pSecretValue.Substring(0, 5); 50 | String secretPartB = pSecretValue.Substring(5, 5); 51 | String val = secretPartA + "-" + pAppId + "-" + pTransId + "-" + pTransAmount + "-" + pAppStatus + "-" + secretPartB; 52 | var pwdBytes = Encoding.UTF8.GetBytes(val); 53 | 54 | SHA256 hashAlg = new SHA256Managed(); 55 | hashAlg.Initialize(); 56 | var hashedBytes = hashAlg.ComputeHash(pwdBytes); 57 | var hash = Convert.ToBase64String(hashedBytes); 58 | 59 | if (hash == pHash) 60 | return true; 61 | else 62 | return false; 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/CartItem.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Globalization; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace GameStore.WebUI.Models 9 | { 10 | public class CartItem 11 | { 12 | public CartItem() 13 | { 14 | 15 | } 16 | public CartItem(Product item) 17 | { 18 | ProductItem = item; 19 | Quantity = 1; 20 | } 21 | public Product ProductItem { get; set; } 22 | public int Quantity { get; set; } 23 | 24 | public int GetItemId() 25 | { 26 | return ProductItem.ProductId; 27 | } 28 | 29 | public string GetItemName() 30 | { 31 | return ProductItem.ProductName; 32 | } 33 | 34 | public void IncrementItemQuantity() 35 | { 36 | Quantity = Quantity + 1; 37 | } 38 | 39 | 40 | public double GetDiscountedPrice() 41 | { 42 | return ProductItem.Price * (100 - ProductItem.Discount) / 100; 43 | } 44 | 45 | public double GetTotalCost() 46 | { 47 | return Quantity * GetDiscountedPrice(); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/ShoppingCart.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace GameStore.WebUI.Models 9 | { 10 | public class ShoppingCart 11 | { 12 | private List items = new List(); 13 | public ShoppingCart() 14 | { 15 | 16 | } 17 | public List GetItems() 18 | { 19 | return this.items; 20 | } 21 | 22 | public void AddItem(int id, Product product) 23 | { 24 | CartItem cartItem; 25 | for (int i = 0; i < items.Count(); i++) 26 | { 27 | cartItem = items[i]; 28 | if (cartItem.GetItemId() == id) 29 | { 30 | cartItem.IncrementItemQuantity(); 31 | return; 32 | } 33 | } 34 | CartItem newCartItem = new CartItem(product); 35 | items.Add(newCartItem); 36 | } 37 | 38 | public void SetItemQuantity(int id, int quantity, Product product) 39 | { 40 | CartItem cartItem; 41 | for (int i = 0; i < items.Count(); i++) 42 | { 43 | cartItem = items[i]; 44 | if (cartItem.GetItemId() == id) 45 | { 46 | if (quantity <= 0) 47 | { 48 | items.Remove(cartItem); 49 | } 50 | else 51 | { 52 | cartItem.Quantity = quantity; 53 | } 54 | return; 55 | } 56 | } 57 | CartItem newCartItem = new CartItem(product); 58 | items.Add(newCartItem); 59 | } 60 | 61 | public double GetTotalValue() 62 | { 63 | double sum = 0; 64 | for (int i = 0; i < items.Count(); i++) 65 | { 66 | sum += items[i].GetDiscountedPrice(); 67 | } 68 | return sum; 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/State.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace GameStore.WebUI.Models 8 | { 9 | public class State 10 | { 11 | public string Key { get; set; } 12 | public string Name { get; set; } 13 | 14 | public static Collection List() 15 | { 16 | Collection list = new Collection(); 17 | list.Add(new State() { Key = "AL", Name = "Alabama" }); 18 | list.Add(new State() { Key = "AK", Name = "Alaska" }); 19 | list.Add(new State() { Key = "AZ", Name = "Arizona" }); 20 | list.Add(new State() { Key = "AR", Name = "Arkansas" }); 21 | list.Add(new State() { Key = "CA", Name = "California" }); 22 | list.Add(new State() { Key = "CO", Name = "Colorado" }); 23 | list.Add(new State() { Key = "CT", Name = "Connecticut" }); 24 | list.Add(new State() { Key = "DE", Name = "Delaware" }); 25 | list.Add(new State() { Key = "FL", Name = "Florida" }); 26 | list.Add(new State() { Key = "GA", Name = "Georgia" }); 27 | list.Add(new State() { Key = "HI", Name = "Hawaii" }); 28 | list.Add(new State() { Key = "ID", Name = "Idaho" }); 29 | list.Add(new State() { Key = "IL", Name = "Illinois" }); 30 | list.Add(new State() { Key = "IN", Name = "Indiana" }); 31 | list.Add(new State() { Key = "IA", Name = "Iowa" }); 32 | list.Add(new State() { Key = "KS", Name = "Kansas" }); 33 | list.Add(new State() { Key = "KY", Name = "Kentucky" }); 34 | list.Add(new State() { Key = "LA", Name = "Louisiana" }); 35 | list.Add(new State() { Key = "ME", Name = "Maine" }); 36 | list.Add(new State() { Key = "MD", Name = "Maryland" }); 37 | list.Add(new State() { Key = "MA", Name = "Massachusetts" }); 38 | list.Add(new State() { Key = "MI", Name = "Michigan" }); 39 | list.Add(new State() { Key = "MN", Name = "Minnesota" }); 40 | list.Add(new State() { Key = "MS", Name = "Mississippi" }); 41 | list.Add(new State() { Key = "MO", Name = "Missouri" }); 42 | list.Add(new State() { Key = "MT", Name = "Montana" }); 43 | list.Add(new State() { Key = "NE", Name = "Nebraska" }); 44 | list.Add(new State() { Key = "NV", Name = "Nevada" }); 45 | list.Add(new State() { Key = "NH", Name = "New Hampshire" }); 46 | list.Add(new State() { Key = "NJ", Name = "New Jersey" }); 47 | list.Add(new State() { Key = "NM", Name = "New Mexico" }); 48 | list.Add(new State() { Key = "NY", Name = "New York" }); 49 | list.Add(new State() { Key = "NC", Name = "North Carolina" }); 50 | list.Add(new State() { Key = "ND", Name = "North Dakota" }); 51 | list.Add(new State() { Key = "OH", Name = "Ohio" }); 52 | list.Add(new State() { Key = "OK", Name = "Oklahoma" }); 53 | list.Add(new State() { Key = "OR", Name = "Oregon" }); 54 | list.Add(new State() { Key = "PA", Name = "Pennsylvania" }); 55 | list.Add(new State() { Key = "RI", Name = "Rhode Island" }); 56 | list.Add(new State() { Key = "SC", Name = "South Carolina" }); 57 | list.Add(new State() { Key = "SD", Name = "South Dakota" }); 58 | list.Add(new State() { Key = "TN", Name = "Tennessee" }); 59 | list.Add(new State() { Key = "TX", Name = "Texas" }); 60 | list.Add(new State() { Key = "UT", Name = "Utah" }); 61 | list.Add(new State() { Key = "VT", Name = "Vermont" }); 62 | list.Add(new State() { Key = "VA", Name = "Virginia" }); 63 | list.Add(new State() { Key = "WA", Name = "Washington" }); 64 | list.Add(new State() { Key = "WV", Name = "West Virginia" }); 65 | list.Add(new State() { Key = "WI", Name = "Wisconsin" }); 66 | list.Add(new State() { Key = "WY", Name = "Wyoming" }); 67 | 68 | return list; 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/ViewModels/AccountViewModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace GameStore.WebUI.Models 8 | { 9 | public class RegisterViewModel 10 | { 11 | [Required] 12 | [EmailAddress] 13 | [Display(Name = "Email")] 14 | public string Email { get; set; } 15 | 16 | [Required] 17 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 18 | [DataType(DataType.Password)] 19 | [Display(Name = "Password")] 20 | public string Password { get; set; } 21 | 22 | [DataType(DataType.Password)] 23 | [Display(Name = "Confirm password")] 24 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 25 | public string ConfirmPassword { get; set; } 26 | [Required] 27 | [Display(Name = "User Name")] 28 | public string UserName { get; set; } 29 | [Required] 30 | [Display(Name = "Membership")] 31 | public string Membership { get; set; } 32 | } 33 | 34 | public class LoginViewModel 35 | { 36 | [Required] 37 | [Display(Name = "Email")] 38 | [EmailAddress] 39 | public string Email { get; set; } 40 | 41 | [Required] 42 | [DataType(DataType.Password)] 43 | [Display(Name = "Password")] 44 | public string Password { get; set; } 45 | 46 | [Display(Name = "Remember me?")] 47 | public bool RememberMe { get; set; } 48 | } 49 | 50 | public class ChangePasswordViewModel 51 | { 52 | [Required] 53 | [DataType(DataType.Password)] 54 | [Display(Name = "Current password")] 55 | public string OldPassword { get; set; } 56 | 57 | [Required] 58 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 59 | [DataType(DataType.Password)] 60 | [Display(Name = "New password")] 61 | public string NewPassword { get; set; } 62 | 63 | [DataType(DataType.Password)] 64 | [Display(Name = "Confirm new password")] 65 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 66 | public string ConfirmPassword { get; set; } 67 | } 68 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/ViewModels/CartViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GameStore.WebUI.Models 7 | { 8 | public class CartViewModel 9 | { 10 | public int Id { get; set; } 11 | public int Quantity { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/ViewModels/CheckoutViewModel.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace GameStore.WebUI.Models 9 | { 10 | public class CheckoutViewModel 11 | { 12 | [Required] 13 | public string FullName { get; set; } 14 | [Required] 15 | public string Address { get; set; } 16 | [Required] 17 | public string City { get; set; } 18 | [Required] 19 | public string State { get; set; } 20 | [Required] 21 | public string Zip { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/ViewModels/OrderItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace GameStore.WebUI.Models 8 | { 9 | public class OrderItemViewModel 10 | { 11 | public int OrderItemId { get; set; } 12 | public int OrderId { get; set; } 13 | public int ProductId { get; set; } 14 | public string ProductName { get; set; } 15 | public int CategoryId { get; set; } 16 | public string CategoryName { get; set; } 17 | public double Price { get; set; } 18 | public string Image { get; set; } 19 | public string Condition { get; set; } 20 | public int Discount { get; set; } 21 | public int Quantity { get; set; } 22 | public double GetDiscountedPrice() 23 | { 24 | return Price * (100 - Discount) / 100; 25 | } 26 | public double GetTotalCost() 27 | { 28 | return Quantity * GetDiscountedPrice(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Models/ViewModels/OrderViewModel.cs: -------------------------------------------------------------------------------- 1 | using GameStore.Domain.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace GameStore.WebUI.Models 8 | { 9 | public class OrderViewModel 10 | { 11 | public int OrderId { get; set; } 12 | public string UserId { get; set; } 13 | public string UserName { get; set; } 14 | public string FullName { get; set; } 15 | public string Address { get; set; } 16 | public string City { get; set; } 17 | public string State { get; set; } 18 | public string Zip { get; set; } 19 | public string ConfirmationNumber { get; set; } 20 | public DateTime DeliveryDate { get; set; } 21 | public List Items { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GameStore.WebUI")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("GameStore.WebUI")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7ac3c4a3-d96f-49ce-912b-0cc6813865d3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /GameStore.WebUI/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Owin; 3 | 4 | [assembly: OwinStartupAttribute(typeof(GameStore.WebUI.Startup))] 5 | namespace GameStore.WebUI 6 | { 7 | public partial class Startup 8 | { 9 | public void Configuration(IAppBuilder app) 10 | { 11 | ConfigureAuth(app); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Account/ChangePassword.cshtml: -------------------------------------------------------------------------------- 1 | @model GameStore.WebUI.Models.ChangePasswordViewModel 2 | @{ 3 | ViewBag.Title = "Change Password"; 4 | } 5 | 6 |

@ViewBag.Title

7 |
8 | @using (Html.BeginForm("ChangePassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.ValidationSummary("", new { @class = "text-danger" }) 12 |
13 | @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) 14 |
15 | @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) 16 |
17 |
18 |
19 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 20 |
21 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 22 |
23 |
24 |
25 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 26 |
27 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 28 |
29 |
30 |
31 |
32 | 33 |
34 |
35 | } 36 | @section Scripts { 37 | @Scripts.Render("~/bundles/jqueryval") 38 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @model GameStore.WebUI.Models.LoginViewModel 2 | @{ 3 | ViewBag.Title = "Log in"; 4 | } 5 | 6 |

@ViewBag.Title

7 |
8 |
9 |
10 | @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 11 | { 12 | @Html.AntiForgeryToken() 13 |

Use a local account to log in

14 |
15 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 16 |
17 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 18 |
19 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 20 | @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) 21 |
22 |
23 |
24 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 25 |
26 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 27 | @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" }) 28 |
29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 |
37 |
38 |
39 | 40 |
41 |
42 |
43 |
44 | @Html.ActionLink("Register as a new user", "Register") 45 |
46 |
47 | @* Enable this once you have account confirmation enabled for password reset functionality 48 |

49 | @Html.ActionLink("Forgot your password?", "ForgotPassword") 50 |

*@ 51 | } 52 |
53 |
54 |
55 |
56 |
57 |
58 | 59 | @section Scripts { 60 | @Scripts.Render("~/bundles/jqueryval") 61 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Account/MemberProfile.cshtml: -------------------------------------------------------------------------------- 1 | @model GameStore.WebUI.Areas.Admin.Models.DTO.UserDTO 2 | @{ 3 | ViewBag.Title = "Profile"; 4 | } 5 |

@ViewBag.Title

6 |
7 | 8 |
9 |
10 |
My Profile
11 |
12 | @using (Html.BeginForm("", "", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" })) 13 | { 14 |
15 | @Html.LabelFor(o => o.Email, new { @class = "col-sm-2 control-label" }) 16 |
17 | @Html.TextBoxFor(o => o.Email, new { @class = "form-control", @placeholder = "Customer Name", disabled = "true" }) 18 |
19 |
20 |
21 | @Html.LabelFor(o => o.UserName, new { @class = "col-sm-2 control-label" }) 22 |
23 | @Html.TextBoxFor(o => o.UserName, new { @class = "form-control", @placeholder = "Confirmation Number", disabled = "true" }) 24 |
25 |
26 |
27 | @Html.LabelFor(o => o.Membership, new { @class = "col-sm-2 control-label" }) 28 |
29 | @Html.TextBoxFor(o => o.Membership, new { @class = "form-control", @placeholder = "Delivery Date", disabled = "true" }) 30 |
31 |
32 | } 33 |
34 |
35 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Account/ProcessCreditResponse.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "ProcessCreditResponse"; 3 | } 4 | 5 |

@ViewBag.Title

6 |

@ViewBag.Message

7 | 8 | 9 |

@ViewBag.TransactionStatus

10 | 11 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model GameStore.WebUI.Models.RegisterViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |

@ViewBag.Title

7 | 8 | @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Create a new account

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 30 |
31 |
32 |
33 | @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" }) 34 |
35 | @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) 36 |
37 |
38 |
39 | @Html.LabelFor(m => m.Membership, new { @class = "col-md-2 control-label" }) 40 |
41 |
42 | 46 | 50 |
51 |
52 |
53 |
54 |
55 | 56 |
57 |
58 | } 59 | 60 | @section Scripts { 61 | @Scripts.Render("~/bundles/jqueryval") 62 | } 63 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Home Page"; 3 | } 4 | @Html.Partial("_FrontPartial") 5 |
6 |

Game Store

7 |

Welcome to Johnny's Game Store! You can purchase consoles, accessories and games here. You can register as 'Regular' user to purchase products. Or, register as 'Advanced' user to sell your own products!

8 |
9 |
@Html.ActionLink("Console", "Console", "Product")
10 |
@Html.ActionLink("Accessory", "Accessory", "Product")
11 |
@Html.ActionLink("Game", "Game", "Product")
12 |
13 |
14 |
15 |
16 |
17 | 18 |
19 |
20 |
Default User Account
21 |
22 |
23 |
    24 |
  • admin@gamestore.com / admin
  • 25 |
  • advanced@gamestore.com / advanced
  • 26 |
  • regular@gamestore.com / regular
  • 27 |
28 |
29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/MyOrder/Detail.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @using (Html.BeginForm("PlaceOrder", "ShoppingCart", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" })) 3 | { 4 |
5 | @Html.LabelFor(o => o.UserId, new { @class = "col-md-2 control-label" }) 6 |
7 | @Html.TextBoxFor(o => o.UserId, new { @class = "form-control", @placeholder = "Customer Name", disabled = "true" }) 8 |
9 |
10 |
11 | @Html.LabelFor(o => o.Address, new { @class = "col-md-2 control-label" }) 12 |
13 | @Html.TextBoxFor(o => o.Address, new { @class = "form-control", @placeholder = "Customer Name", disabled = "true" }) 14 |
15 |
16 |
17 | @Html.LabelFor(o => o.CreditCard) 18 |
19 | @Html.TextBoxFor(o => o.CreditCard, new { @class = "form-control", @placeholder = "Customer Name", disabled = "true" }) 20 |
21 |
22 |
23 |
24 | @Html.ActionLink("My Orders", "Index", "MyOrder"); 25 |
26 |
27 | } 28 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/MyOrder/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using GameStore.Extension; 2 | @model IEnumerable 3 | @{ 4 | ViewBag.Title = "My Orders"; 5 | } 6 | @Html.Partial("_FrontPartial") 7 | 8 | @if (Model.Count() == 0) 9 | { 10 |

You have no order yet!

11 | } 12 | else 13 | { 14 | foreach (var order in Model) 15 | { 16 | double total = 0; 17 | 18 |
19 |
Order Id: @order.OrderId
20 |
21 |
22 |
23 |
24 |
25 |
User Name:
26 |
@order.UserName
27 |
28 |
29 |
Confirmation Number:
30 |
@order.ConfirmationNumber
31 |
32 |
33 |
Delivery Date:
34 |
@order.DeliveryDate
35 |
36 |
37 |
38 |
39 |
40 |
41 |
Shipping Address
42 |
43 |
44 |
Full Name:
45 |
@order.FullName:
46 |
47 |
48 |
Address:
49 |
@order.Address
50 |
51 |
52 |
City:
53 |
@order.City
54 |
55 |
56 |
State:
57 |
@order.State
58 |
59 |
60 |
Zip:
61 |
@order.Zip
62 |
63 |
64 |
65 |
66 | @using (Html.BeginForm("CancelOrder", "MyOrder", FormMethod.Post, null)) 67 | { 68 | 69 | 70 | } 71 |
72 |
73 |
74 |
75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | @foreach (var item in order.Items) 87 | { 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | total += item.GetTotalCost(); 96 | } 97 | 98 | 99 | 100 | 101 |
Product IdProduct NamePriceQuantitySub Total
@item.ProductId@item.ProductName@Html.FormattedCurrency(item.GetDiscountedPrice())@item.Quantity@Html.FormattedCurrency(item.GetTotalCost())
Total:@Html.FormattedCurrency(total)
102 |
103 |
104 |
105 | } 106 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Product/Detail.cshtml: -------------------------------------------------------------------------------- 1 | @using GameStore.Extension; 2 | @model GameStore.WebUI.Areas.Admin.Models.DTO.ProductDTO 3 | @{ 4 | ViewBag.Title = "Product Detail"; 5 | } 6 | @Html.Partial("_FrontPartial") 7 | @Html.HiddenFor(o=>o.ProductId) 8 |
9 |
10 |
Image
11 |
12 |
13 |

@Model.ProductName @Model.CategoryName

14 |
15 | Price: 16 | @Html.FormattedCurrency(Model.Price)@Html.FormattedCurrency(Model.GetDiscountedPrice()) 17 |
18 |
Condition: @Model.Condition
19 |
20 | @using (Html.BeginForm("CreateOrUpdate", "ShoppingCart", FormMethod.Post)) 21 | { 22 | 23 | 24 | 25 | } 26 |
27 |
28 |
29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Product/List.cshtml: -------------------------------------------------------------------------------- 1 | @using GameStore.Extension; 2 | @model List 3 | @{ 4 | var counter = 0; 5 | } 6 | @Html.Partial("_FrontPartial") 7 |
8 | @foreach (var item in Model) 9 | { 10 | if ((counter + 1) % 4 == 1) 11 | { 12 | @:
13 | } 14 |
15 |
16 |
17 |
@item.ProductName
18 |
Image
19 |
20 | @Html.FormattedCurrency(item.Price)@Html.FormattedCurrency(item.GetDiscountedPrice()) 21 |
22 | 30 |
31 |
32 |
33 | 34 | if ((counter + 1) % 4 == 0 || counter == Model.Count() - 1) 35 | { 36 | @:
37 | } 38 | counter++; 39 | } 40 |
41 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Product/MyProductOrders.cshtml: -------------------------------------------------------------------------------- 1 | @using GameStore.Extension; 2 | @model IEnumerable 3 | @{ 4 | ViewBag.Title = "My Product Orders"; 5 | } 6 | @Html.Partial("_FrontPartial") 7 | 8 | @if (Model.Count() == 0) 9 | { 10 |

You have no order yet!

11 | } 12 | else 13 | { 14 | foreach (var product in Model) 15 | { 16 |
17 |
Product Id: @product.ProductId
18 |
19 |
20 |
21 |
22 |
23 |
Product Name:
24 |
@product.ProductName
25 |
26 |
27 |
Category:
28 |
@product.CategoryName
29 |
30 |
31 |
Price:
32 |
@Html.FormattedCurrency(product.Price)
33 |
34 |
35 |
36 |
37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | @foreach (var order in product.Orders) 51 | { 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | } 60 | 61 | 62 | 63 | 64 |
Order IdUser NameAddressConfirmation NumberDelivery Date
@order.OrderId@order.UserName@order.Address@order.ConfirmationNumber@order.DeliveryDate
65 |
66 |
67 |
68 | } 69 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Shared/_FrontLayout.cshtml: -------------------------------------------------------------------------------- 1 | @using GameStore.Extension 2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title - Rong's Game Store 8 | 9 | @Scripts.Render("~/bundles/jquery") 10 | @Scripts.Render("~/bundles/jqueryval") 11 | @Scripts.Render("~/bundles/jqueryui") 12 | @Scripts.Render("~/bundles/bootstrap") 13 | @Styles.Render("~/Content/css") 14 | @Styles.Render("~/Content/fancy") 15 | @Scripts.Render("~/bundles/modernizr") 16 | 23 | 24 | 25 | 47 |
48 |
49 | 58 |
59 | @RenderBody() 60 |
61 |
62 |
63 |
64 |

© @DateTime.Now.Year - Rong's Game Store

65 |
66 |
67 | @RenderSection("scripts", required: false) 68 | 69 | 70 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Shared/_FrontPartial.cshtml: -------------------------------------------------------------------------------- 1 | 
2 |

@ViewBag.Title

3 |
4 | 5 | 11 | 24 |
25 | 33 |
34 |

@ViewBag.Message

35 |
36 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | @using GameStore.Extension 2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title - Rong's Game Store 8 | 9 | 10 | @Scripts.Render("~/bundles/jquery") 11 | @Scripts.Render("~/bundles/jqueryval") 12 | @Scripts.Render("~/bundles/jqueryui") 13 | @Scripts.Render("~/bundles/bootstrap") 14 | @Styles.Render("~/Content/css") 15 | @Styles.Render("~/Content/fancy") 16 | @Scripts.Render("~/bundles/modernizr") 17 | 24 | 25 | 26 | 48 |
49 | @RenderBody() 50 |
51 |
52 |

© @DateTime.Now.Year - Rong's Game Store

53 |
54 |
55 | 56 | @RenderSection("scripts", required: false) 57 | 58 | 59 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", new { area = "" }, FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 51 | } 52 | } 53 | else 54 | { 55 | 59 | } 60 | -------------------------------------------------------------------------------- /GameStore.WebUI/Views/ShoppingCart/Checkout.cshtml: -------------------------------------------------------------------------------- 1 | @model GameStore.WebUI.Models.CheckoutViewModel 2 | @{ 3 | ViewBag.Title = "Checkout"; 4 | } 5 | @Html.Partial("_FrontPartial") 6 |
7 | @using (Html.BeginForm("PlaceOrder", "ShoppingCart", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" })) 8 | { 9 | @Html.ValidationSummary(false, "", new { @class = "text-danger" }) 10 |
11 |
12 |

Shipping Address

13 |
14 |
15 | @Html.LabelFor(c => c.FullName, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(c => c.FullName, new { @class = "form-control", @placeholder = "Full Name" }) 18 |
19 |
20 |
21 | @Html.LabelFor(c => c.Address, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.TextBoxFor(c => c.Address, new { @class = "form-control", @placeholder = "Address" }) 24 |
25 |
26 |
27 | @Html.LabelFor(c => c.City, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.TextBoxFor(c => c.City, new { @class = "form-control", @placeholder = "City" }) 30 |
31 |
32 |
33 | @Html.LabelFor(c => c.State, new { @class = "col-md-2 control-label" }) 34 |
35 | @Html.DropDownList("State", new SelectList(ViewBag.States, "Key", "Name", Model.State), new { @class = "form-control" }) 36 |
37 |
38 |
39 | @Html.LabelFor(c => c.Zip, new { @class = "col-md-2 control-label" }) 40 |
41 | @Html.TextBoxFor(c => c.Zip, new { @class = "form-control", @placeholder = "Zip" }) 42 |
43 |
44 |
45 |
46 | @Html.ActionLink("Back to Cart", "Index", new { controller = "ShoppingCart" }, new { @class="btn btn-danger" }) 47 | 48 |
49 |
50 | } 51 |
-------------------------------------------------------------------------------- /GameStore.WebUI/Views/ShoppingCart/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using GameStore.Extension; 2 | @model GameStore.WebUI.Models.ShoppingCart 3 | @{ 4 | ViewBag.Title = "My Cart"; 5 | double total = 0; 6 | } 7 | @Html.Partial("_FrontPartial") 8 | @if (Model.GetItems().Count == 0) 9 | { 10 |

Your cart is empty!

11 | } 12 | else 13 | { 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach (var item in Model.GetItems()) 27 | { 28 | 29 | 30 | 31 | 32 | 40 | 41 | 49 | 50 | { total = total + item.GetTotalCost(); } 51 | } 52 | 53 | 54 | 55 | 56 |
Product IdProduct NamePriceQuantitySub TotalOperations
@item.GetItemId()@item.GetItemName()@Html.FormattedCurrency(item.GetDiscountedPrice()) 33 | @using (Html.BeginForm("CreateOrUpdate", "ShoppingCart", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-inline" })) 34 | { 35 | 36 | 37 | 38 | } 39 | @Html.FormattedCurrency(item.GetTotalCost()) 42 | @using (Html.BeginForm("CreateOrUpdate", "ShoppingCart", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" })) 43 | { 44 | 45 | 46 | 47 | } 48 |
@Html.FormattedCurrency(total)@Html.ActionLink("Checkout", "Checkout", new { controller = "ShoppingCart" }, new { @class = "btn btn-primary" })
57 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /GameStore.WebUI/Views/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /GameStore.WebUI/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /GameStore.WebUI/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /GameStore.WebUI/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /GameStore.WebUI/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /GameStore.WebUI/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /GameStore.WebUI/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/Turtle Beach Headset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/Turtle Beach Headset.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/XBOX controller.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/XBOX controller.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/XBOX360-SpeedWheel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/XBOX360-SpeedWheel.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/chartboost.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/chartboost.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/ps3_controller.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/ps3_controller.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/ps3_diskcontroller.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/ps3_diskcontroller.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/ps4_controllercharger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/ps4_controllercharger.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/wii_chargingsystem.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/wii_chargingsystem.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/wii_remoteplus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/wii_remoteplus.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/wiiu_fightingpad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/wiiu_fightingpad.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/wiiu_gamecube.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/wiiu_gamecube.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/accessories/xbox360_wa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/accessories/xbox360_wa.png -------------------------------------------------------------------------------- /GameStore.WebUI/images/bag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/bag.png -------------------------------------------------------------------------------- /GameStore.WebUI/images/consoles/PS4-console-bundle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/consoles/PS4-console-bundle.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/consoles/ps3-console.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/consoles/ps3-console.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/consoles/wii.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/consoles/wii.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/consoles/wiiu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/consoles/wiiu.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/consoles/xbox1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/consoles/xbox1.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/consoles/xbox360.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/consoles/xbox360.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/favorite.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/favorite.ico -------------------------------------------------------------------------------- /GameStore.WebUI/images/games/activision_cod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/games/activision_cod.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/games/activision_prot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/games/activision_prot.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/games/ea_fifa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/games/ea_fifa.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/games/ea_nfs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/games/ea_nfs.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/games/tti_evolve.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/games/tti_evolve.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/games/tti_gta.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/games/tti_gta.jpg -------------------------------------------------------------------------------- /GameStore.WebUI/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/GameStore.WebUI/images/search.png -------------------------------------------------------------------------------- /GameStore.WebUI/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /GameStore.WebUI/scripts/jquery.fancybox-buttons.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Buttons helper for fancyBox 3 | * version: 1.0.5 (Mon, 15 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * buttons: { 10 | * position : 'top' 11 | * } 12 | * } 13 | * }); 14 | * 15 | */ 16 | (function ($) { 17 | //Shortcut for fancyBox object 18 | var F = $.fancybox; 19 | 20 | //Add helper object 21 | F.helpers.buttons = { 22 | defaults : { 23 | skipSingle : false, // disables if gallery contains single image 24 | position : 'top', // 'top' or 'bottom' 25 | tpl : '
' 26 | }, 27 | 28 | list : null, 29 | buttons: null, 30 | 31 | beforeLoad: function (opts, obj) { 32 | //Remove self if gallery do not have at least two items 33 | 34 | if (opts.skipSingle && obj.group.length < 2) { 35 | obj.helpers.buttons = false; 36 | obj.closeBtn = true; 37 | 38 | return; 39 | } 40 | 41 | //Increase top margin to give space for buttons 42 | obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 43 | }, 44 | 45 | onPlayStart: function () { 46 | if (this.buttons) { 47 | this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 48 | } 49 | }, 50 | 51 | onPlayEnd: function () { 52 | if (this.buttons) { 53 | this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 54 | } 55 | }, 56 | 57 | afterShow: function (opts, obj) { 58 | var buttons = this.buttons; 59 | 60 | if (!buttons) { 61 | this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 62 | 63 | buttons = { 64 | prev : this.list.find('.btnPrev').click( F.prev ), 65 | next : this.list.find('.btnNext').click( F.next ), 66 | play : this.list.find('.btnPlay').click( F.play ), 67 | toggle : this.list.find('.btnToggle').click( F.toggle ), 68 | close : this.list.find('.btnClose').click( F.close ) 69 | } 70 | } 71 | 72 | //Prev 73 | if (obj.index > 0 || obj.loop) { 74 | buttons.prev.removeClass('btnDisabled'); 75 | } else { 76 | buttons.prev.addClass('btnDisabled'); 77 | } 78 | 79 | //Next / Play 80 | if (obj.loop || obj.index < obj.group.length - 1) { 81 | buttons.next.removeClass('btnDisabled'); 82 | buttons.play.removeClass('btnDisabled'); 83 | 84 | } else { 85 | buttons.next.addClass('btnDisabled'); 86 | buttons.play.addClass('btnDisabled'); 87 | } 88 | 89 | this.buttons = buttons; 90 | 91 | this.onUpdate(opts, obj); 92 | }, 93 | 94 | onUpdate: function (opts, obj) { 95 | var toggle; 96 | 97 | if (!this.buttons) { 98 | return; 99 | } 100 | 101 | toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 102 | 103 | //Size toggle button 104 | if (obj.canShrink) { 105 | toggle.addClass('btnToggleOn'); 106 | 107 | } else if (!obj.canExpand) { 108 | toggle.addClass('btnDisabled'); 109 | } 110 | }, 111 | 112 | beforeClose: function () { 113 | if (this.list) { 114 | this.list.remove(); 115 | } 116 | 117 | this.list = null; 118 | this.buttons = null; 119 | } 120 | }; 121 | 122 | }(jQuery)); 123 | -------------------------------------------------------------------------------- /GameStore.WebUI/scripts/jquery.fancybox-thumbs.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Thumbnail helper for fancyBox 3 | * version: 1.0.7 (Mon, 01 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * thumbs: { 10 | * width : 50, 11 | * height : 50 12 | * } 13 | * } 14 | * }); 15 | * 16 | */ 17 | (function ($) { 18 | //Shortcut for fancyBox object 19 | var F = $.fancybox; 20 | 21 | //Add helper object 22 | F.helpers.thumbs = { 23 | defaults : { 24 | width : 50, // thumbnail width 25 | height : 50, // thumbnail height 26 | position : 'bottom', // 'top' or 'bottom' 27 | source : function ( item ) { // function to obtain the URL of the thumbnail image 28 | var href; 29 | 30 | if (item.element) { 31 | href = $(item.element).find('img').attr('src'); 32 | } 33 | 34 | if (!href && item.type === 'image' && item.href) { 35 | href = item.href; 36 | } 37 | 38 | return href; 39 | } 40 | }, 41 | 42 | wrap : null, 43 | list : null, 44 | width : 0, 45 | 46 | init: function (opts, obj) { 47 | var that = this, 48 | list, 49 | thumbWidth = opts.width, 50 | thumbHeight = opts.height, 51 | thumbSource = opts.source; 52 | 53 | //Build list structure 54 | list = ''; 55 | 56 | for (var n = 0; n < obj.group.length; n++) { 57 | list += '
  • '; 58 | } 59 | 60 | this.wrap = $('
    ').addClass(opts.position).appendTo('body'); 61 | this.list = $('
      ' + list + '
    ').appendTo(this.wrap); 62 | 63 | //Load each thumbnail 64 | $.each(obj.group, function (i) { 65 | var href = thumbSource( obj.group[ i ] ); 66 | 67 | if (!href) { 68 | return; 69 | } 70 | 71 | $("").load(function () { 72 | var width = this.width, 73 | height = this.height, 74 | widthRatio, heightRatio, parent; 75 | 76 | if (!that.list || !width || !height) { 77 | return; 78 | } 79 | 80 | //Calculate thumbnail width/height and center it 81 | widthRatio = width / thumbWidth; 82 | heightRatio = height / thumbHeight; 83 | 84 | parent = that.list.children().eq(i).find('a'); 85 | 86 | if (widthRatio >= 1 && heightRatio >= 1) { 87 | if (widthRatio > heightRatio) { 88 | width = Math.floor(width / heightRatio); 89 | height = thumbHeight; 90 | 91 | } else { 92 | width = thumbWidth; 93 | height = Math.floor(height / widthRatio); 94 | } 95 | } 96 | 97 | $(this).css({ 98 | width : width, 99 | height : height, 100 | top : Math.floor(thumbHeight / 2 - height / 2), 101 | left : Math.floor(thumbWidth / 2 - width / 2) 102 | }); 103 | 104 | parent.width(thumbWidth).height(thumbHeight); 105 | 106 | $(this).hide().appendTo(parent).fadeIn(300); 107 | 108 | }).attr('src', href); 109 | }); 110 | 111 | //Set initial width 112 | this.width = this.list.children().eq(0).outerWidth(true); 113 | 114 | this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); 115 | }, 116 | 117 | beforeLoad: function (opts, obj) { 118 | //Remove self if gallery do not have at least two items 119 | if (obj.group.length < 2) { 120 | obj.helpers.thumbs = false; 121 | 122 | return; 123 | } 124 | 125 | //Increase bottom margin to give space for thumbs 126 | obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 127 | }, 128 | 129 | afterShow: function (opts, obj) { 130 | //Check if exists and create or update list 131 | if (this.list) { 132 | this.onUpdate(opts, obj); 133 | 134 | } else { 135 | this.init(opts, obj); 136 | } 137 | 138 | //Set active element 139 | this.list.children().removeClass('active').eq(obj.index).addClass('active'); 140 | }, 141 | 142 | //Center list 143 | onUpdate: function (opts, obj) { 144 | if (this.list) { 145 | this.list.stop(true).animate({ 146 | 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 147 | }, 150); 148 | } 149 | }, 150 | 151 | beforeClose: function () { 152 | if (this.wrap) { 153 | this.wrap.remove(); 154 | } 155 | 156 | this.wrap = null; 157 | this.list = null; 158 | this.width = 0; 159 | } 160 | } 161 | 162 | }(jQuery)); -------------------------------------------------------------------------------- /GameStore.WebUI/scripts/jquery.mousewheel-3.0.6.pack.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 2 | * Licensed under the MIT License (LICENSE.txt). 3 | * 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY 7 | * 8 | * Version: 3.0.6 9 | * 10 | * Requires: 1.2.2+ 11 | */ 12 | (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= 13 | d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); -------------------------------------------------------------------------------- /GameStore.WebUI/scripts/jquery.unobtrusive-ajax.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | /* 16 | ** Unobtrusive Ajax support library for jQuery 17 | ** Copyright (C) Microsoft Corporation. All rights reserved. 18 | */ 19 | (function(a){var b="unobtrusiveAjaxClick",d="unobtrusiveAjaxClickTarget",h="unobtrusiveValidation";function c(d,b){var a=window,c=(d||"").split(".");while(a&&c.length)a=a[c.shift()];if(typeof a==="function")return a;b.push(d);return Function.constructor.apply(null,b)}function e(a){return a==="GET"||a==="POST"}function g(b,a){!e(a)&&b.setRequestHeader("X-HTTP-Method-Override",a)}function i(c,b,e){var d;if(e.indexOf("application/x-javascript")!==-1)return;d=(c.getAttribute("data-ajax-mode")||"").toUpperCase();a(c.getAttribute("data-ajax-update")).each(function(f,c){var e;switch(d){case"BEFORE":e=c.firstChild;a("
    ").html(b).contents().each(function(){c.insertBefore(this,e)});break;case"AFTER":a("
    ").html(b).contents().each(function(){c.appendChild(this)});break;case"REPLACE-WITH":a(c).replaceWith(b);break;default:a(c).html(b)}})}function f(b,d){var j,k,f,h;j=b.getAttribute("data-ajax-confirm");if(j&&!window.confirm(j))return;k=a(b.getAttribute("data-ajax-loading"));h=parseInt(b.getAttribute("data-ajax-loading-duration"),10)||0;a.extend(d,{type:b.getAttribute("data-ajax-method")||undefined,url:b.getAttribute("data-ajax-url")||undefined,cache:!!b.getAttribute("data-ajax-cache"),beforeSend:function(d){var a;g(d,f);a=c(b.getAttribute("data-ajax-begin"),["xhr"]).apply(b,arguments);a!==false&&k.show(h);return a},complete:function(){k.hide(h);c(b.getAttribute("data-ajax-complete"),["xhr","status"]).apply(b,arguments)},success:function(a,e,d){i(b,a,d.getResponseHeader("Content-Type")||"text/html");c(b.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(b,arguments)},error:function(){c(b.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(b,arguments)}});d.data.push({name:"X-Requested-With",value:"XMLHttpRequest"});f=d.type.toUpperCase();if(!e(f)){d.type="POST";d.data.push({name:"X-HTTP-Method-Override",value:f})}a.ajax(d)}function j(c){var b=a(c).data(h);return!b||!b.validate||b.validate()}a(document).on("click","a[data-ajax=true]",function(a){a.preventDefault();f(this,{url:this.href,type:"GET",data:[]})});a(document).on("click","form[data-ajax=true] input[type=image]",function(c){var g=c.target.name,e=a(c.target),f=a(e.parents("form")[0]),d=e.offset();f.data(b,[{name:g+".x",value:Math.round(c.pageX-d.left)},{name:g+".y",value:Math.round(c.pageY-d.top)}]);setTimeout(function(){f.removeData(b)},0)});a(document).on("click","form[data-ajax=true] :submit",function(e){var g=e.currentTarget.name,f=a(e.target),c=a(f.parents("form")[0]);c.data(b,g?[{name:g,value:e.currentTarget.value}]:[]);c.data(d,f);setTimeout(function(){c.removeData(b);c.removeData(d)},0)});a(document).on("submit","form[data-ajax=true]",function(h){var e=a(this).data(b)||[],c=a(this).data(d),g=c&&c.hasClass("cancel");h.preventDefault();if(!g&&!j(this))return;f(this,{url:this.action,type:this.method||"GET",data:e.concat(a(this).serializeArray())})})})(jQuery); -------------------------------------------------------------------------------- /GameStore.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameStore.Domain", "GameStore.Domain\GameStore.Domain.csproj", "{89668E5C-BFAE-41ED-913F-B039C6898B27}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameStore.WebUI", "GameStore.WebUI\GameStore.WebUI.csproj", "{7AC3C4A3-D96F-49CE-912B-0CC6813865D3}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameStore.Extension", "GameStore.Extension\GameStore.Extension.csproj", "{E3686E98-B47F-42F7-8DB6-2CF476FBF652}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {89668E5C-BFAE-41ED-913F-B039C6898B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {89668E5C-BFAE-41ED-913F-B039C6898B27}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {89668E5C-BFAE-41ED-913F-B039C6898B27}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {89668E5C-BFAE-41ED-913F-B039C6898B27}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {7AC3C4A3-D96F-49CE-912B-0CC6813865D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {7AC3C4A3-D96F-49CE-912B-0CC6813865D3}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {7AC3C4A3-D96F-49CE-912B-0CC6813865D3}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {7AC3C4A3-D96F-49CE-912B-0CC6813865D3}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {E3686E98-B47F-42F7-8DB6-2CF476FBF652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {E3686E98-B47F-42F7-8DB6-2CF476FBF652}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {E3686E98-B47F-42F7-8DB6-2CF476FBF652}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {E3686E98-B47F-42F7-8DB6-2CF476FBF652}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Rong Zhuang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Game Store 2 | An online eCommerce web store, built with ASP.NET MVC in C#. 3 | 4 | ![image](/public/games.png) 5 | 6 | # Function 7 | This website has all the required functions as an eCommerce web store. Here are the available features: 8 | * Membership: Regular User, Advanced User, Admin User. 9 | * User Authentication - Register, Login, User Profile, Reset Password, Role, etc. 10 | * Product Management - Create, Update, Delete product. 11 | * User Management - Create, Update, Delete user. 12 | * Procure System - Shopping Cart, Order, Payment, Shipping. 13 | * Website Management - Dashboard. 14 | * General Function - Product Search. 15 | 16 | # Technology 17 | The frameworks and libraries used for this app are listed below. 18 | * C#, ASP.NET MVC, WebAPI 19 | * Entity Framework (Code First) 20 | * SQL Server for persistence 21 | * Bootstrap, jQuery 22 | * Ninject for Dependency Injection 23 | * ASP.Net Identity: User and Role, Admin Area 24 | * Authentication and Authorization 25 | * Third-party Payment Gateway 26 | * Cache: Output Caching, ASP.NET Cache 27 | * Azure Deployment 28 | 29 | # Demo 30 | One available demo: 31 | * `Live Demo on Azure:` https://ect583final.azurewebsites.net/ 32 | 33 | *Note: The demo website may be slow when you access them for the first time. Be patient!* 34 | 35 | Try it out on Azure with the following accounts: 36 | * admin@gamestore.com / admin 37 | * advanced@gamestore.com / advanced 38 | * regular@gamestore.com / regular 39 | 40 | # Setup Locally 41 | ```bash 42 | git clone https://github.com/jojozhuang/game-store-aspnet.git 43 | ``` 44 | On Windows, open the project in Visual Studio, compile and run. Access http://localhost:5000/ in web browser, enjoy! 45 | 46 | # Portfolio 47 | Read portfolio [Online Game Store(ASP.NET)](https://jojozhuang.github.io/project/game-store-aspnet) to learn the main functions of this online store application. 48 | -------------------------------------------------------------------------------- /public/games.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bit-Developer/game-store-aspnet/b65c6ce8f0759ac97503470170624538473f634f/public/games.png --------------------------------------------------------------------------------