/// <summary> /// 老客户回访 /// 商品存在于老客户关联商品时就显示关联的老客户回访 /// 不存在就显示全部的当前企业的老客户回访记录 /// </summary> /// <param name="goodsID"></param> /// <param name="PageSize"></param> /// <returns></returns> public ActionResult GetReturnVisit(int goodsID, int pageIndex = 1, int pageSize = 10, string EnterpriseID = "") { VistJoinGoodsBll objVistJoinGoodsBll = new VistJoinGoodsBll(); var data = objVistJoinGoodsBll.GetForGoodsInfo(goodsID, pageIndex, pageSize, EnterpriseID); //不管有没有都返回 前端去判断是否要重新绘制 return Content(JsonConvert.SerializeObject(data)); }
public ActionResult Edit(int id = 0) { ReturnVisitBll bll = new ReturnVisitBll(); //控制器不要写业务逻辑 只需调用Bll写好的业务方法 //方便以后业务改了就不需要改控制器 //查询数据时必须要带企业ID的参数 var model = bll.GetByID(id, LoginUser.UserBasic.EnterpriseID); ViewBag.VistType = new SelectList(new SelectLists().GetVistType(), "Value", "Text", model.VistType); VistJoinGoodsBll objVistJoinGoodsBll = new VistJoinGoodsBll(); ViewBag.VistJoinGoods = objVistJoinGoodsBll.GetListByReturnVisitID(id); return(View(model)); }
public ActionResult Edit(int id = 0) { ReturnVisitBll bll = new ReturnVisitBll(); //控制器不要写业务逻辑 只需调用Bll写好的业务方法 //方便以后业务改了就不需要改控制器 //查询数据时必须要带企业ID的参数 var model = bll.GetByID(id, LoginUser.UserBasic.EnterpriseID); ViewBag.VistType = new SelectList(new SelectLists().GetVistType(), "Value", "Text", model.VistType); VistJoinGoodsBll objVistJoinGoodsBll = new VistJoinGoodsBll(); ViewBag.VistJoinGoods = objVistJoinGoodsBll.GetListByReturnVisitID(id); return View(model); }