public ActionResult Index()
 {
     if (Session["TaiKhoan"] != null)
     {
         TieuChuanDTO tc      = new TieuChuanDTO();
         var          lstKhoa = tc.getAllKhoa().OrderBy(n => n.makhoa);
         ViewBag.DMKhoa  = lstKhoa.Select(i => new { TenKhoa = i.tenkhoa, MaKhoa = i.makhoa });
         ViewBag.DMKhoa1 = new SelectList(db.dm_khoa.ToList().OrderBy(n => n.makhoa), "makhoa", "tenkhoa");
         return(View());
     }
     return(RedirectToAction("DangNhap", "TaiKhoan"));
 }
 public ActionResult ThongTinBoMonPartial()
 {
     if (Session["TaiKhoan"] != null)
     {
         TieuChuanDTO tc      = new TieuChuanDTO();
         var          lstKhoa = tc.getAllKhoa().OrderBy(n => n.makhoa);
         ViewBag.DMKhoa  = lstKhoa.Select(i => new { TenKhoa = i.tenkhoa, MaKhoa = i.makhoa });
         ViewBag.DMKhoa1 = new SelectList(db.dm_khoa.ToList().OrderBy(n => n.makhoa), "makhoa", "tenkhoa");
         var model = db.dm_bomon;
         return(PartialView("_ThongTinBoMonPartial", model.OrderBy(n => n.mabomon).ToList()));
     }
     return(RedirectToAction("DangNhap", "TaiKhoan"));
 }
Пример #3
0
 public ActionResult QuanLyNguoiDungPartial()
 {
     if (Session["TaiKhoan"] != null)
     {
         TieuChuanDTO tc       = new TieuChuanDTO();
         var          lstKhoa  = tc.getAllKhoa().OrderBy(n => n.makhoa);
         var          lstBoMon = tc.getAllBoMon().OrderBy(n => n.mabomon);
         ViewBag.DMKhoa  = lstKhoa.Select(i => new { TenKhoa = i.tenkhoa, MaKhoa = i.makhoa });
         ViewBag.DMBoMon = lstBoMon.Select(i => new { TenBM = i.tenbomon, MaBM = i.mabomon });
         var model = db1.ht_dm_nsd;
         return(PartialView("_QuanLyNguoiDungPartial", model.OrderByDescending(n => n.ngaytao).ToList()));
     }
     return(RedirectToAction("DangNhap", "TaiKhoan"));
 }