ComplianceServer/oldcode/WEB/Controllers/Level2/L2ProductController.cs

57 lines
1.7 KiB
C#

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<L2Soft_ProductDetail> detail = cache.GetProductDetail();
detail = detail.Where(p => p.USECLIENT == 1).ToList();
return Json(new { Productlist = detail }, JsonRequestBehavior.AllowGet);
}
//[HttpGet]
//public ActionResult GetPayProduct()
//{
// List<L2Soft_ProductDetail> 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<L2Soft_ProductDetail> 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<L2Soft_ProductDetail> detail = soft_bigproduct_q.GetProductDetail(null);
return Json(new { Productlist = detail }, JsonRequestBehavior.AllowGet);
}
public ActionResult Test()
{
return View();
}
}
}