예제 #1
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 VProduct</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 VProduct in the form of an object of class VProductCollection</returns>
        public VProductCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            VProductCollection vProductCollection = new VProductCollection();

            foreach (POS.DataLayer.VProduct _vProduct in POS.DataLayer.VProductBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _vProductWCF = new VProduct();

                _vProductWCF.ProductID        = _vProduct.ProductID;
                _vProductWCF.ProductName      = _vProduct.ProductName;
                _vProductWCF.ProductGroupID   = _vProduct.ProductGroupID;
                _vProductWCF.ProductCode      = _vProduct.ProductCode;
                _vProductWCF.IsAcceptBatch    = _vProduct.IsAcceptBatch;
                _vProductWCF.ProductPrice     = _vProduct.ProductPrice;
                _vProductWCF.IsFixedPrice     = _vProduct.IsFixedPrice;
                _vProductWCF.HasDiscount      = _vProduct.HasDiscount;
                _vProductWCF.DiscountAmount   = _vProduct.DiscountAmount;
                _vProductWCF.DescountRatio    = _vProduct.DescountRatio;
                _vProductWCF.IsActive         = _vProduct.IsActive;
                _vProductWCF.Notes            = _vProduct.Notes;
                _vProductWCF.ProductGroupName = _vProduct.ProductGroupName;
                _vProductWCF.Expr1            = _vProduct.Expr1;

                vProductCollection.Add(_vProductWCF);
            }
            return(vProductCollection);
        }
예제 #2
0
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class VProduct in the form of object of VProductCollection </returns>
        public VProductCollection SelectAll()
        {
            VProductCollection vProductCollection = new VProductCollection();

            foreach (POS.DataLayer.VProduct _vProduct in POS.DataLayer.VProductBase.SelectAll())
            {
                _vProductWCF = new VProduct();

                _vProductWCF.ProductID        = _vProduct.ProductID;
                _vProductWCF.ProductName      = _vProduct.ProductName;
                _vProductWCF.ProductGroupID   = _vProduct.ProductGroupID;
                _vProductWCF.ProductCode      = _vProduct.ProductCode;
                _vProductWCF.IsAcceptBatch    = _vProduct.IsAcceptBatch;
                _vProductWCF.ProductPrice     = _vProduct.ProductPrice;
                _vProductWCF.IsFixedPrice     = _vProduct.IsFixedPrice;
                _vProductWCF.HasDiscount      = _vProduct.HasDiscount;
                _vProductWCF.DiscountAmount   = _vProduct.DiscountAmount;
                _vProductWCF.DescountRatio    = _vProduct.DescountRatio;
                _vProductWCF.IsActive         = _vProduct.IsActive;
                _vProductWCF.Notes            = _vProduct.Notes;
                _vProductWCF.ProductGroupName = _vProduct.ProductGroupName;
                _vProductWCF.Expr1            = _vProduct.Expr1;

                vProductCollection.Add(_vProductWCF);
            }
            return(vProductCollection);
        }
예제 #3
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 VProduct</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 VProduct in the form of an object of class VProductCollection</returns>
        public VProductCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            VProductCollection vProductCollection = new VProductCollection();

            foreach (POS.DataLayer.VProduct _vProduct in POS.DataLayer.VProductBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _vProductWCF = new VProduct();

                _vProductWCF.ProductID        = _vProduct.ProductID;
                _vProductWCF.ProductName      = _vProduct.ProductName;
                _vProductWCF.ProductGroupID   = _vProduct.ProductGroupID;
                _vProductWCF.ProductCode      = _vProduct.ProductCode;
                _vProductWCF.IsAcceptBatch    = _vProduct.IsAcceptBatch;
                _vProductWCF.ProductPrice     = _vProduct.ProductPrice;
                _vProductWCF.IsFixedPrice     = _vProduct.IsFixedPrice;
                _vProductWCF.HasDiscount      = _vProduct.HasDiscount;
                _vProductWCF.DiscountAmount   = _vProduct.DiscountAmount;
                _vProductWCF.DescountRatio    = _vProduct.DescountRatio;
                _vProductWCF.IsActive         = _vProduct.IsActive;
                _vProductWCF.Notes            = _vProduct.Notes;
                _vProductWCF.MinPrice         = _vProduct.MinPrice;
                _vProductWCF.MaxPrice         = _vProduct.MaxPrice;
                _vProductWCF.ProductGroupName = _vProduct.ProductGroupName;

                vProductCollection.Add(_vProductWCF);
            }
            return(vProductCollection);
        }
예제 #4
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 VProduct in the form of an object of class VProductCollection </returns>
        public VProductCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            VProductCollection vProductCollection = new VProductCollection();

            foreach (POS.DataLayer.VProduct _vProduct in POS.DataLayer.VProductBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _vProductWCF = new VProduct();

                _vProductWCF.ProductID        = _vProduct.ProductID;
                _vProductWCF.ProductName      = _vProduct.ProductName;
                _vProductWCF.ProductGroupID   = _vProduct.ProductGroupID;
                _vProductWCF.ProductCode      = _vProduct.ProductCode;
                _vProductWCF.IsAcceptBatch    = _vProduct.IsAcceptBatch;
                _vProductWCF.ProductPrice     = _vProduct.ProductPrice;
                _vProductWCF.IsFixedPrice     = _vProduct.IsFixedPrice;
                _vProductWCF.HasDiscount      = _vProduct.HasDiscount;
                _vProductWCF.DiscountAmount   = _vProduct.DiscountAmount;
                _vProductWCF.DescountRatio    = _vProduct.DescountRatio;
                _vProductWCF.IsActive         = _vProduct.IsActive;
                _vProductWCF.Notes            = _vProduct.Notes;
                _vProductWCF.ProductGroupName = _vProduct.ProductGroupName;
                _vProductWCF.Expr1            = _vProduct.Expr1;

                vProductCollection.Add(_vProductWCF);
            }
            return(vProductCollection);
        }
예제 #5
0
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class VProduct in the form of object of VProductCollection </returns>
		public VProductCollection SelectAll()
		{
			VProductCollection vProductCollection = new VProductCollection();
			foreach (POS.DataLayer.VProduct _vProduct in POS.DataLayer.VProductBase.SelectAll())
			{
				_vProductWCF = new VProduct();
				
				_vProductWCF.ProductID = _vProduct.ProductID;
				_vProductWCF.ProductName = _vProduct.ProductName;
				_vProductWCF.ProductGroupID = _vProduct.ProductGroupID;
				_vProductWCF.ProductCode = _vProduct.ProductCode;
				_vProductWCF.IsAcceptBatch = _vProduct.IsAcceptBatch;
				_vProductWCF.ProductPrice = _vProduct.ProductPrice;
				_vProductWCF.IsFixedPrice = _vProduct.IsFixedPrice;
				_vProductWCF.HasDiscount = _vProduct.HasDiscount;
				_vProductWCF.DiscountAmount = _vProduct.DiscountAmount;
				_vProductWCF.DescountRatio = _vProduct.DescountRatio;
				_vProductWCF.IsActive = _vProduct.IsActive;
				_vProductWCF.Notes = _vProduct.Notes;
				_vProductWCF.MinPrice = _vProduct.MinPrice;
				_vProductWCF.MaxPrice = _vProduct.MaxPrice;
				_vProductWCF.ProductGroupName = _vProduct.ProductGroupName;
				
				vProductCollection.Add(_vProductWCF);
			}
			return vProductCollection;
		}
예제 #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 VProductCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/25/2015 1:10:32 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static VProductCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			VProductCollection list = new VProductCollection();
			
            if (rdr.Read())
			{
				VProduct obj = new VProduct();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new VProduct();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
예제 #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 VProductCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/25/2015 1:10:32 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static VProductCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			VProductCollection list = new VProductCollection();
			
			while (rdr.Read())
			{
				VProduct obj = new VProduct();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
예제 #8
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 VProduct</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 VProduct in the form of an object of class VProductCollection</returns>
		public VProductCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			VProductCollection vProductCollection = new VProductCollection();
			foreach (POS.DataLayer.VProduct _vProduct in POS.DataLayer.VProductBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_vProductWCF = new VProduct();
				
				_vProductWCF.ProductID = _vProduct.ProductID;
				_vProductWCF.ProductName = _vProduct.ProductName;
				_vProductWCF.ProductGroupID = _vProduct.ProductGroupID;
				_vProductWCF.ProductCode = _vProduct.ProductCode;
				_vProductWCF.IsAcceptBatch = _vProduct.IsAcceptBatch;
				_vProductWCF.ProductPrice = _vProduct.ProductPrice;
				_vProductWCF.IsFixedPrice = _vProduct.IsFixedPrice;
				_vProductWCF.HasDiscount = _vProduct.HasDiscount;
				_vProductWCF.DiscountAmount = _vProduct.DiscountAmount;
				_vProductWCF.DescountRatio = _vProduct.DescountRatio;
				_vProductWCF.IsActive = _vProduct.IsActive;
				_vProductWCF.Notes = _vProduct.Notes;
				_vProductWCF.MinPrice = _vProduct.MinPrice;
				_vProductWCF.MaxPrice = _vProduct.MaxPrice;
				_vProductWCF.ProductGroupName = _vProduct.ProductGroupName;
				
				vProductCollection.Add(_vProductWCF);
			}
			return vProductCollection;
		}
예제 #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.
		/// </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 VProduct in the form of an object of class VProductCollection </returns>
		public VProductCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			VProductCollection vProductCollection = new VProductCollection();
			foreach (POS.DataLayer.VProduct _vProduct in POS.DataLayer.VProductBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_vProductWCF = new VProduct();
				
				_vProductWCF.ProductID = _vProduct.ProductID;
				_vProductWCF.ProductName = _vProduct.ProductName;
				_vProductWCF.ProductGroupID = _vProduct.ProductGroupID;
				_vProductWCF.ProductCode = _vProduct.ProductCode;
				_vProductWCF.IsAcceptBatch = _vProduct.IsAcceptBatch;
				_vProductWCF.ProductPrice = _vProduct.ProductPrice;
				_vProductWCF.IsFixedPrice = _vProduct.IsFixedPrice;
				_vProductWCF.HasDiscount = _vProduct.HasDiscount;
				_vProductWCF.DiscountAmount = _vProduct.DiscountAmount;
				_vProductWCF.DescountRatio = _vProduct.DescountRatio;
				_vProductWCF.IsActive = _vProduct.IsActive;
				_vProductWCF.Notes = _vProduct.Notes;
				_vProductWCF.MinPrice = _vProduct.MinPrice;
				_vProductWCF.MaxPrice = _vProduct.MaxPrice;
				_vProductWCF.ProductGroupName = _vProduct.ProductGroupName;
				
				vProductCollection.Add(_vProductWCF);
			}
			return vProductCollection;
		}