public ActionResult Create() { try { User user = (User)Session["User"]; CoinflipViewModel coinflipViewModel = new CoinflipViewModel(); coinflipViewModel.Inventory = skinRepository.GetAllFromInv(user, true); coinflipViewModel.OrderedSkins = coinflipViewModel.ChunkBy(coinflipViewModel.Inventory.Skins, 16); Session["CVM"] = coinflipViewModel; return(View(coinflipViewModel)); } catch { return(RedirectToAction("Index", "Account")); } }
public ActionResult Index() { try { User user = (User)Session["User"]; TradeViewModel withdrawViewModel = new TradeViewModel(24); withdrawViewModel.Inventory = skinRepository.GetAllFromInv(user, true); withdrawViewModel.SortInventory(); Session["WVM"] = withdrawViewModel; return(View(withdrawViewModel)); } catch { return(RedirectToAction("Index", "Account")); } }
public ActionResult Index() { try { User user = (User)Session["User"]; TradeViewModel depositViewModel = new TradeViewModel(16); depositViewModel.Inventory = skinRepository.GetAllFromInv(user, false); depositViewModel.SortInventory(); Session["DVM"] = depositViewModel; return(View(depositViewModel)); } catch { return(RedirectToAction("Index", "Account")); } }
//METHODS private void LoadInventoryPage() { invSlots = new List <Panel> { pnInvSlot1, pnInvSlot2, pnInvSlot3, pnInvSlot4, pnInvSlot5, pnInvSlot6, pnInvSlot7, pnInvSlot8, pnInvSlot9, pnInvSlot10, pnInvSlot11, pnInvSlot12, pnInvSlot13, pnInvSlot14, pnInvSlot15, pnInvSlot16, pnInvSlot17, pnInvSlot18, pnInvSlot19, pnInvSlot20, pnInvSlot21, pnInvSlot22, pnInvSlot23, pnInvSlot24, pnInvSlot25, pnInvSlot26, pnInvSlot27, pnInvSlot28, pnInvSlot29, pnInvSlot30 }; dudInvSorter.SelectedIndex = 0; dudInvFilter.SelectedIndex = 0; invIndex = 0; invFilter = null; inventory = RepoSkin.GetAllFromInv(user, false); SortInventory("Acquired"); }