コード例 #1
0
        public virtual int FillByWhereClause(Emails.CustomerEmailsDataTable dataTable, string whereClause, System.Data.OleDb.OleDbParameter[] parameters)
        {
            System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand();
            command.Connection = this.Connection;
            this._commandCollection[0].CommandText = @"SELECT ID, Email, CustomerID, CreateID, CreateUser, ModifyID, ModifyUser FROM CustomerEmails "
                                                     + whereClause + ";";

            command.CommandType = System.Data.CommandType.Text;

            if (null != parameters)
            {
                command.Parameters.AddRange(parameters);
            }

            this.Adapter.SelectCommand = command;
            if ((this.ClearBeforeFill == true))
            {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);

            return(returnValue);
        }
コード例 #2
0
 public virtual Emails.CustomerEmailsDataTable GetDataBy(int ID) {
     this.Adapter.SelectCommand = this.CommandCollection[1];
     this.Adapter.SelectCommand.Parameters[0].Value = ((int)(ID));
     Emails.CustomerEmailsDataTable dataTable = new Emails.CustomerEmailsDataTable();
     this.Adapter.Fill(dataTable);
     return dataTable;
 }
コード例 #3
0
 public virtual Emails.CustomerEmailsDataTable GetDataByCustomerId(string CustomerID) {
     this.Adapter.SelectCommand = this.CommandCollection[2];
     if ((CustomerID == null)) {
         this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value;
     }
     else {
         this.Adapter.SelectCommand.Parameters[0].Value = ((string)(CustomerID));
     }
     Emails.CustomerEmailsDataTable dataTable = new Emails.CustomerEmailsDataTable();
     this.Adapter.Fill(dataTable);
     return dataTable;
 }
コード例 #4
0
 public virtual Emails.CustomerEmailsDataTable GetData() {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     Emails.CustomerEmailsDataTable dataTable = new Emails.CustomerEmailsDataTable();
     this.Adapter.Fill(dataTable);
     return dataTable;
 }