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")); } }
public ActionResult CreateSpecialized() { if ((string)Session["role"] == "Admin") { ViewBag.Nganh = MajorAction.GetAll(); ViewBag.Node = SpecializedAction.ShowAll(); return(View()); } else { return(Redirect("~/Home/Index")); } }
public ActionResult CreateClass() { if ((string)Session["role"] == "Admin") { ViewBag.nganh = SpecializedAction.GetAll(); ViewBag.Lop = ClassAction.ShowAll(); return(View()); } else { return(Redirect("~/Home/Index")); } }
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")); } }
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")); }
public ActionResult ThongTinMonHoc() { ViewBag.ChuyenNganh = SpecializedAction.GetAll(); return(View()); }