using Ninject; using System.Web.Mvc; using WX.CRM.Common; using WX.CRM.IBLL.Csvr; using WX.CRM.IBLL.QH; using WX.CRM.IBLL.Res; using WX.CRM.IBLL.Util; using WX.CRM.Model.Entity; namespace WX.CRM.WEB.Controllers.QH { public class RiskRecordController : Controller { ValidationErrors errors = new ValidationErrors(); [Inject] public IQH_CUSTOMER_RESID QH_CustomerResId_BL { get; set; } [Inject] public ICACHE_Q _cacheQ { get; set; } [Inject] public IRES_CUSTOMER_Q res_Customer_Q_BL { get; set; } [Inject] public IRES_CUSTOMER res_Customer_BL { get; set; } [Inject] public ICSVR_CALLRECORD csvr_CallRecord_BL { get; set; } [Inject] public ICSVR_CALLRECORD_Q _CSVR_CALLRECORD_Q { get; set; } public RiskRecordController() { } [HttpGet] public ActionResult Index(string usercard, decimal? recordid) { var model = QH_CustomerResId_BL.Get(m => m.USERCARD == usercard && m.RECORDID == recordid); var record = new CSVR_CALLRECORD(); if (model != null) { record = csvr_CallRecord_BL.Get(m => m.RECORDID == model.RECORDID); if (record == null) { record = new CSVR_CALLRECORD(); } } else { model = new QH_CUSTOMER_RESID(); } var cti = _CSVR_CALLRECORD_Q.Sys_Environment_CTI_VER(); ViewBag.Record = record; ViewBag.CTI = cti; return View(model); } } }