public virtual int FillByWhereClause(AccountDataset.AccountsDataTable dataTable, string whereClause, System.Data.OleDb.OleDbParameter[] parameters) { System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand(); command.Connection = this.Connection; command.CommandText = @"select * from (Select ""C-"" & CustomerID as ID, ""Customer"" AS CustomerSupplierFlag, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, '' as HomePage, CreateID, CreateUser, ModifyID, ModifyUser from Customers Union Select ""S-"" & SupplierID as ID, ""Supplier"" AS CustomerSupplierFlag, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage, CreateID, CreateUser, ModifyID, ModifyUser FROM Suppliers) as a " + 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 int Fill(AccountDataset.ChangeLogsDataTable dataTable, string ID, global::System.Nullable<int> MAX_SequenceNumber_, global::System.Nullable<int> MAX_SequenceNumber_1, string ChangeUser) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((ID == null)) { throw new global::System.ArgumentNullException("ID"); } else { this.Adapter.SelectCommand.Parameters[0].Value = ((string)(ID)); } if ((MAX_SequenceNumber_.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(MAX_SequenceNumber_.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } if ((MAX_SequenceNumber_1.HasValue == true)) { this.Adapter.SelectCommand.Parameters[2].Value = ((int)(MAX_SequenceNumber_1.Value)); } else { this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; } if ((ChangeUser == null)) { this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[3].Value = ((string)(ChangeUser)); } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int FillBy(AccountDataset.CustomersDataTable dataTable, 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)); } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int Fill(AccountDataset.CustomersDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int FillBy(AccountDataset.SuppliersDataTable dataTable, int SupplierID) { this.Adapter.SelectCommand = this.CommandCollection[2]; this.Adapter.SelectCommand.Parameters[0].Value = ((int)(SupplierID)); if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }
public virtual int FillBy(AccountDataset.AccountsDataTable dataTable, string ID) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((ID == null)) { throw new global::System.ArgumentNullException("ID"); } else { this.Adapter.SelectCommand.Parameters[0].Value = ((string)(ID)); } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }