Ejemplo n.º 1
0
 public ActionResult CreateStudent()
 {
     if ((string)Session["role"] == "Admin")
     {
         var         student     = UserAction.GetAll();
         List <User> lst_student = new List <User>();
         for (int i = 0; i < student.Count; i++)
         {
             if (student[i].role == "Student" && StudentAction.Find(student[i].id_number) == null)
             {
                 lst_student.Add(student[i]);
             }
         }
         ViewBag.Account     = lst_student;
         ViewBag.Nganh       = MajorAction.GetAll();
         ViewBag.ChuyenNganh = SpecializedAction.GetAll();
         ViewBag.Lop         = ClassAction.GetAll();
         ViewBag.SV          = StudentAction.ShowAll();
         return(View());
     }
     else
     {
         return(Redirect("~/Home/Index"));
     }
 }
Ejemplo n.º 2
0
 public ActionResult CreateSpecialized()
 {
     if ((string)Session["role"] == "Admin")
     {
         ViewBag.Nganh = MajorAction.GetAll();
         ViewBag.Node  = SpecializedAction.ShowAll();
         return(View());
     }
     else
     {
         return(Redirect("~/Home/Index"));
     }
 }
Ejemplo n.º 3
0
 public ActionResult CreateClass()
 {
     if ((string)Session["role"] == "Admin")
     {
         ViewBag.nganh = SpecializedAction.GetAll();
         ViewBag.Lop   = ClassAction.ShowAll();
         return(View());
     }
     else
     {
         return(Redirect("~/Home/Index"));
     }
 }
Ejemplo n.º 4
0
 public ActionResult CreateSubject()
 {
     if ((string)Session["role"] == "Admin")
     {
         ViewBag.ChuyenNganh = SpecializedAction.GetAll();
         ViewBag.Nganh       = MajorAction.GetAll();
         ViewBag.Lop         = ClassAction.GetAll();
         ViewBag.MH          = SubjectAction.ShowAll();
         ViewBag.GV          = TeacherAction.GetAll();
         ViewBag.YearTerm    = YearTermAction.GetAll();
         return(View());
     }
     else
     {
         return(Redirect("~/Home/Index"));
     }
 }
Ejemplo n.º 5
0
 public ActionResult CreateSpecialized(string Id, string Specialized_Name, string Name_Class, string Subject_Name, string Major_Name)
 {
     SpecializedAction.Add_Specialized(Id, Specialized_Name, Name_Class, Subject_Name, Major_Name);
     return(Redirect("~/Subject/CreateSpecialized"));
 }
Ejemplo n.º 6
0
 public ActionResult ThongTinMonHoc()
 {
     ViewBag.ChuyenNganh = SpecializedAction.GetAll();
     return(View());
 }