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 Ans With Query public ActionResult Answer(decimal QueryID = 0) { QueryDataContext loQueryContext = new QueryDataContext(); QueryModel loQuery = new QueryModel(); loQuery.loQueryData = loQueryContext.GetQueries(QueryID); return(View("Answer", loQuery)); }
//get Queries public ActionResult Queries() { QueryDataContext loQueryContext = new QueryDataContext(); List <QueryModel> loQueries = new List <QueryModel>(); loQueries = loQueryContext.GetQueries(); return(View(loQueries)); }