public ActionResult ProfileView() { try { if (Session["ModId"] != null) { UserDAO udao = new UserDAO(); ModeratorDAO dao = new ModeratorDAO(); SellDAO sdao = new SellDAO(); ApplicationDAO adao = new ApplicationDAO(); ViewBag.Mod = dao.SearchById(int.Parse(Session["ModId"].ToString())); User u = udao.SearchById(int.Parse(Session["Id"].ToString())); ViewBag.NewUser = udao.GetMonthUsers().Count; ViewBag.NewGame = adao.GetGamesMonth().Count; ViewBag.NewSoft = adao.GetSoftwareMonth().Count; ViewBag.NewMob = adao.GetMobileMonth().Count; ViewBag.SaleCount = sdao.Get7DaysSells(); ViewBag.User = u; return(View()); } else { return(RedirectToAction("../Home/Index")); } } catch { return(RedirectToAction("Index", "Home")); } }