protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); ViewBag.Title += " - Sản phẩm"; //đặt activetab cố định cho controller này this._current_activetab(); //load những dữ liệu common //active only NhomSanPhamController ctr_nhom = new NhomSanPhamController(); ViewBag.NhomSanpham2_ListAll = ctr_nhom.timkiem(); //active only HangSXController ctr_hangsx = new HangSXController(); ViewBag.HangSX_ListAll = ctr_hangsx.timkiem(); // KichThuocController ctr_kichthuoc = new KichThuocController(); ViewBag.KichThuoc_ListAll = ctr_kichthuoc.timkiem(); // MauSacController ctr_mausac = new MauSacController(); ViewBag.MauSac_ListAll = ctr_mausac.timkiem(); ViewBag.ChiTietSP = new ChiTietSP();//may be override by action }
public ActionResult Index(int page=1) { //check if (!this._nhanvien_permission.Contains("mausac_view")) { return this._fail_permission("mausac_view"); } //Chọn danh sách để hiển thị theo cookies tìm kiếm MauSacController ctr = new MauSacController(); ViewBag.mausac_List = ctr.timkiem( timkiem_mausac["id"], timkiem_mausac["giatri"], timkiem_mausac["mota"], timkiem_mausac["active"], "id", true, 0, -1 ); //set search cookies ViewBag.timkiem_mausac = this.timkiem_mausac; ViewBag.Title += " - Quản lý"; return View(); }