using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data;

namespace SK.MemberDAL
{
	/// <summary>
	/// MailingList 的摘要说明。
	/// </summary>
	public class MailingList
	{
		/// <summary>
		/// 邮件列表
		/// </summary>
		public MailingList()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		/// <summary>
		/// 添加邮件列表类别
		/// </summary>
		/// <param name="Name">类别名</param>
		public void Add(object Name)
		{
			SqlParameter[] oParms =new SqlParameter[1];
			oParms[0] = new SqlParameter("@Name",Name);
			SqlHelper.ExecuteNonQuery(Data.ConnString, CommandType.Text,"Insert into MaillingList([Name]) values(@Name)", oParms) ;
		}
		/// <summary>
		/// 返回所有的邮件列表类别
		/// </summary>
		/// <returns></returns>
		public DataSet List()
		{
			return SqlHelper.ExecuteDataset(Data.ConnString, CommandType.Text, "select * from MailingList");
		}
	}
}
