public ActionResult AboutUs() { QueryDataContext loQContext = new QueryDataContext(); List <QueryModel> loq = new List <QueryModel>(); loq = loQContext.GetQueries(); var c = 0; foreach (var d in loq) { if (d.Answer != null) { c++; } } TempData["Q"] = loq.Count(); TempData["TA"] = c; AdminDataContext loEduContext = new AdminDataContext(); List <UserModel> loUsers = new List <UserModel>(); loUsers = loEduContext.GetUsers(); TempData["U"] = loUsers.Count(); TempData["FC"] = loEduContext.GetFeedBacksAndComplaints().Count(); return(View()); }
// GET: Admin/Deshbord public ActionResult Index() { AdminDataContext dbContext = new AdminDataContext(); List <UserModel> loUserList = new List <UserModel>(); loUserList = dbContext.GetUsers(); ViewBag.TotalUsers = loUserList.Count(); ViewBag.ActiveUsers = loUserList[0].ActiveUsers; ViewBag.DeactiveUsers = loUserList[0].DeactiveUsers; List <TutorialsModel> loTutorials = new List <TutorialsModel>(); loTutorials = dbContext.GetTutorials(); ViewBag.TotalTutorials = loTutorials.Count(); List <FeedBackModel> loFeedBackandComplaints = new List <FeedBackModel>(); loFeedBackandComplaints = dbContext.GetFeedBacksAndComplaints(); ViewBag.TotalComplaints = loFeedBackandComplaints[0].TotalComplaints; ViewBag.TotalFeedBacks = loFeedBackandComplaints[0].TotalFeedBacks; ViewBag.SolvedComplaints = loFeedBackandComplaints[0].SolvedComplaints; return(View()); }