using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data;
//该源码下载自www.51aspx.com(５１ａｓｐｘ．ｃｏｍ)

namespace SK.MemberDAL
{
	/// <summary>
	/// ProductType 的摘要说明。
	/// </summary>
	public class ProductType
	{
		public ProductType()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		public DataSet List()
		{
			return SqlHelper.ExecuteDataset(Data.ConnString,CommandType.Text,"select * from ProductType");
		}
		public DataRow Info(object ProductTypeID)
		{
			SqlParameter[] oParms = new SqlParameter[1];
			oParms[0] = new SqlParameter("@ProductTypeID","ProductTypeID");
			using(DataSet ds = SqlHelper.ExecuteDataset(Data.ConnString,CommandType.Text,"select * from ProductType where ProductTypeID=@ProductTypeID",oParms))
			{
				if(ds.Tables[0].Rows.Count>0)
					return ds.Tables[0].Rows[0];
				else
					return null;
			}
		}
	}
}
