Example #1
0
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class INVStockType in the form of object of INVStockTypeCollection </returns>
		public INVStockTypeCollection SelectAll()
		{
			INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();
			foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectAll())
			{
				_iNVStockTypeWCF = new INVStockType();
				
				_iNVStockTypeWCF.StockTypeID = _iNVStockType.StockTypeID;
				_iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;
				
				iNVStockTypeCollection.Add(_iNVStockTypeWCF);
			}
			return iNVStockTypeCollection;
		}
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class INVStockType in the form of object of INVStockTypeCollection </returns>
        public INVStockTypeCollection SelectAll()
        {
            INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();

            foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectAll())
            {
                _iNVStockTypeWCF = new INVStockType();

                _iNVStockTypeWCF.StockTypeID   = _iNVStockType.StockTypeID;
                _iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;

                iNVStockTypeCollection.Add(_iNVStockTypeWCF);
            }
            return(iNVStockTypeCollection);
        }
        /// <summary>
        /// This method will return a list of objects representing the specified number of entries from the specified record number in the table
        /// using the value of the field specified
        /// </summary>
        ///
        /// <param name="field" type="string">Field of the class INVStockType</param>
        /// <param name="fieldValue" type="object">Value for the field specified.</param>
        /// <param name="fieldValue2" type="object">Value for the field specified.</param>
        /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
        /// <param name="orderByStatement" type="string">The field value to number.</param>
        /// <param name="pageSize" type="int">Number of records returned.</param>
        /// <param name="skipPages" type="int">The number of missing pages.</param>
        ///
        /// <returns>List of object of class INVStockType in the form of an object of class INVStockTypeCollection</returns>
        public INVStockTypeCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();

            foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _iNVStockTypeWCF = new INVStockType();

                _iNVStockTypeWCF.StockTypeID   = _iNVStockType.StockTypeID;
                _iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;

                iNVStockTypeCollection.Add(_iNVStockTypeWCF);
            }
            return(iNVStockTypeCollection);
        }
        /// <summary>
        /// This method will return a list of objects representing the specified number of entries from the specified record number in the table.
        /// </summary>
        ///
        /// <param name="pageSize" type="int">Number of records returned.</param>
        /// <param name="skipPages" type="int">The number of missing pages.</param>
        /// <param name="orderByStatement" type="string">The field value to number.</param>
        ///
        /// <returns>list of objects of class INVStockType in the form of an object of class INVStockTypeCollection </returns>
        public INVStockTypeCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();

            foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _iNVStockTypeWCF = new INVStockType();

                _iNVStockTypeWCF.StockTypeID   = _iNVStockType.StockTypeID;
                _iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;

                iNVStockTypeCollection.Add(_iNVStockTypeWCF);
            }
            return(iNVStockTypeCollection);
        }
        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified
        /// </summary>
        ///
        /// <param name="field" type="string">Field of the class INVStockType</param>
        /// <param name="fieldValue" type="object">Value for the field specified.</param>
        /// <param name="fieldValue2" type="object">Value for the field specified.</param>
        /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
        ///
        /// <returns>List of object of class INVStockType in the form of an object of class INVStockTypeCollection</returns>
        public INVStockTypeCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();

            foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _iNVStockTypeWCF = new INVStockType();

                _iNVStockTypeWCF.StockTypeID   = _iNVStockType.StockTypeID;
                _iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;

                iNVStockTypeCollection.Add(_iNVStockTypeWCF);
            }
            return(iNVStockTypeCollection);
        }
Example #6
0
		/// <summary>
		/// Populates the fields for multiple objects from the columns found in an open reader.
		/// </summary>
		///
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <returns>Object of INVStockTypeCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:12 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVStockTypeCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			INVStockTypeCollection list = new INVStockTypeCollection();
			
            if (rdr.Read())
			{
				INVStockType obj = new INVStockType();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new INVStockType();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
Example #7
0
		/// <summary>
		/// Populates the fields for multiple objects from the columns found in an open reader.
		/// </summary>
		///
		/// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
		///
		/// <returns>Object of INVStockTypeCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:12 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVStockTypeCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			INVStockTypeCollection list = new INVStockTypeCollection();
			
			while (rdr.Read())
			{
				INVStockType obj = new INVStockType();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
Example #8
0
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified
		/// </summary>
		///
		/// <param name="field" type="string">Field of the class INVStockType</param>
		/// <param name="fieldValue" type="object">Value for the field specified.</param>
		/// <param name="fieldValue2" type="object">Value for the field specified.</param>
		/// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
		///
		/// <returns>List of object of class INVStockType in the form of an object of class INVStockTypeCollection</returns>
		public INVStockTypeCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
		{
			INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();
			foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
			{
				_iNVStockTypeWCF = new INVStockType();
				
				_iNVStockTypeWCF.StockTypeID = _iNVStockType.StockTypeID;
				_iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;
				
				iNVStockTypeCollection.Add(_iNVStockTypeWCF);
			}
			return iNVStockTypeCollection;
		}
Example #9
0
		/// <summary>
		/// This method will return a list of objects representing the specified number of entries from the specified record number in the table 
		/// using the value of the field specified
		/// </summary>
		///
		/// <param name="field" type="string">Field of the class INVStockType</param>
		/// <param name="fieldValue" type="object">Value for the field specified.</param>
		/// <param name="fieldValue2" type="object">Value for the field specified.</param>
		/// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param>
		/// <param name="orderByStatement" type="string">The field value to number.</param>
		/// <param name="pageSize" type="int">Number of records returned.</param>
		/// <param name="skipPages" type="int">The number of missing pages.</param>
		///
		/// <returns>List of object of class INVStockType in the form of an object of class INVStockTypeCollection</returns>
		public INVStockTypeCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();
			foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_iNVStockTypeWCF = new INVStockType();
				
				_iNVStockTypeWCF.StockTypeID = _iNVStockType.StockTypeID;
				_iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;
				
				iNVStockTypeCollection.Add(_iNVStockTypeWCF);
			}
			return iNVStockTypeCollection;
		}
Example #10
0
		/// <summary>
		/// This method will return a list of objects representing the specified number of entries from the specified record number in the table.
		/// </summary>
		///
		/// <param name="pageSize" type="int">Number of records returned.</param>
		/// <param name="skipPages" type="int">The number of missing pages.</param>
		/// <param name="orderByStatement" type="string">The field value to number.</param>
		///
		/// <returns>list of objects of class INVStockType in the form of an object of class INVStockTypeCollection </returns>
		public INVStockTypeCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			INVStockTypeCollection iNVStockTypeCollection = new INVStockTypeCollection();
			foreach (POS.DataLayer.INVStockType _iNVStockType in POS.DataLayer.INVStockTypeBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_iNVStockTypeWCF = new INVStockType();
				
				_iNVStockTypeWCF.StockTypeID = _iNVStockType.StockTypeID;
				_iNVStockTypeWCF.StockTypeName = _iNVStockType.StockTypeName;
				
				iNVStockTypeCollection.Add(_iNVStockTypeWCF);
			}
			return iNVStockTypeCollection;
		}