Ejemplo n.º 1
0
        public ActionResult user(int id = -1)
        {
            if (Session["UserId"] == null)
            {
                return(RedirectToAction("LogIn"));
            }
            else
            {
                ViewBag.getCrs    = CourseBL.DisplayAll();
                ViewBag.Model     = CourseBL.getCourseById(id);
                ViewBag.Doc       = CourseBL.getInsByCid(id, "دكتور");
                ViewBag.Assistant = CourseBL.getInsByCid(id, "معيد");
                ViewBag.getSpe    = CourseBL.GetSpecializationsByCid(id);
                ViewBag.getSec    = SectionBL.DisplayAllSections();

                ViewBag.getQues         = SectionBL.DisplayAllQuestions();
                ViewBag.SelectedItemDDL = id;
                // UserInfo u = new UserInfo();
                //Session["UserId"] = u.userId;
                ViewBag.UserId = Session["userId"];

                return(View());
            }
        }
Ejemplo n.º 2
0
 public ActionResult questionManagement(int id = -1)
 {
     ViewBag.getSec  = SectionBL.DisplayAllSectionsThatHaveQuestion();
     ViewBag.getQues = SectionBL.DisplayAllQuestions(id);
     return(View());
 }