日期:2011-10-24  浏览次数:20493 次

 
public class Command
{
  //private DBParameters m_Parameters;
  /// <summary>
  /// 数据库命令,System.Data.IDbCommand接口类型
  /// </summary>
  private System.Data.IDbCommand m_command;
  /// <summary>
  /// 内部参数,每页的纪录数
  /// </summary>
  private int m_PageSize;
  /// <summary>
  /// 总共的页数
  /// </summary>
  private int m_PageCount;
  /// <summary>
  /// 总共的纪录数
  /// </summary>
  private int m_RecordCount;
        /// <summary>
  /// SQL语句及存储过程的命令文本,字符串类型
  /// </summary>
  private string m_CommandText;
  
  /// <summary>
  /// 命令参数集合
  /// </summary>
  private System.Collections.Hashtable m_Parameter;
  /// <summary>
  /// 只写属性,将连接字符串在Config文件中的键名赋值进来
  /// </summary>
  [Category("(Data Binding)"),Description("数据库连接字符串在Config文件中的键名")]
  public string ConnectionSetName
  {
   set
   {
    Provider.ConnectionSetName=value;
   }
  }
  /// <summary>
  /// 只读属性,返回总共的页数
  /// </summary>
  [Browsable(false)]
  public int PageCount
  {
   get
   {
    return this.m_PageCount;
   }
  }
  /// <summary>
  /// 只写属性,设置每页的纪录数
  /// </summary>
  [Category("Pager Info"),Description("每页显示的纪录数")]
  public int PageSize
  {
   set
   {
    this.m_PageSize=value;
   }
  }
  /// <summary>
  /// 只读属性,获得总共的纪录数
  /// </summary>
  [Browsable(false)]
  public int RecordCount
  {
   get
   {
    return this.m_RecordCount;
   }
  }
  /// <summary>
  /// 构造方法
  /// </summary>
  public Command()
  {
   this.m_PageCount=0;
   this.m_PageSize=0;
   this.m_RecordCount=0;
   m_CommandText="";
   m_Parameter=new System.Collections.Hashtable();
  }
  /// <summary>
  /// 只写属性,连接字符串,注意,本属性可以覆盖ConnectionSetName属性的值
  /// </summary>
  [Browsable(true),Category("(Data Binding)"),Description("设置数据库连接字符串"),Editor(typeof(FolderNameEditor), typeof(UITypeEditor))]
  public string test
  {
   get
   {
    System.Resources.ResourceManager rm=new System.Resources.ResourceManager(typeof(Command));
    return rm.GetString("hello");
   }
  }
  public string ConnectionString
  {
   set
   {
    Provider.ConnectionString=value;
   }
  }
  
  /// <summary>
  /// 字符串类型,SQL语句及存储过程的命令文本,只读
  //