Ejemplo n.º 1
0
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class INVTransferHeader in the form of object of INVTransferHeaderCollection </returns>
		public INVTransferHeaderCollection SelectAll()
		{
			INVTransferHeaderCollection iNVTransferHeaderCollection = new INVTransferHeaderCollection();
			foreach (POS.DataLayer.INVTransferHeader _iNVTransferHeader in POS.DataLayer.INVTransferHeaderBase.SelectAll())
			{
				_iNVTransferHeaderWCF = new INVTransferHeader();
				
				_iNVTransferHeaderWCF.INVTransferHeaderID = _iNVTransferHeader.INVTransferHeaderID;
				_iNVTransferHeaderWCF.TransferDate = _iNVTransferHeader.TransferDate;
				_iNVTransferHeaderWCF.FromInventoryID = _iNVTransferHeader.FromInventoryID;
				_iNVTransferHeaderWCF.ToInventoryID = _iNVTransferHeader.ToInventoryID;
				_iNVTransferHeaderWCF.InvoiceNumber = _iNVTransferHeader.InvoiceNumber;
				_iNVTransferHeaderWCF.InvoiceDate = _iNVTransferHeader.InvoiceDate;
				_iNVTransferHeaderWCF.IsVoid = _iNVTransferHeader.IsVoid;
				_iNVTransferHeaderWCF.IsPrinted = _iNVTransferHeader.IsPrinted;
				_iNVTransferHeaderWCF.IsClosed = _iNVTransferHeader.IsClosed;
				_iNVTransferHeaderWCF.CreatedBy = _iNVTransferHeader.CreatedBy;
				_iNVTransferHeaderWCF.CreateDate = _iNVTransferHeader.CreateDate;
				_iNVTransferHeaderWCF.UpdatedBy = _iNVTransferHeader.UpdatedBy;
				_iNVTransferHeaderWCF.UpdateDate = _iNVTransferHeader.UpdateDate;
				_iNVTransferHeaderWCF.IsDeleted = _iNVTransferHeader.IsDeleted;
				_iNVTransferHeaderWCF.DeletedBy = _iNVTransferHeader.DeletedBy;
				_iNVTransferHeaderWCF.DeletedDate = _iNVTransferHeader.DeletedDate;
				
				iNVTransferHeaderCollection.Add(_iNVTransferHeaderWCF);
			}
			return iNVTransferHeaderCollection;
		}
Ejemplo n.º 2
0
        private static INVTransferHeaderCollection PopulateFromReader(IDataReader rdr)
        {
            INVTransferHeaderCollection INVTransferHeaderCollection = new INVTransferHeaderCollection();
            while (rdr.Read())
            {
                INVTransferHeader obj = new INVTransferHeader();
                obj.INVTransferHeaderID = rdr.GetInt32(rdr.GetOrdinal(INVTransferHeaderFields.INVTransferHeaderID));
                obj.TransferDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferHeaderFields.TransferDate));
                obj.FromInventoryID = rdr.GetInt32(rdr.GetOrdinal(INVTransferHeaderFields.FromInventoryID));
                obj.ToInventoryID = rdr.GetInt32(rdr.GetOrdinal(INVTransferHeaderFields.ToInventoryID));
                
                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.InvoiceNumber)))
                {
                    obj.InvoiceNumber = rdr.GetString(rdr.GetOrdinal(INVTransferHeaderFields.InvoiceNumber));
                }

                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.InvoiceDate)))
                {
                    obj.InvoiceDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferHeaderFields.InvoiceDate));
                }

                obj.IsClosed = rdr.GetBoolean(rdr.GetOrdinal(INVTransferHeaderFields.IsClosed));
                obj.IsVoid = rdr.GetBoolean(rdr.GetOrdinal(INVTransferHeaderFields.IsVoid));
                obj.IsPrinted = rdr.GetBoolean(rdr.GetOrdinal(INVTransferHeaderFields.IsPrinted));

                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.CreatedBy)))
                {
                    obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferHeaderFields.CreatedBy));
                }

                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.CreateDate)))
                {
                    obj.CreateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferHeaderFields.CreateDate));
                }

                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.UpdatedBy)))
                {
                    obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferHeaderFields.UpdatedBy));
                }

                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.UpdateDate)))
                {
                    obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferHeaderFields.UpdateDate));
                }

                obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(INVTransferHeaderFields.IsDeleted));
                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.DeletedBy)))
                {
                    obj.DeletedBy = rdr.GetInt32(rdr.GetOrdinal(INVTransferHeaderFields.DeletedBy));
                }

                if (!rdr.IsDBNull(rdr.GetOrdinal(INVTransferHeaderFields.DeletedDate)))
                {
                    obj.DeletedDate = rdr.GetDateTime(rdr.GetOrdinal(INVTransferHeaderFields.DeletedDate));
                }
                INVTransferHeaderCollection.Add(obj);
            }
            return INVTransferHeaderCollection;
        }
Ejemplo n.º 3
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 INVTransferHeaderCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:36:58 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVTransferHeaderCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			INVTransferHeaderCollection list = new INVTransferHeaderCollection();
			
            if (rdr.Read())
			{
				INVTransferHeader obj = new INVTransferHeader();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new INVTransferHeader();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
Ejemplo n.º 4
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 INVTransferHeaderCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:36:58 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVTransferHeaderCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			INVTransferHeaderCollection list = new INVTransferHeaderCollection();
			
			while (rdr.Read())
			{
				INVTransferHeader obj = new INVTransferHeader();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
Ejemplo n.º 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 
		/// using the value of the field specified
		/// </summary>
		///
		/// <param name="field" type="string">Field of the class INVTransferHeader</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 INVTransferHeader in the form of an object of class INVTransferHeaderCollection</returns>
		public INVTransferHeaderCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			INVTransferHeaderCollection iNVTransferHeaderCollection = new INVTransferHeaderCollection();
			foreach (POS.DataLayer.INVTransferHeader _iNVTransferHeader in POS.DataLayer.INVTransferHeaderBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_iNVTransferHeaderWCF = new INVTransferHeader();
				
				_iNVTransferHeaderWCF.INVTransferHeaderID = _iNVTransferHeader.INVTransferHeaderID;
				_iNVTransferHeaderWCF.TransferDate = _iNVTransferHeader.TransferDate;
				_iNVTransferHeaderWCF.FromInventoryID = _iNVTransferHeader.FromInventoryID;
				_iNVTransferHeaderWCF.ToInventoryID = _iNVTransferHeader.ToInventoryID;
				_iNVTransferHeaderWCF.InvoiceNumber = _iNVTransferHeader.InvoiceNumber;
				_iNVTransferHeaderWCF.InvoiceDate = _iNVTransferHeader.InvoiceDate;
				_iNVTransferHeaderWCF.IsVoid = _iNVTransferHeader.IsVoid;
				_iNVTransferHeaderWCF.IsPrinted = _iNVTransferHeader.IsPrinted;
				_iNVTransferHeaderWCF.IsClosed = _iNVTransferHeader.IsClosed;
				_iNVTransferHeaderWCF.CreatedBy = _iNVTransferHeader.CreatedBy;
				_iNVTransferHeaderWCF.CreateDate = _iNVTransferHeader.CreateDate;
				_iNVTransferHeaderWCF.UpdatedBy = _iNVTransferHeader.UpdatedBy;
				_iNVTransferHeaderWCF.UpdateDate = _iNVTransferHeader.UpdateDate;
				_iNVTransferHeaderWCF.IsDeleted = _iNVTransferHeader.IsDeleted;
				_iNVTransferHeaderWCF.DeletedBy = _iNVTransferHeader.DeletedBy;
				_iNVTransferHeaderWCF.DeletedDate = _iNVTransferHeader.DeletedDate;
				
				iNVTransferHeaderCollection.Add(_iNVTransferHeaderWCF);
			}
			return iNVTransferHeaderCollection;
		}