예제 #1
0
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class SALSalesReturnHeader in the form of object of SALSalesReturnHeaderCollection </returns>
        public SALSalesReturnHeaderCollection SelectAll()
        {
            SALSalesReturnHeaderCollection sALSalesReturnHeaderCollection = new SALSalesReturnHeaderCollection();

            foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectAll())
            {
                _sALSalesReturnHeaderWCF = new SALSalesReturnHeader();

                _sALSalesReturnHeaderWCF.SlaesReturnHeaderID  = _sALSalesReturnHeader.SlaesReturnHeaderID;
                _sALSalesReturnHeaderWCF.ReturnDate           = _sALSalesReturnHeader.ReturnDate;
                _sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
                _sALSalesReturnHeaderWCF.CreatedBy            = _sALSalesReturnHeader.CreatedBy;
                _sALSalesReturnHeaderWCF.CreateDate           = _sALSalesReturnHeader.CreateDate;
                _sALSalesReturnHeaderWCF.UpdatedBy            = _sALSalesReturnHeader.UpdatedBy;
                _sALSalesReturnHeaderWCF.UpdateDate           = _sALSalesReturnHeader.UpdateDate;
                _sALSalesReturnHeaderWCF.IsDeleted            = _sALSalesReturnHeader.IsDeleted;
                _sALSalesReturnHeaderWCF.DeletedBy            = _sALSalesReturnHeader.DeletedBy;
                _sALSalesReturnHeaderWCF.DeleteDate           = _sALSalesReturnHeader.DeleteDate;
                _sALSalesReturnHeaderWCF.IsClosed             = _sALSalesReturnHeader.IsClosed;
                _sALSalesReturnHeaderWCF.IsVoid      = _sALSalesReturnHeader.IsVoid;
                _sALSalesReturnHeaderWCF.InventoryID = _sALSalesReturnHeader.InventoryID;
                _sALSalesReturnHeaderWCF.ReturnMoney = _sALSalesReturnHeader.ReturnMoney;

                sALSalesReturnHeaderCollection.Add(_sALSalesReturnHeaderWCF);
            }
            return(sALSalesReturnHeaderCollection);
        }
예제 #2
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 SALSalesReturnHeader</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 SALSalesReturnHeader in the form of an object of class SALSalesReturnHeaderCollection</returns>
        public SALSalesReturnHeaderCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            SALSalesReturnHeaderCollection sALSalesReturnHeaderCollection = new SALSalesReturnHeaderCollection();

            foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _sALSalesReturnHeaderWCF = new SALSalesReturnHeader();

                _sALSalesReturnHeaderWCF.SlaesReturnHeaderID  = _sALSalesReturnHeader.SlaesReturnHeaderID;
                _sALSalesReturnHeaderWCF.ReturnDate           = _sALSalesReturnHeader.ReturnDate;
                _sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
                _sALSalesReturnHeaderWCF.CreatedBy            = _sALSalesReturnHeader.CreatedBy;
                _sALSalesReturnHeaderWCF.CreateDate           = _sALSalesReturnHeader.CreateDate;
                _sALSalesReturnHeaderWCF.UpdatedBy            = _sALSalesReturnHeader.UpdatedBy;
                _sALSalesReturnHeaderWCF.UpdateDate           = _sALSalesReturnHeader.UpdateDate;
                _sALSalesReturnHeaderWCF.IsDeleted            = _sALSalesReturnHeader.IsDeleted;
                _sALSalesReturnHeaderWCF.DeletedBy            = _sALSalesReturnHeader.DeletedBy;
                _sALSalesReturnHeaderWCF.DeleteDate           = _sALSalesReturnHeader.DeleteDate;
                _sALSalesReturnHeaderWCF.IsClosed             = _sALSalesReturnHeader.IsClosed;
                _sALSalesReturnHeaderWCF.IsVoid      = _sALSalesReturnHeader.IsVoid;
                _sALSalesReturnHeaderWCF.InventoryID = _sALSalesReturnHeader.InventoryID;
                _sALSalesReturnHeaderWCF.ReturnMoney = _sALSalesReturnHeader.ReturnMoney;

                sALSalesReturnHeaderCollection.Add(_sALSalesReturnHeaderWCF);
            }
            return(sALSalesReturnHeaderCollection);
        }
예제 #3
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 SALSalesReturnHeader in the form of an object of class SALSalesReturnHeaderCollection </returns>
        public SALSalesReturnHeaderCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            SALSalesReturnHeaderCollection sALSalesReturnHeaderCollection = new SALSalesReturnHeaderCollection();

            foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _sALSalesReturnHeaderWCF = new SALSalesReturnHeader();

                _sALSalesReturnHeaderWCF.SlaesReturnHeaderID  = _sALSalesReturnHeader.SlaesReturnHeaderID;
                _sALSalesReturnHeaderWCF.ReturnDate           = _sALSalesReturnHeader.ReturnDate;
                _sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
                _sALSalesReturnHeaderWCF.CreatedBy            = _sALSalesReturnHeader.CreatedBy;
                _sALSalesReturnHeaderWCF.CreateDate           = _sALSalesReturnHeader.CreateDate;
                _sALSalesReturnHeaderWCF.UpdatedBy            = _sALSalesReturnHeader.UpdatedBy;
                _sALSalesReturnHeaderWCF.UpdateDate           = _sALSalesReturnHeader.UpdateDate;
                _sALSalesReturnHeaderWCF.IsDeleted            = _sALSalesReturnHeader.IsDeleted;
                _sALSalesReturnHeaderWCF.DeletedBy            = _sALSalesReturnHeader.DeletedBy;
                _sALSalesReturnHeaderWCF.DeleteDate           = _sALSalesReturnHeader.DeleteDate;
                _sALSalesReturnHeaderWCF.IsClosed             = _sALSalesReturnHeader.IsClosed;
                _sALSalesReturnHeaderWCF.IsVoid      = _sALSalesReturnHeader.IsVoid;
                _sALSalesReturnHeaderWCF.InventoryID = _sALSalesReturnHeader.InventoryID;
                _sALSalesReturnHeaderWCF.ReturnMoney = _sALSalesReturnHeader.ReturnMoney;

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

            foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _sALSalesReturnHeaderWCF = new SALSalesReturnHeader();

                _sALSalesReturnHeaderWCF.SlaesReturnHeaderID  = _sALSalesReturnHeader.SlaesReturnHeaderID;
                _sALSalesReturnHeaderWCF.ReturnDate           = _sALSalesReturnHeader.ReturnDate;
                _sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
                _sALSalesReturnHeaderWCF.CreatedBy            = _sALSalesReturnHeader.CreatedBy;
                _sALSalesReturnHeaderWCF.CreateDate           = _sALSalesReturnHeader.CreateDate;
                _sALSalesReturnHeaderWCF.UpdatedBy            = _sALSalesReturnHeader.UpdatedBy;
                _sALSalesReturnHeaderWCF.UpdateDate           = _sALSalesReturnHeader.UpdateDate;
                _sALSalesReturnHeaderWCF.IsDeleted            = _sALSalesReturnHeader.IsDeleted;
                _sALSalesReturnHeaderWCF.DeletedBy            = _sALSalesReturnHeader.DeletedBy;
                _sALSalesReturnHeaderWCF.DeleteDate           = _sALSalesReturnHeader.DeleteDate;

                sALSalesReturnHeaderCollection.Add(_sALSalesReturnHeaderWCF);
            }
            return(sALSalesReturnHeaderCollection);
        }
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class SALSalesReturnHeader in the form of object of SALSalesReturnHeaderCollection </returns>
		public SALSalesReturnHeaderCollection SelectAll()
		{
			SALSalesReturnHeaderCollection sALSalesReturnHeaderCollection = new SALSalesReturnHeaderCollection();
			foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectAll())
			{
				_sALSalesReturnHeaderWCF = new SALSalesReturnHeader();
				
				_sALSalesReturnHeaderWCF.SlaesReturnHeaderID = _sALSalesReturnHeader.SlaesReturnHeaderID;
				_sALSalesReturnHeaderWCF.ReturnDate = _sALSalesReturnHeader.ReturnDate;
				_sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
				_sALSalesReturnHeaderWCF.CreatedBy = _sALSalesReturnHeader.CreatedBy;
				_sALSalesReturnHeaderWCF.CreateDate = _sALSalesReturnHeader.CreateDate;
				_sALSalesReturnHeaderWCF.UpdatedBy = _sALSalesReturnHeader.UpdatedBy;
				_sALSalesReturnHeaderWCF.UpdateDate = _sALSalesReturnHeader.UpdateDate;
				_sALSalesReturnHeaderWCF.IsDeleted = _sALSalesReturnHeader.IsDeleted;
				_sALSalesReturnHeaderWCF.DeletedBy = _sALSalesReturnHeader.DeletedBy;
				_sALSalesReturnHeaderWCF.DeleteDate = _sALSalesReturnHeader.DeleteDate;
				_sALSalesReturnHeaderWCF.IsClosed = _sALSalesReturnHeader.IsClosed;
				_sALSalesReturnHeaderWCF.IsVoid = _sALSalesReturnHeader.IsVoid;
				_sALSalesReturnHeaderWCF.InventoryID = _sALSalesReturnHeader.InventoryID;
				_sALSalesReturnHeaderWCF.ReturnMoney = _sALSalesReturnHeader.ReturnMoney;
				
				sALSalesReturnHeaderCollection.Add(_sALSalesReturnHeaderWCF);
			}
			return sALSalesReturnHeaderCollection;
		}
		/// <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 SALSalesReturnHeader</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 SALSalesReturnHeader in the form of an object of class SALSalesReturnHeaderCollection</returns>
		public SALSalesReturnHeaderCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			SALSalesReturnHeaderCollection sALSalesReturnHeaderCollection = new SALSalesReturnHeaderCollection();
			foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_sALSalesReturnHeaderWCF = new SALSalesReturnHeader();
				
				_sALSalesReturnHeaderWCF.SlaesReturnHeaderID = _sALSalesReturnHeader.SlaesReturnHeaderID;
				_sALSalesReturnHeaderWCF.ReturnDate = _sALSalesReturnHeader.ReturnDate;
				_sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
				_sALSalesReturnHeaderWCF.CreatedBy = _sALSalesReturnHeader.CreatedBy;
				_sALSalesReturnHeaderWCF.CreateDate = _sALSalesReturnHeader.CreateDate;
				_sALSalesReturnHeaderWCF.UpdatedBy = _sALSalesReturnHeader.UpdatedBy;
				_sALSalesReturnHeaderWCF.UpdateDate = _sALSalesReturnHeader.UpdateDate;
				_sALSalesReturnHeaderWCF.IsDeleted = _sALSalesReturnHeader.IsDeleted;
				_sALSalesReturnHeaderWCF.DeletedBy = _sALSalesReturnHeader.DeletedBy;
				_sALSalesReturnHeaderWCF.DeleteDate = _sALSalesReturnHeader.DeleteDate;
				_sALSalesReturnHeaderWCF.IsClosed = _sALSalesReturnHeader.IsClosed;
				_sALSalesReturnHeaderWCF.IsVoid = _sALSalesReturnHeader.IsVoid;
				_sALSalesReturnHeaderWCF.InventoryID = _sALSalesReturnHeader.InventoryID;
				_sALSalesReturnHeaderWCF.ReturnMoney = _sALSalesReturnHeader.ReturnMoney;
				
				sALSalesReturnHeaderCollection.Add(_sALSalesReturnHeaderWCF);
			}
			return sALSalesReturnHeaderCollection;
		}
		/// <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 SALSalesReturnHeader in the form of an object of class SALSalesReturnHeaderCollection </returns>
		public SALSalesReturnHeaderCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			SALSalesReturnHeaderCollection sALSalesReturnHeaderCollection = new SALSalesReturnHeaderCollection();
			foreach (POS.DataLayer.SALSalesReturnHeader _sALSalesReturnHeader in POS.DataLayer.SALSalesReturnHeaderBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_sALSalesReturnHeaderWCF = new SALSalesReturnHeader();
				
				_sALSalesReturnHeaderWCF.SlaesReturnHeaderID = _sALSalesReturnHeader.SlaesReturnHeaderID;
				_sALSalesReturnHeaderWCF.ReturnDate = _sALSalesReturnHeader.ReturnDate;
				_sALSalesReturnHeaderWCF.OriginalSalesHeadeID = _sALSalesReturnHeader.OriginalSalesHeadeID;
				_sALSalesReturnHeaderWCF.CreatedBy = _sALSalesReturnHeader.CreatedBy;
				_sALSalesReturnHeaderWCF.CreateDate = _sALSalesReturnHeader.CreateDate;
				_sALSalesReturnHeaderWCF.UpdatedBy = _sALSalesReturnHeader.UpdatedBy;
				_sALSalesReturnHeaderWCF.UpdateDate = _sALSalesReturnHeader.UpdateDate;
				_sALSalesReturnHeaderWCF.IsDeleted = _sALSalesReturnHeader.IsDeleted;
				_sALSalesReturnHeaderWCF.DeletedBy = _sALSalesReturnHeader.DeletedBy;
				_sALSalesReturnHeaderWCF.DeleteDate = _sALSalesReturnHeader.DeleteDate;
				_sALSalesReturnHeaderWCF.IsClosed = _sALSalesReturnHeader.IsClosed;
				_sALSalesReturnHeaderWCF.IsVoid = _sALSalesReturnHeader.IsVoid;
				_sALSalesReturnHeaderWCF.InventoryID = _sALSalesReturnHeader.InventoryID;
				_sALSalesReturnHeaderWCF.ReturnMoney = _sALSalesReturnHeader.ReturnMoney;
				
				sALSalesReturnHeaderCollection.Add(_sALSalesReturnHeaderWCF);
			}
			return sALSalesReturnHeaderCollection;
		}
예제 #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 SALSalesReturnHeaderCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/4/2015 6:56:38 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static SALSalesReturnHeaderCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			SALSalesReturnHeaderCollection list = new SALSalesReturnHeaderCollection();
			
            if (rdr.Read())
			{
				SALSalesReturnHeader obj = new SALSalesReturnHeader();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new SALSalesReturnHeader();
					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 SALSalesReturnHeaderCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			4/4/2015 6:56:38 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static SALSalesReturnHeaderCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			SALSalesReturnHeaderCollection list = new SALSalesReturnHeaderCollection();
			
			while (rdr.Read())
			{
				SALSalesReturnHeader obj = new SALSalesReturnHeader();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}