/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class INVProductStockBatch in the form of object of INVProductStockBatchCollection </returns>
		public INVProductStockBatchCollection SelectAll()
		{
			INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();
			foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectAll())
			{
				_iNVProductStockBatchWCF = new INVProductStockBatch();
				
				_iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
				_iNVProductStockBatchWCF.ProductStockID = _iNVProductStockBatch.ProductStockID;
				_iNVProductStockBatchWCF.BatchID = _iNVProductStockBatch.BatchID;
				_iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;
				
				iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
			}
			return iNVProductStockBatchCollection;
		}
示例#2
0
        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified
        /// along with the details of the child table.
        /// </summary>
        ///
        /// <param name="pk" type="INVProductStockPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        /// <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>object of class INVProductStockBatchCollection</returns>
        public INVProductStockBatchCollection SelectAllByForeignKeyProductStockIDPaged(INVProductStockPrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
        {
            INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();

            foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectAllByForeignKeyProductStockIDPaged(new POS.DataLayer.INVProductStockPrimaryKey(pk.ProductStockID), pageSize, skipPages, orderByStatement))
            {
                _iNVProductStockBatchWCF = new INVProductStockBatch();
                _iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
                _iNVProductStockBatchWCF.ProductStockID      = _iNVProductStockBatch.ProductStockID;
                _iNVProductStockBatchWCF.BatchID             = _iNVProductStockBatch.BatchID;
                _iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;

                iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
            }
            return(iNVProductStockBatchCollection);
        }
示例#3
0
        /// <summary>
        /// This method will get row(s) from the database using the value of the field specified
        /// along with the details of the child table.
        /// </summary>
        ///
        /// <param name="pk" type="INVProductStockPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class INVProductStockBatchCollection</returns>
        public INVProductStockBatchCollection SelectAllByForeignKeyProductStockID(INVProductStockPrimaryKey pk)
        {
            INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();

            foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectAllByForeignKeyProductStockID(new POS.DataLayer.INVProductStockPrimaryKey(pk.ProductStockID)))
            {
                _iNVProductStockBatchWCF = new INVProductStockBatch();
                _iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
                _iNVProductStockBatchWCF.ProductStockID      = _iNVProductStockBatch.ProductStockID;
                _iNVProductStockBatchWCF.BatchID             = _iNVProductStockBatch.BatchID;
                _iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;

                iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
            }
            return(iNVProductStockBatchCollection);
        }
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class INVProductStockBatch in the form of object of INVProductStockBatchCollection </returns>
        public INVProductStockBatchCollection SelectAll()
        {
            INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();

            foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectAll())
            {
                _iNVProductStockBatchWCF = new INVProductStockBatch();

                _iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
                _iNVProductStockBatchWCF.ProductStockID      = _iNVProductStockBatch.ProductStockID;
                _iNVProductStockBatchWCF.BatchID             = _iNVProductStockBatch.BatchID;
                _iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;

                iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
            }
            return(iNVProductStockBatchCollection);
        }
        /// <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 INVProductStockBatch</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 INVProductStockBatch in the form of an object of class INVProductStockBatchCollection</returns>
        public INVProductStockBatchCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();

            foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _iNVProductStockBatchWCF = new INVProductStockBatch();

                _iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
                _iNVProductStockBatchWCF.ProductStockID      = _iNVProductStockBatch.ProductStockID;
                _iNVProductStockBatchWCF.BatchID             = _iNVProductStockBatch.BatchID;
                _iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;

                iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
            }
            return(iNVProductStockBatchCollection);
        }
        /// <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 INVProductStockBatch in the form of an object of class INVProductStockBatchCollection </returns>
        public INVProductStockBatchCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();

            foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _iNVProductStockBatchWCF = new INVProductStockBatch();

                _iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
                _iNVProductStockBatchWCF.ProductStockID      = _iNVProductStockBatch.ProductStockID;
                _iNVProductStockBatchWCF.BatchID             = _iNVProductStockBatch.BatchID;
                _iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;

                iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
            }
            return(iNVProductStockBatchCollection);
        }
        /// <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 INVProductStockBatch</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 INVProductStockBatch in the form of an object of class INVProductStockBatchCollection</returns>
        public INVProductStockBatchCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();

            foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _iNVProductStockBatchWCF = new INVProductStockBatch();

                _iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
                _iNVProductStockBatchWCF.ProductStockID      = _iNVProductStockBatch.ProductStockID;
                _iNVProductStockBatchWCF.BatchID             = _iNVProductStockBatch.BatchID;
                _iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;

                iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
            }
            return(iNVProductStockBatchCollection);
        }
示例#8
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 INVProductStockBatchCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:14 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVProductStockBatchCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			INVProductStockBatchCollection list = new INVProductStockBatchCollection();
			
            if (rdr.Read())
			{
				INVProductStockBatch obj = new INVProductStockBatch();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new INVProductStockBatch();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
示例#9
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 INVProductStockBatchCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:14 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVProductStockBatchCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			INVProductStockBatchCollection list = new INVProductStockBatchCollection();
			
			while (rdr.Read())
			{
				INVProductStockBatch obj = new INVProductStockBatch();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
		/// <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 INVProductStockBatch</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 INVProductStockBatch in the form of an object of class INVProductStockBatchCollection</returns>
		public INVProductStockBatchCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();
			foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_iNVProductStockBatchWCF = new INVProductStockBatch();
				
				_iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
				_iNVProductStockBatchWCF.ProductStockID = _iNVProductStockBatch.ProductStockID;
				_iNVProductStockBatchWCF.BatchID = _iNVProductStockBatch.BatchID;
				_iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;
				
				iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
			}
			return iNVProductStockBatchCollection;
		}
		/// <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 INVProductStockBatch in the form of an object of class INVProductStockBatchCollection </returns>
		public INVProductStockBatchCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();
			foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_iNVProductStockBatchWCF = new INVProductStockBatch();
				
				_iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
				_iNVProductStockBatchWCF.ProductStockID = _iNVProductStockBatch.ProductStockID;
				_iNVProductStockBatchWCF.BatchID = _iNVProductStockBatch.BatchID;
				_iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;
				
				iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
			}
			return iNVProductStockBatchCollection;
		}
		/// <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 INVProductStockBatch</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 INVProductStockBatch in the form of an object of class INVProductStockBatchCollection</returns>
		public INVProductStockBatchCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
		{
			INVProductStockBatchCollection iNVProductStockBatchCollection = new INVProductStockBatchCollection();
			foreach (POS.DataLayer.INVProductStockBatch _iNVProductStockBatch in POS.DataLayer.INVProductStockBatchBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
			{
				_iNVProductStockBatchWCF = new INVProductStockBatch();
				
				_iNVProductStockBatchWCF.ProductStockBatchID = _iNVProductStockBatch.ProductStockBatchID;
				_iNVProductStockBatchWCF.ProductStockID = _iNVProductStockBatch.ProductStockID;
				_iNVProductStockBatchWCF.BatchID = _iNVProductStockBatch.BatchID;
				_iNVProductStockBatchWCF.Qty = _iNVProductStockBatch.Qty;
				
				iNVProductStockBatchCollection.Add(_iNVProductStockBatchWCF);
			}
			return iNVProductStockBatchCollection;
		}