Beispiel #1
0
        public ActionResult GetSubCategoryList(Int64 Id)
        {
            ViewBag.Category = Convert.ToString(_productCategoryRepository.FindBy(x => x.ProductCategoryId == Id).Select(x => x.ProductCategoryName).FirstOrDefault()).ToUpper();
            SearchSubCategoryModel model = new SearchSubCategoryModel();

            model.CategoryId          = Id;
            model.getSubCategoryModel = _productSubCategoryRepository.GetProductSubCategoryList().Where(x => x.ProductCategoryId == Id && x.Status == (int)Status.Active && x.IsDeleted == false).ToList();

            return(View(model));
        }
Beispiel #2
0
        public ActionResult _GetSubCategoryList(SearchSubCategoryModel model)
        {
            var query = _productSubCategoryRepository.GetProductSubCategoryList().Where(x => x.ProductCategoryId == model.CategoryId && x.Status == (int)Status.Active && x.IsDeleted == false);

            if (!string.IsNullOrEmpty(model.Search))
            {
                query = query.Where(x => x.ProductSubCategoryName.Contains(model.Search));
            }
            model.getSubCategoryModel = query.ToList();

            return(PartialView(model));
        }