Пример #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));
        }
Пример #2
0
        public HttpResponseMessage GetProductSubCategoryList()
        {
            ResponseWithData <List <GetProductSubCategoryModel> > _response = new ResponseWithData <List <GetProductSubCategoryModel> >();
            var _getList = _productSubCategoryRepository.GetProductSubCategoryList().Where(x => x.Status == (int)Status.Active && x.IsDeleted == false).ToList();

            if (_getList.Count > 0)
            {
                _response.Type    = "success";
                _response.Message = "success";
                _response.data    = _getList;
                return(Request.CreateResponse(HttpStatusCode.OK, _response));
            }
            else
            {
                _response.Type    = "error";
                _response.Message = "No record found";
                _response.data    = null;
                return(Request.CreateResponse(HttpStatusCode.OK, _response));
            }
        }
Пример #3
0
        public ActionResult GetProductSubCategoryList()
        {
            var list = _productSubCategoryRepository.GetProductSubCategoryList().Where(x => x.Status == (int)Status.Active && x.IsDeleted == false).ToList();

            return(View(list));
        }