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); }
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; }
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; }
public virtual Emails.CustomerEmailsDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; Emails.CustomerEmailsDataTable dataTable = new Emails.CustomerEmailsDataTable(); this.Adapter.Fill(dataTable); return dataTable; }