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
|
{
|
/// <summary>
|
/// 产品操作
|
/// </summary>
|
public class GwProductDao
|
{
|
|
private static GwProductDao _instance;
|
public static GwProductDao Instance
|
{
|
get {
|
if (_instance == null)
|
{
|
_instance = new GwProductDao();
|
}
|
return _instance;
|
}
|
}
|
|
/// <summary>
|
/// 查询启用的默认的产品
|
/// </summary>
|
/// <param name="clientID"></param>
|
/// <returns></returns>
|
public List<string> GetDefaultProduct()
|
{
|
List<string> list = new List<string>();
|
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;
|
}
|
}
|
}
|