/// <summary>
        ///     Returns rows from the DataSource that meet the parameter conditions.
        /// </summary>
        /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
        /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
        /// <returns>Returns a typed collection of <c>VStoreWithDemographics</c> objects.</returns>
        public virtual VList <VStoreWithDemographics> Find(IFilterParameterCollection parameters, string orderBy)
        {
            int count = 0;

            return(Find(parameters, orderBy, 0, defaultMaxRecords, out count));
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Returns rows from the DataSource that meet the parameter conditions.
        /// </summary>
        /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
        /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
        /// <returns>Returns a typed collection of <c>VProductAndDescription</c> objects.</returns>
        public virtual VList <VProductAndDescription> Find(IFilterParameterCollection parameters, string orderBy)
        {
            int count = 0;

            return(Find(parameters, orderBy, 0, defaultMaxRecords, out count));
        }
 /// <summary>
 ///     Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <returns>Returns a typed collection of <c>VStoreWithDemographics</c> objects.</returns>
 public virtual VList <VStoreWithDemographics> Find(IFilterParameterCollection parameters)
 {
     return(Find(parameters, null));
 }
 /// <summary>
 ///     Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <returns>Returns a typed collection of <c>VIndividualDemographics</c> objects.</returns>
 public virtual VList <VIndividualDemographics> Find(IFilterParameterCollection parameters)
 {
     return(Find(parameters, null));
 }
Exemplo n.º 5
0
 /// <summary>
 ///     Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <returns>Returns a typed collection of <c>VProductAndDescription</c> objects.</returns>
 public virtual VList <VProductAndDescription> Find(IFilterParameterCollection parameters)
 {
     return(Find(parameters, null));
 }
        /// <summary>
        /// Returns rows from the DataSource that meet the parameter conditions.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
        /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
        /// <param name="start">Row number at which to start reading.</param>
        /// <param name="pageLength">Number of rows to return.</param>
        /// <param name="count">out. The number of rows that match this query.</param>
        /// <returns>Returns a typed collection of VProductModelCatalogDescription objects.</returns>
        public override VList <VProductModelCatalogDescription> Find(TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy, int start, int pageLength, out int count)
        {
            SqlFilterParameterCollection filter = null;

            if (parameters == null)
            {
                filter = new SqlFilterParameterCollection();
            }
            else
            {
                filter = parameters.GetParameters();
            }

            SqlDatabase database       = new SqlDatabase(this._connectionString);
            DbCommand   commandWrapper = StoredProcedureProvider.GetCommandWrapper(database, "Production.usp_adwTiers_vProductModelCatalogDescription_Find_Dynamic", typeof(VProductModelCatalogDescriptionColumn), filter, orderBy, start, pageLength);

            SqlFilterParameter param;

            for (int i = 0; i < filter.Count; i++)
            {
                param = filter[i];
                database.AddInParameter(commandWrapper, param.Name, param.DbType, param.GetValue());
            }

            VList <VProductModelCatalogDescription> rows = new VList <VProductModelCatalogDescription>();
            IDataReader reader = null;

            try
            {
                if (transactionManager != null)
                {
                    reader = Utility.ExecuteReader(transactionManager, commandWrapper);
                }
                else
                {
                    reader = Utility.ExecuteReader(database, commandWrapper);
                }

                Fill(reader, rows, 0, int.MaxValue);
                count = rows.Count;

                if (reader.NextResult())
                {
                    if (reader.Read())
                    {
                        count = reader.GetInt32(0);
                    }
                }
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }

            return(rows);
        }
	/// <summary>
	/// Returns rows from the DataSource that meet the parameter conditions.
	/// </summary>
	/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
	/// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
	/// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
	/// <param name="start">Row number at which to start reading.</param>
	/// <param name="pageLength">Number of rows to return.</param>
	/// <param name="count">out. The number of rows that match this query.</param>
	/// <returns>Returns a typed collection of VJobCandidateEducation objects.</returns>
	public override VList<VJobCandidateEducation> Find(TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy, int start, int pageLength, out int count)
	{
		SqlFilterParameterCollection filter = null;
		
		if (parameters == null)
			filter = new SqlFilterParameterCollection();
		else 
			filter = parameters.GetParameters();
			
		SqlDatabase database = new SqlDatabase(this._connectionString);
		DbCommand commandWrapper = StoredProcedureProvider.GetCommandWrapper(database, "HumanResources.usp_adwTiers_vJobCandidateEducation_Find_Dynamic", typeof(VJobCandidateEducationColumn), filter, orderBy, start, pageLength);
		
		SqlFilterParameter param;

		for ( int i = 0; i < filter.Count; i++ )
		{
			param = filter[i];
			database.AddInParameter(commandWrapper, param.Name, param.DbType, param.GetValue());
		}

		VList<VJobCandidateEducation> rows = new VList<VJobCandidateEducation>();
		IDataReader reader = null;
		
		try
		{
			if ( transactionManager != null )
			{
				reader = Utility.ExecuteReader(transactionManager, commandWrapper);
			}
			else
			{
				reader = Utility.ExecuteReader(database, commandWrapper);
			}
			
			Fill(reader, rows, 0, int.MaxValue);
			count = rows.Count;
			
			if ( reader.NextResult() )
			{
				if ( reader.Read() )
				{
					count = reader.GetInt32(0);
				}
			}
		}
		finally
		{
			if ( reader != null )
				reader.Close();
		}
		
		return rows;
	}
Exemplo n.º 8
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(IFilterParameterCollection parameters, string orderBy)
 {
     return(Find((TransactionManager)null, parameters, orderBy));
 }
Exemplo n.º 9
0
        /// <summary>
        /// Returns rows from the DataSource that meet the parameter conditions.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
        /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
        /// <returns>Returns a typed collection of Entity objects.</returns>
        public virtual VList <Entity> Find(TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy)
        {
            int count = 0;

            return(Find(transactionManager, parameters, orderBy, 0, int.MaxValue, out count));
        }
Exemplo n.º 10
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(TransactionManager transactionManager, IFilterParameterCollection parameters)
 {
     return(Find(transactionManager, parameters, (string)null));
 }
Exemplo n.º 11
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <param name="sortColumns">A collection of <see cref="SqlSortColumn"/> objects.</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(TransactionManager transactionManager, IFilterParameterCollection parameters, ISortColumnCollection sortColumns)
 {
     return(Find(transactionManager, parameters, sortColumns.ToString()));
 }
Exemplo n.º 12
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <param name="sortColumns">A collection of <see cref="SqlSortColumn"/> objects.</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(IFilterParameterCollection parameters, ISortColumnCollection sortColumns)
 {
     return(Find((TransactionManager)null, parameters, sortColumns));
 }
Exemplo n.º 13
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
 /// <param name="start">Row number at which to start reading.</param>
 /// <param name="pageLength">Number of rows to return.</param>
 /// <param name="count">out. The number of rows that match this query.</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(IFilterParameterCollection parameters, string orderBy, int start, int pageLength, out int count)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 14
0
 /// <summary>
 ///     Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <returns>Returns a typed collection of <c>VJobCandidate</c> objects.</returns>
 public virtual VList <VJobCandidate> Find(IFilterParameterCollection parameters)
 {
     return(Find(parameters, null));
 }
 /// <summary>
 ///     Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <returns>Returns a typed collection of <c>VEmployee</c> objects.</returns>
 public virtual VList <VEmployee> Find(IFilterParameterCollection parameters)
 {
     return(Find(parameters, null));
 }
Exemplo n.º 16
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
 /// <param name="start">Row number at which to start reading.</param>
 /// <param name="pageLength">Number of rows to return.</param>
 /// <param name="count">out. The number of rows that match this query.</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(IFilterParameterCollection parameters, string orderBy, int start, int pageLength, out int count)
 {
     return(Find((TransactionManager)null, parameters, orderBy, start, pageLength, out count));
 }
        /// <summary>
        ///     Returns rows from the DataSource that meet the parameter conditions.
        /// </summary>
        /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
        /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
        /// <returns>Returns a typed collection of <c>VEmployee</c> objects.</returns>
        public virtual VList <VEmployee> Find(IFilterParameterCollection parameters, string orderBy)
        {
            int count = 0;

            return(Find(parameters, orderBy, 0, defaultMaxRecords, out count));
        }
Exemplo n.º 18
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter and sort conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <param name="sortColumns">A collection of <see cref="SqlSortColumn"/> objects.</param>
 /// <param name="start">Row number at which to start reading.</param>
 /// <param name="pageLength">Number of rows to return.</param>
 /// <param name="count">out. The number of rows that match this query.</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(IFilterParameterCollection parameters, ISortColumnCollection sortColumns, int start, int pageLength, out int count)
 {
     return(Find((TransactionManager)null, parameters, sortColumns.ToString(), start, pageLength, out count));
 }
Exemplo n.º 19
0
        /// <summary>
        ///     Returns rows from the DataSource that meet the parameter conditions.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
        /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
        /// <param name="start">Row number at which to start reading.</param>
        /// <param name="pageLength">Number of rows to return.</param>
        /// <param name="count">out. The number of rows that match this query.</param>
        /// <returns>Returns a typed collection of PetShop.Business.Product objects.</returns>
        public override TList <Product> Find(TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy, int start, int pageLength, out int count)
        {
            SqlFilterParameterCollection filter = null;

            if (parameters == null)
            {
                filter = new SqlFilterParameterCollection();
            }
            else
            {
                filter = parameters.GetParameters();
            }

            SqlDatabase database       = new SqlDatabase(this._connectionString);
            DbCommand   commandWrapper = StoredProcedureProvider.GetCommandWrapper(database, "dbo.Product_Find_Dynamic", typeof(ProductColumn), filter, orderBy, start, pageLength);

            SqlFilterParameter param;

            for (int i = 0; i < filter.Count; i++)
            {
                param = filter[i];
                database.AddInParameter(commandWrapper, param.Name, param.DbType, param.GetValue());
            }

            TList <Product> rows   = new TList <Product>();
            IDataReader     reader = null;

            try
            {
                //Provider Data Requesting Command Event
                OnDataRequesting(new CommandEventArgs(commandWrapper, "Find", rows));

                if (transactionManager != null)
                {
                    reader = Utility.ExecuteReader(transactionManager, commandWrapper);
                }
                else
                {
                    reader = Utility.ExecuteReader(database, commandWrapper);
                }

                Fill(reader, rows, 0, int.MaxValue);
                count = rows.Count;

                if (reader.NextResult())
                {
                    if (reader.Read())
                    {
                        count = reader.GetInt32(0);
                    }
                }

                //Provider Data Requested Command Event
                OnDataRequested(new CommandEventArgs(commandWrapper, "Find", rows));
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }

                commandWrapper = null;
            }

            return(rows);
        }
Exemplo n.º 20
0
 /// <summary>
 /// Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
 /// <param name="start">Row number at which to start reading.</param>
 /// <param name="pageLength">Number of rows to return.</param>
 /// <param name="count">out. The number of rows that match this query.</param>
 /// <returns>Returns a typed collection of Entity objects.</returns>
 public virtual VList <Entity> Find(TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy, int start, int pageLength, out int count)
 {
     count = 0;
     return(null);
 }
		/// <summary>
		/// 	Returns rows from the DataSource that meet the parameter conditions.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
		/// <param name="orderBy">Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);</param>
		/// <param name="start">Row number at which to start reading.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out. The number of rows that match this query.</param>
		/// <returns>Returns a typed collection of Nettiers.AdventureWorks.Entities.TransactionHistory objects.</returns>
		public override TList<TransactionHistory> Find(TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy, int start, int pageLength, out int count)
		{
			SqlFilterParameterCollection filter = null;
			
			if (parameters == null)
				filter = new SqlFilterParameterCollection();
			else 
				filter = parameters.GetParameters();
				
			SqlDatabase database = new SqlDatabase(this._connectionString);
			DbCommand commandWrapper = StoredProcedureProvider.GetCommandWrapper(database, "Production.usp_adwTiers_TransactionHistory_Find_Dynamic", typeof(TransactionHistoryColumn), filter, orderBy, start, pageLength);
		
			SqlFilterParameter param;

			for ( int i = 0; i < filter.Count; i++ )
			{
				param = filter[i];
				database.AddInParameter(commandWrapper, param.Name, param.DbType, param.GetValue());
			}

			TList<TransactionHistory> rows = new TList<TransactionHistory>();
			IDataReader reader = null;
			
			try
			{
				//Provider Data Requesting Command Event
				OnDataRequesting(new CommandEventArgs(commandWrapper, "Find", rows)); 

				if ( transactionManager != null )
				{
					reader = Utility.ExecuteReader(transactionManager, commandWrapper);
				}
				else
				{
					reader = Utility.ExecuteReader(database, commandWrapper);
				}
				
				Fill(reader, rows, 0, int.MaxValue);
				count = rows.Count;
				
				if ( reader.NextResult() )
				{
					if ( reader.Read() )
					{
						count = reader.GetInt32(0);
					}
				}
				
				//Provider Data Requested Command Event
				OnDataRequested(new CommandEventArgs(commandWrapper, "Find", rows)); 
			}
			finally
			{
				if ( reader != null )
					reader.Close();
					
				commandWrapper = null;
			}
			
			return rows;
		}
 /// <summary>
 ///     Returns rows from the DataSource that meet the parameter conditions.
 /// </summary>
 /// <param name="parameters">A collection of <see cref="SqlFilterParameter"/> objects.</param>
 /// <returns>Returns a typed collection of <c>VIndividualCustomer</c> objects.</returns>
 public virtual VList <VIndividualCustomer> Find(IFilterParameterCollection parameters)
 {
     return(Find(parameters, null));
 }