Ejemplo n.º 1
0
        public virtual int FillByWhereClause(Category.CategoriesDataTable 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 CategoryID, CategoryName, Description, 
Picture, CreateID, CreateUser, ModifyID, ModifyUser FROM Categories " +
                                  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);
        }
Ejemplo n.º 2
0
 public virtual Category.CategoriesDataTable GetDataBy(int CategoryID) {
     this.Adapter.SelectCommand = this.CommandCollection[1];
     this.Adapter.SelectCommand.Parameters[0].Value = ((int)(CategoryID));
     Category.CategoriesDataTable dataTable = new Category.CategoriesDataTable();
     this.Adapter.Fill(dataTable);
     return dataTable;
 }
Ejemplo n.º 3
0
 public virtual Category.CategoriesDataTable GetData() {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     Category.CategoriesDataTable dataTable = new Category.CategoriesDataTable();
     this.Adapter.Fill(dataTable);
     return dataTable;
 }