using System; using System.Collections.Generic; using System.Linq; using System.Text; using Model; using Common; using Oracle.DataAccess.Client; using System.Data.Common; namespace Dao { /// /// 产品操作 /// public class GwProductDao { private static GwProductDao _instance; public static GwProductDao Instance { get { if (_instance == null) { _instance = new GwProductDao(); } return _instance; } } /// /// 查询启用的默认的产品 /// /// /// public List GetDefaultProduct() { List list = new List(); using (OracleDataReader reader = OracleHelper.ExecuteReader(string.Format("select id from GW_PRODUCT t where is_default=1 and is_enable=1 and classes=1"), OracleHelper.Connection)) { while (((DbDataReader)reader).Read()) { string id = reader.GetString(0); if(!string.IsNullOrEmpty(id)) { list.Add(id); } } } return list; } } }