/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class VSalesReturnHeader in the form of object of VSalesReturnHeaderCollection </returns>
		public VSalesReturnHeaderCollection SelectAll()
		{
			VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();
			foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeaderBase.SelectAll())
			{
				_vSalesReturnHeaderWCF = new VSalesReturnHeader();
				
				_vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
				_vSalesReturnHeaderWCF.ReturnDate = _vSalesReturnHeader.ReturnDate;
				_vSalesReturnHeaderWCF.IsClosed = _vSalesReturnHeader.IsClosed;
				_vSalesReturnHeaderWCF.InvoiceNumber = _vSalesReturnHeader.InvoiceNumber;
				_vSalesReturnHeaderWCF.CustomerName = _vSalesReturnHeader.CustomerName;
				_vSalesReturnHeaderWCF.SalesHeaderID = _vSalesReturnHeader.SalesHeaderID;
				
				vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
			}
			return vSalesReturnHeaderCollection;
		}
예제 #2
0
        public VSalesReturnHeaderCollection SearchByCriteria(string CustomerName, string InvoiceNumber, DateTime DateFrom, DateTime DateTo)
        {
            VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();
            foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeader.SearchByriteria(CustomerName, DateFrom, DateTo, InvoiceNumber))
            {
                VSalesReturnHeader _vSalesReturnHeaderWCF = new VSalesReturnHeader();

                _vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
                _vSalesReturnHeaderWCF.ReturnDate = _vSalesReturnHeader.ReturnDate;
                _vSalesReturnHeaderWCF.IsClosed = _vSalesReturnHeader.IsClosed;
                _vSalesReturnHeaderWCF.InvoiceNumber = _vSalesReturnHeader.InvoiceNumber;
                _vSalesReturnHeaderWCF.CustomerName = _vSalesReturnHeader.CustomerName;
                _vSalesReturnHeaderWCF.SalesHeaderID = _vSalesReturnHeader.SalesHeaderID;

                vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
            }
            return vSalesReturnHeaderCollection;
        }
예제 #3
0
        public VSalesReturnHeaderCollection SearchByCriteria(string CustomerName, string InvoiceNumber, DateTime DateFrom, DateTime DateTo)
        {
            VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();

            foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeader.SearchByriteria(CustomerName, DateFrom, DateTo, InvoiceNumber))
            {
                VSalesReturnHeader _vSalesReturnHeaderWCF = new VSalesReturnHeader();

                _vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
                _vSalesReturnHeaderWCF.ReturnDate          = _vSalesReturnHeader.ReturnDate;
                _vSalesReturnHeaderWCF.IsClosed            = _vSalesReturnHeader.IsClosed;
                _vSalesReturnHeaderWCF.InvoiceNumber       = _vSalesReturnHeader.InvoiceNumber;
                _vSalesReturnHeaderWCF.CustomerName        = _vSalesReturnHeader.CustomerName;
                _vSalesReturnHeaderWCF.SalesHeaderID       = _vSalesReturnHeader.SalesHeaderID;

                vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
            }
            return(vSalesReturnHeaderCollection);
        }
예제 #4
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 VSalesReturnHeader</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 VSalesReturnHeader in the form of an object of class VSalesReturnHeaderCollection</returns>
        public VSalesReturnHeaderCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();

            foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeaderBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _vSalesReturnHeaderWCF = new VSalesReturnHeader();

                _vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
                _vSalesReturnHeaderWCF.ReturnDate          = _vSalesReturnHeader.ReturnDate;
                _vSalesReturnHeaderWCF.IsClosed            = _vSalesReturnHeader.IsClosed;
                _vSalesReturnHeaderWCF.InvoiceNumber       = _vSalesReturnHeader.InvoiceNumber;
                _vSalesReturnHeaderWCF.CustomerName        = _vSalesReturnHeader.CustomerName;
                _vSalesReturnHeaderWCF.SalesHeaderID       = _vSalesReturnHeader.SalesHeaderID;

                vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
            }
            return(vSalesReturnHeaderCollection);
        }
예제 #5
0
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class VSalesReturnHeader in the form of object of VSalesReturnHeaderCollection </returns>
        public VSalesReturnHeaderCollection SelectAll()
        {
            VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();

            foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeaderBase.SelectAll())
            {
                _vSalesReturnHeaderWCF = new VSalesReturnHeader();

                _vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
                _vSalesReturnHeaderWCF.ReturnDate          = _vSalesReturnHeader.ReturnDate;
                _vSalesReturnHeaderWCF.IsClosed            = _vSalesReturnHeader.IsClosed;
                _vSalesReturnHeaderWCF.InvoiceNumber       = _vSalesReturnHeader.InvoiceNumber;
                _vSalesReturnHeaderWCF.CustomerName        = _vSalesReturnHeader.CustomerName;
                _vSalesReturnHeaderWCF.SalesHeaderID       = _vSalesReturnHeader.SalesHeaderID;

                vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
            }
            return(vSalesReturnHeaderCollection);
        }
예제 #6
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 VSalesReturnHeader in the form of an object of class VSalesReturnHeaderCollection </returns>
        public VSalesReturnHeaderCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();

            foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeaderBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _vSalesReturnHeaderWCF = new VSalesReturnHeader();

                _vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
                _vSalesReturnHeaderWCF.ReturnDate          = _vSalesReturnHeader.ReturnDate;
                _vSalesReturnHeaderWCF.IsClosed            = _vSalesReturnHeader.IsClosed;
                _vSalesReturnHeaderWCF.InvoiceNumber       = _vSalesReturnHeader.InvoiceNumber;
                _vSalesReturnHeaderWCF.CustomerName        = _vSalesReturnHeader.CustomerName;
                _vSalesReturnHeaderWCF.SalesHeaderID       = _vSalesReturnHeader.SalesHeaderID;

                vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
            }
            return(vSalesReturnHeaderCollection);
        }
예제 #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 VSalesReturnHeaderCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/9/2015 4:39:22 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static VSalesReturnHeaderCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			VSalesReturnHeaderCollection list = new VSalesReturnHeaderCollection();
			
            if (rdr.Read())
			{
				VSalesReturnHeader obj = new VSalesReturnHeader();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new VSalesReturnHeader();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
예제 #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 VSalesReturnHeaderCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/9/2015 4:39:22 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static VSalesReturnHeaderCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			VSalesReturnHeaderCollection list = new VSalesReturnHeaderCollection();
			
			while (rdr.Read())
			{
				VSalesReturnHeader obj = new VSalesReturnHeader();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
		/// <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 VSalesReturnHeader</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 VSalesReturnHeader in the form of an object of class VSalesReturnHeaderCollection</returns>
		public VSalesReturnHeaderCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
		{
			VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();
			foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeaderBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
			{
				_vSalesReturnHeaderWCF = new VSalesReturnHeader();
				
				_vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
				_vSalesReturnHeaderWCF.ReturnDate = _vSalesReturnHeader.ReturnDate;
				_vSalesReturnHeaderWCF.IsClosed = _vSalesReturnHeader.IsClosed;
				_vSalesReturnHeaderWCF.InvoiceNumber = _vSalesReturnHeader.InvoiceNumber;
				_vSalesReturnHeaderWCF.CustomerName = _vSalesReturnHeader.CustomerName;
				_vSalesReturnHeaderWCF.SalesHeaderID = _vSalesReturnHeader.SalesHeaderID;
				
				vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
			}
			return vSalesReturnHeaderCollection;
		}
예제 #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 VSalesReturnHeader in the form of an object of class VSalesReturnHeaderCollection </returns>
		public VSalesReturnHeaderCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			VSalesReturnHeaderCollection vSalesReturnHeaderCollection = new VSalesReturnHeaderCollection();
			foreach (POS.DataLayer.VSalesReturnHeader _vSalesReturnHeader in POS.DataLayer.VSalesReturnHeaderBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_vSalesReturnHeaderWCF = new VSalesReturnHeader();
				
				_vSalesReturnHeaderWCF.SlaesReturnHeaderID = _vSalesReturnHeader.SlaesReturnHeaderID;
				_vSalesReturnHeaderWCF.ReturnDate = _vSalesReturnHeader.ReturnDate;
				_vSalesReturnHeaderWCF.IsClosed = _vSalesReturnHeader.IsClosed;
				_vSalesReturnHeaderWCF.InvoiceNumber = _vSalesReturnHeader.InvoiceNumber;
				_vSalesReturnHeaderWCF.CustomerName = _vSalesReturnHeader.CustomerName;
				_vSalesReturnHeaderWCF.SalesHeaderID = _vSalesReturnHeader.SalesHeaderID;
				
				vSalesReturnHeaderCollection.Add(_vSalesReturnHeaderWCF);
			}
			return vSalesReturnHeaderCollection;
		}