/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class PaymentType in the form of object of PaymentTypeCollection </returns>
		public PaymentTypeCollection SelectAll()
		{
			PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();
			foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectAll())
			{
				_paymentTypeWCF = new PaymentType();
				
				_paymentTypeWCF.PaymentTypeID = _paymentType.PaymentTypeID;
				_paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;
				
				paymentTypeCollection.Add(_paymentTypeWCF);
			}
			return paymentTypeCollection;
		}
Beispiel #2
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 PaymentType</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 PaymentType in the form of an object of class PaymentTypeCollection</returns>
        public PaymentTypeCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();

            foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _paymentTypeWCF = new PaymentType();

                _paymentTypeWCF.PaymentTypeID   = _paymentType.PaymentTypeID;
                _paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;

                paymentTypeCollection.Add(_paymentTypeWCF);
            }
            return(paymentTypeCollection);
        }
Beispiel #3
0
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class PaymentType in the form of object of PaymentTypeCollection </returns>
        public PaymentTypeCollection SelectAll()
        {
            PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();

            foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectAll())
            {
                _paymentTypeWCF = new PaymentType();

                _paymentTypeWCF.PaymentTypeID   = _paymentType.PaymentTypeID;
                _paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;

                paymentTypeCollection.Add(_paymentTypeWCF);
            }
            return(paymentTypeCollection);
        }
Beispiel #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
        /// using the value of the field specified
        /// </summary>
        ///
        /// <param name="field" type="string">Field of the class PaymentType</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 PaymentType in the form of an object of class PaymentTypeCollection</returns>
        public PaymentTypeCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();

            foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _paymentTypeWCF = new PaymentType();

                _paymentTypeWCF.PaymentTypeID   = _paymentType.PaymentTypeID;
                _paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;

                paymentTypeCollection.Add(_paymentTypeWCF);
            }
            return(paymentTypeCollection);
        }
Beispiel #5
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 PaymentType in the form of an object of class PaymentTypeCollection </returns>
        public PaymentTypeCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();

            foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _paymentTypeWCF = new PaymentType();

                _paymentTypeWCF.PaymentTypeID   = _paymentType.PaymentTypeID;
                _paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;

                paymentTypeCollection.Add(_paymentTypeWCF);
            }
            return(paymentTypeCollection);
        }
		/// <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 PaymentType</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 PaymentType in the form of an object of class PaymentTypeCollection</returns>
		public PaymentTypeCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
		{
			PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();
			foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
			{
				_paymentTypeWCF = new PaymentType();
				
				_paymentTypeWCF.PaymentTypeID = _paymentType.PaymentTypeID;
				_paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;
				
				paymentTypeCollection.Add(_paymentTypeWCF);
			}
			return paymentTypeCollection;
		}
		/// <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 PaymentType</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 PaymentType in the form of an object of class PaymentTypeCollection</returns>
		public PaymentTypeCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();
			foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_paymentTypeWCF = new PaymentType();
				
				_paymentTypeWCF.PaymentTypeID = _paymentType.PaymentTypeID;
				_paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;
				
				paymentTypeCollection.Add(_paymentTypeWCF);
			}
			return paymentTypeCollection;
		}
		/// <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 PaymentType in the form of an object of class PaymentTypeCollection </returns>
		public PaymentTypeCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			PaymentTypeCollection paymentTypeCollection = new PaymentTypeCollection();
			foreach (POS.DataLayer.PaymentType _paymentType in POS.DataLayer.PaymentTypeBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_paymentTypeWCF = new PaymentType();
				
				_paymentTypeWCF.PaymentTypeID = _paymentType.PaymentTypeID;
				_paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName;
				
				paymentTypeCollection.Add(_paymentTypeWCF);
			}
			return paymentTypeCollection;
		}
Beispiel #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 PaymentTypeCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:22 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static PaymentTypeCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			PaymentTypeCollection list = new PaymentTypeCollection();
			
            if (rdr.Read())
			{
				PaymentType obj = new PaymentType();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new PaymentType();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
Beispiel #10
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 PaymentTypeCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:22 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static PaymentTypeCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			PaymentTypeCollection list = new PaymentTypeCollection();
			
			while (rdr.Read())
			{
				PaymentType obj = new PaymentType();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}