// GET: Category
        public ActionResult Index(string searchValue = "")
        {
            var model = new Models.CategoryResult()
            {
                RowCount    = CatalogBLL.Category_Count(searchValue),
                Data        = CatalogBLL.Category_List(searchValue),
                SearchValue = searchValue
            };

            return(View(model));
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(string searchValue = "")
        {
            var model = new Models.CategoryResult
            {
                RowCount = CatalogBLL.Category_Count(searchValue),
                Data     = CatalogBLL.Category_List(searchValue),
            };

            //var listOfSuppliers = CatalogBLL.Supplier_List(page, 10, searchValue);
            //int rowCount = CatalogBLL.Supplier_Count(searchValue);
            //ViewBag.rc = rowCount;
            return(View(model));
        }
Exemplo n.º 3
0
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            var model = new Models.CategoryPaginationResult()
            {
                Page        = page,
                PageSize    = AppSettings.DefaultPageSize,
                RowCount    = CatalogBLL.Category_Count(searchValue),
                Data        = CatalogBLL.Categorys_List(page, AppSettings.DefaultPageSize, searchValue),
                searchValue = searchValue
            };

            return(View(model));
        }
Exemplo n.º 4
0
        // GET: Category
        /// <summary>
        /// Trang hiển thị danh sách các Category
        /// </summary>
        /// <param name="page"></param>
        /// <param name="searchValue"></param>
        /// <returns></returns>
        public ActionResult Index(int page = 1, string searchValue = "")
        {
            int pageSize = 999999;
            var model    = new Models.CategoryResult()
            {
                Page        = page,
                PageSize    = pageSize,
                RowCount    = CatalogBLL.Category_Count(searchValue),
                Data        = CatalogBLL.Category_List(page, pageSize, searchValue),
                searchValue = searchValue,
            };

            return(View(model));
        }
Exemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var model = new DashboardResult
            {
                sumSupplier = CatalogBLL.Supplier_Count(""),
                sumCustomer = CatalogBLL.Customer_Count(""),
                sumShipper  = CatalogBLL.Shipper_Count(""),
                sumCategory = CatalogBLL.Category_Count(""),
                sumProduct  = CatalogBLL.Product_Count("", "", ""),
                sumOrder    = SaleManagementBLL.Order_Count("", ""),
                sumEmployee = HumanResourceBLL.Employee_Count("", "")
            };

            return(View(model));
        }
        public ActionResult Index(int page = 1, string searchValue = "", int category = 0, int supplier = 0)
        {
            var model = new Models.ProductPaginationResult()
            {
                Page     = page,
                PageSize = AppSettings.DefaultPageSize,
                RowCount = CatalogBLL.Product_Count(searchValue, category, supplier),
                Data     = CatalogBLL.Products_List(page, AppSettings.DefaultPageSize, searchValue, category, supplier),
                Category = category,
                Supplier = supplier
            };

            ViewData["Category"] = CatalogBLL.Categorys_List(1, CatalogBLL.Category_Count(""), "");
            ViewData["Supplier"] = CatalogBLL.Suppliers_List(1, CatalogBLL.Supplier_Count(""), "");
            return(View(model));
        }
Exemplo n.º 7
0
        public static List <SelectListItem> Categories(bool allowSelectAll = true)
        {
            List <SelectListItem> list = new List <SelectListItem>();

            if (allowSelectAll)
            {
                list.Add(new SelectListItem()
                {
                    Value = "0", Text = "All Category"
                });
            }
            foreach (var item in CatalogBLL.Category_List(1, CatalogBLL.Category_Count(""), ""))
            {
                list.Add(new SelectListItem()
                {
                    Value = item.CategoryID.ToString(),
                    Text  = item.CategoryName,
                });
            }
            return(list);
        }