/// <summary> /// 查询指定对象的所有产品列表 /// </summary> public List <XCLCMS.Data.Model.Product> GetModelListByObject(Product_ObjectProductCondition condition) { Database db = base.CreateDatabase(); DbCommand dbCommand = db.GetSqlStringCommand(@" SELECT b.* FROM dbo.ObjectProduct AS a WITH(NOLOCK) INNER JOIN dbo.Product AS b WITH(NOLOCK) ON a.FK_ProductID=b.ProductID WHERE a.ObjectType=@ObjectType AND a.FK_ObjectID=@FK_ObjectID AND b.FK_MerchantID=@FK_MerchantID AND b.FK_MerchantAppID=@FK_MerchantAppID AND b.RecordState=@RecordState "); db.AddInParameter(dbCommand, "ObjectType", DbType.String, condition.ObjectType); db.AddInParameter(dbCommand, "FK_ObjectID", DbType.Int64, condition.ObjectID); db.AddInParameter(dbCommand, "FK_MerchantID", DbType.Int64, condition.FK_MerchantID); db.AddInParameter(dbCommand, "FK_MerchantAppID", DbType.Int64, condition.FK_MerchantAppID); db.AddInParameter(dbCommand, "RecordState", DbType.String, condition.RecordState); var ds = db.ExecuteDataSet(dbCommand); return(XCLNetTools.Generic.ListHelper.DataSetToList <XCLCMS.Data.Model.Product>(ds).ToList()); }
/// <summary> /// 查询指定对象的所有产品列表 /// </summary> public List <XCLCMS.Data.Model.Product> GetModelListByObject(Product_ObjectProductCondition condition) { return(dal.GetModelListByObject(condition)); }