/// <summary> /// 获得单个产品的详细信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public LubrFinancialGoodsEntity GetProductsDetailInfo(string id) { //var strsql = new StringBuilder(); //strsql.AppendFormat("SELECT * FROM FinancialGoods WHERE goodsid='{0}'",id); string sql = $@"SELECT * FROM FinancialGoods WHERE goodsid={id}"; LubrFinancialGoodsEntity productDetail = DataAccess.Select <LubrFinancialGoodsEntity>(sql).FirstOrDefault(); return(productDetail); }
// GET: LUBR/ProductDetails public ActionResult Index(string id) { LubrFinancialGoodsEntity productDetail = new LubrFinancialGoodsEntity(); if (id != "" && id != null) { productDetail = BusinessDataService.LubrProductsShowBLLService.GetProductsDetailInfo(id); } return(View(productDetail)); }