Example #1
0
        // GET: Products
        public ActionResult Index(String id)
        {
            if (id != null && id != "")
            {
                Session["IDProvider"] = id;
            }
            else
            {
                Session["IDProvider"] = null;
            }

            var providers = productsProvidersB.GetAllProviders().ToList();

            ViewBag.id = new SelectList(providers, "IDProvider", "NameCompany");


            return(View(productsProvidersB.GetAll(Convert.ToInt32(id)).ToList()));
        }
Example #2
0
        // GET: Products
        public JsonResult GetAllProduct(string id)
        {
            var products = productsProvidersB.GetAll(Convert.ToInt32(id)).ToList();

            return(Json(products, JsonRequestBehavior.AllowGet));
        }