Ejemplo n.º 1
0
        public ActionResult EditProductSubCategory(Int64 Id)
        {
            ViewBag.BindProductCategory = _productCategoryRepository.FindBy(x => x.Status == (int)Status.Active && x.IsDeleted == false).ToList();
            var details = _productSubCategoryRepository.FindBy(x => x.ProductSubCategoryId == Id).FirstOrDefault();
            var model   = Mapper.Map <ProductSubCategory, ProductSubCategoryModel>(details);

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult GetProductList(Int64 Id)
        {
            ViewBag.SubCategory = Convert.ToString(_productSubCategoryRepository.FindBy(x => x.ProductSubCategoryId == Id).Select(x => x.ProductSubCategoryName).FirstOrDefault()).ToUpper();
            SearchProductModel model = new SearchProductModel();

            model.SubCategoryId   = Id;
            model.getProductModel = _productRepository.GetProductList().Where(x => x.ProductSubCategoryId == Id && x.Status == (int)Status.Active && x.IsDeleted == false).ToList();

            return(View(model));
        }
Ejemplo n.º 3
0
        public HttpResponseMessage GetProductSubCategoryById(Int64 productSubCategoryId)
        {
            ResponseWithData <ProductSubCategory> _response = new ResponseWithData <ProductSubCategory>();
            var _getDetails = _productSubCategoryRepository.FindBy(x => x.ProductSubCategoryId == productSubCategoryId && x.Status == (int)Status.Active && x.IsDeleted == false).FirstOrDefault();

            if (_getDetails != null)
            {
                _response.Type    = "success";
                _response.Message = "success";
                _response.data    = _getDetails;
                return(Request.CreateResponse(HttpStatusCode.OK, _response));
            }
            else
            {
                _response.Type    = "error";
                _response.Message = "Invalid Brand";
                _response.data    = null;
                return(Request.CreateResponse(HttpStatusCode.OK, _response));
            }
        }