コード例 #1
0
        public JsonResult getBM(string makhoa)
        {
            TieuChuanDTO tc    = new TieuChuanDTO();
            var          lstBM = tc.getBoMonTheoKhoa(makhoa);

            return(Json(new SelectList(lstBM, "tenbomon", "mabomon", JsonRequestBehavior.AllowGet)));
        }
コード例 #2
0
 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"));
 }
コード例 #3
0
        public List <TieuChuanDTO> SearchListTieuChuan(string valueToSearch)
        {
            List <TieuChuanDTO> List = new List <TieuChuanDTO>();
            string    query          = string.Format("SELECT * FROM dbo.TieuChuan WHERE CONCAT(MaTieuChuan, TenTieuChuan, NoiDungTieuChuan, GhiChu) LIKE N'%" + valueToSearch + "%'");
            DataTable dataTable      = DataBaseConnection.Instance.ExecuteQuery(query);

            foreach (DataRow dataRow in dataTable.Rows)
            {
                TieuChuanDTO tieuChuan = new TieuChuanDTO(dataRow);
                List.Add(tieuChuan);
            }
            return(List);
        }
コード例 #4
0
        public List <TieuChuanDTO> GetListTieuChuan()
        {
            List <TieuChuanDTO> List = new List <TieuChuanDTO>();
            string    query          = "SELECT * FROM dbo.TieuChuan";
            DataTable dataTable      = DataBaseConnection.Instance.ExecuteQuery(query);

            foreach (DataRow dataRow in dataTable.Rows)
            {
                TieuChuanDTO tieuChuan = new TieuChuanDTO(dataRow);
                List.Add(tieuChuan);
            }
            return(List);
        }
コード例 #5
0
 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"));
 }
コード例 #6
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"));
 }