Exemplo n.º 1
0
        public ActionResult Seacrh(int?danhmuc, string TenSp, decimal?GiaNhap)
        {
            List <DanHMuc> dm = DanhMucMager.getAllDanhMuc();

            ViewBag.danhmuc = new SelectList(dm, "MaDM", "TenDM");

            List <SanPham> lstsp  = SanPhamMager.GetSPbyDM(danhmuc);
            List <SanPham> lstsp1 = SanPhamMager.GetSPbytensp(TenSp);

            lstsp.AddRange(lstsp1);

            List <SanPham> lstsp2 = SanPhamMager.GetSpByGiaNhap(GiaNhap);

            lstsp.AddRange(lstsp2);
            return(View("Index", lstsp));
        }