/// <summary>
        /// page nen co gia tri mac dinh
        /// </summary>
        /// <returns></returns>

        public ActionResult Index(int page = 1, string searchValue = "")
        {
            int pageSize = 4;
            int rowCount = 0;
            //Muốn sử dụng out bắt buộc phải chỉ định giá trị trước khi sử dụng
            List <Supplier> listOfSupplier = CatalogBLL.ListOfSuppliers(page, pageSize, searchValue, out rowCount);
            var             model          = new Models.SupplierPaginationResult()
            {
                // set :
                Page       = page,
                PageSize   = pageSize,
                RowCount   = rowCount,
                SeachValue = searchValue,
                Data       = listOfSupplier
            };

            return(View(model));

            //int pageSize = 3;
            //int rowCount = 0;
            //List<Supplier> model = CatalogBLL.ListOfSuppliers(page, pageSize, searchValue, out rowCount);

            //ViewBag.RowCount = rowCount;
            //ViewData
            //// truyen model (list) ve View
            //return View(model);
        }
        /// <summary>
        /// Trang hiển thị : danh sách suppliers, các "liên kết đến" các chức năng liên quan
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            var model = new Models.SupplierPaginationResult()
            {
                Page        = page,
                PageSize    = AppSettings.DefaultPageSize,
                RowCount    = CatalogBLL.Supplier_Count(searchValue),
                Data        = CatalogBLL.Supplier_List(page, AppSettings.DefaultPageSize, searchValue),
                SearchValue = searchValue,
            };

            return(View(model));
        }
Esempio n. 3
0
        /// <summary>
        /// View page: List of suppliers
        /// </summary>
        /// <param name="page"></param>
        /// <param name="searchValue"></param>
        /// <returns></returns>
        public IActionResult Index(int page = 1, string searchValue = "")
        {
            int             rowCount       = 0;
            int             pageSize       = 10;
            List <Supplier> listOfSupplier = CatalogBLL.ListOfSupplier(page, pageSize, searchValue ?? "", out rowCount);

            var model = new Models.SupplierPaginationResult()
            {
                Page        = page,
                Data        = listOfSupplier,
                PageSize    = pageSize,
                RowCount    = rowCount,
                SearchValue = searchValue,
            };

            return(View(model));
        }
Esempio n. 4
0
        /// <summary>
        /// trang hiên rthij danh sách các supplier các liên kết liên quan
        /// </summary>
        /// <returns></returns>
        // GET: Supplier
        public ActionResult Index(int page = 1, string searchValue = "", string country = "")
        {
            var model = new Models.SupplierPaginationResult()
            {
                SearchValue = searchValue,
                Country     = country,
                Page        = page,
                PageSize    = AppSettings.DefaultPagesize,
                RowCount    = CatalogBLL.Supplier_Count(searchValue, country),
                Data        = CatalogBLL.Suppliers_List(page, AppSettings.DefaultPagesize, searchValue, country)
            };

            //var listofSuppliers = CatalogBLL.Suppliers_List(page, 10, searchValue);
            //int rowcount = CatalogBLL.Supplier_count(searchValue);
            //ViewBag.Count = rowcount;
            return(View(model));
        }
        /// <summary>
        /// Trang chủ của nhà cung cấp
        /// </summary>
        /// <returns></returns>
        // GET: Supplier
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            int             pageSize       = 3;
            int             rowCount       = 0;
            List <Supplier> listOfSupplier = CataLogBLL.ListOfSupplier(page, pageSize, searchValue, out rowCount);
            var             model          = new Models.SupplierPaginationResult()
            {
                Page        = page,
                PageSize    = pageSize,
                RowCount    = rowCount,
                Data        = listOfSupplier,
                SearchValue = searchValue
            };

            //  int pagesize = 3;
            // int rowcount = 0;
            // list<supplier> model = catalogbll.listofsupplier(page, pagesize, searchvalue, out rowcount);
            //  viewbag.rowcount = rowcount;
            return(View(model));
        }
        // GET: Supplier
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            int pageSize = 10;
            int rowCount = 0;
            List <SuppliSer> ListOfSupplier = CatalogBLL.ListOfSuppliers(page, pageSize, searchValue, out rowCount);
            var model = new Models.SupplierPaginationResult()
            {
                Page        = page,
                PageSize    = pageSize,
                RowCount    = rowCount,
                SearchValue = searchValue,
                Data        = ListOfSupplier
            };

            return(View(model));
            //int pageSize = 3;
            //int rowCount = 0;
            //List<Supplier> model = CatalogBLL.ListOfSuppliers(page, pageSize, searchValue, out rowCount);
            //ViewBag.RowCount = rowCount;
            //return View(model);
        }