using System.Collections.Generic; using System.Linq; using System.Web.Mvc; using WX.CRM.IBLL.Level2; using WX.CRM.IBLL.Util; using WX.CRM.Model.Entity; namespace WX.CRM.WEB.Controllers.Level2 { public class L2ProductController : Controller { // // GET: /L2Product/ [Ninject.Inject] public IL2_SOFT_BIGPRODUCT_Q soft_bigproduct_q { get; set; } [Ninject.Inject] public ICACHE_Q cache { get; set; } [HttpGet] public ActionResult GetZXL2Product() { List detail = cache.GetProductDetail(); detail = detail.Where(p => p.USECLIENT == 1).ToList(); return Json(new { Productlist = detail }, JsonRequestBehavior.AllowGet); } //[HttpGet] //public ActionResult GetPayProduct() //{ // List detail = cache.GetProductDetail(); // detail = detail.Where(p => p.USECLIENT == 2).ToList(); // return Json(new { Productlist = detail }, JsonRequestBehavior.AllowGet); //} [HttpGet] public ActionResult GetPayProduct(decimal? protype) { List detail = cache.GetProductDetail(); detail = detail.Where(p => p.USECLIENT == 2 && p.GROUPID == protype).ToList(); return Json(new { Productlist = detail }, JsonRequestBehavior.AllowGet); } [HttpGet] public ActionResult GetAllL2Product() { List detail = soft_bigproduct_q.GetProductDetail(null); return Json(new { Productlist = detail }, JsonRequestBehavior.AllowGet); } public ActionResult Test() { return View(); } } }