Beispiel #1
0
        // GET: NhanHieu
        public ActionResult Index(string searchString, int page = 1, int pageSize = 10)
        {
            var nhDao = new NhanHieuDAO();
            var dsNH  = nhDao.PhanTrang(searchString, page, pageSize);

            return(View());
        }
Beispiel #2
0
        public ActionResult Create(NhanHieu nh)
        {
            if (ModelState.IsValid)
            {
                var nhDao = new NhanHieuDAO();

                string maNH = nhDao.ThemMoiNhanHieu(nh);

                if (!string.IsNullOrEmpty(maNH))
                {
                    return(RedirectToAction("Index", "NhanHieu"));
                }
                else
                {
                    ModelState.AddModelError("", "Thêm nhãn hiệu thất bai");
                }
            }
            return(View(nh));
        }
Beispiel #3
0
        // GET: NhanHieu/Details/5
        public ActionResult Details(string id)
        {
            var ctNH = new NhanHieuDAO().XemChiTietNhanHieu(id);

            return(View());
        }