Esempio n. 1
0
        // GET: Admin/Monster
        public async Task <ActionResult> Index(int page = 1)
        {
            var list   = (await QuestFacade.GetAllQuestsAsync()).ToList();
            var toShow = list.Skip((page - 1) * 10).Take(10);

            ViewBag.Count   = list.Count;
            ViewBag.Current = page;
            return(View("~/Views/Admin/Quest/Index.cshtml", toShow));
        }
Esempio n. 2
0
        // GET: DashBoard
        public async Task <ActionResult> Index()
        {
            var itemsList = (await EquipmentFacade.GetAllItemsAsync()).ToList();

            ViewBag.Items     = itemsList.Count(a => a.ShopId == null);
            ViewBag.ShopItems = itemsList.Count(a => a.ShopId != null);
            ViewBag.Monsters  = (await MonsterFacade.GetAllMonstersAsync()).Count();
            ViewBag.Quests    = (await QuestFacade.GetAllQuestsAsync()).Count();
            ViewBag.Mini      = (await MiniLocationFacade.GetAllItemsAsync()).Count();
            ViewBag.Locations = (await LocationFacade.GetAllAsync()).Count();
            return(View());
        }