Exemplo n.º 1
0
		/// <summary>
		/// This method will return an object representing the record matching the primary key information specified.
		/// </summary>
		///
		/// <param name="pk" type="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
		///
		/// <returns>object of class PURPurchaseLine</returns>
		public PURPurchaseLine SelectOne(PURPurchaseLinePrimaryKey pk)
		{
			_pURPurchaseLineWCF = new PURPurchaseLine();
			_pURPurchaseLine = POS.DataLayer.PURPurchaseLineBase.SelectOne(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID));
			
				_pURPurchaseLineWCF.PurchaseLineID = _pURPurchaseLine.PurchaseLineID;
				_pURPurchaseLineWCF.PurchaseHeaderID = _pURPurchaseLine.PurchaseHeaderID;
				_pURPurchaseLineWCF.ProductID = _pURPurchaseLine.ProductID;
				_pURPurchaseLineWCF.TotalQty = _pURPurchaseLine.TotalQty;
				_pURPurchaseLineWCF.BonusQty = _pURPurchaseLine.BonusQty;
				_pURPurchaseLineWCF.DiscountRatio = _pURPurchaseLine.DiscountRatio;
				_pURPurchaseLineWCF.DiscountAmount = _pURPurchaseLine.DiscountAmount;
				_pURPurchaseLineWCF.Unitprice = _pURPurchaseLine.Unitprice;
				_pURPurchaseLineWCF.CreatedDate = _pURPurchaseLine.CreatedDate;
				_pURPurchaseLineWCF.CreatedBy = _pURPurchaseLine.CreatedBy;
				_pURPurchaseLineWCF.UpdateDate = _pURPurchaseLine.UpdateDate;
				_pURPurchaseLineWCF.UpdatedBy = _pURPurchaseLine.UpdatedBy;
				_pURPurchaseLineWCF.IsDeleted = _pURPurchaseLine.IsDeleted;
				_pURPurchaseLineWCF.DeleteDate = _pURPurchaseLine.DeleteDate;
				_pURPurchaseLineWCF.DeletedBy = _pURPurchaseLine.DeletedBy;
				
			return _pURPurchaseLineWCF;
		}
Exemplo n.º 2
0
		///<summary>
		///This method will Delete the object from the database
		///</summary>
		///<param name="pk" type="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
		/// <returns>True if succeeded</returns>
		public bool Delete(PURPurchaseLinePrimaryKey pk)
		{
			return POS.DataLayer.PURPurchaseLineBase.Delete(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID));
		}
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified 
		/// along with the details of the child table.
		/// </summary>
		///
		/// <param name="pk" type="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
		/// <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>object of class PURPurchaseReturnLineCollection</returns>
		public PURPurchaseReturnLineCollection SelectAllByForeignKeyOriginalpurchaseLineIDPaged(PURPurchaseLinePrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
		{
			PURPurchaseReturnLineCollection pURPurchaseReturnLineCollection=new PURPurchaseReturnLineCollection();
			foreach (POS.DataLayer.PURPurchaseReturnLine _pURPurchaseReturnLine in POS.DataLayer.PURPurchaseReturnLineBase.SelectAllByForeignKeyOriginalpurchaseLineIDPaged(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID), pageSize, skipPages, orderByStatement))
			{
				_pURPurchaseReturnLineWCF = new PURPurchaseReturnLine();
				_pURPurchaseReturnLineWCF.PurchaseReturnLineID = _pURPurchaseReturnLine.PurchaseReturnLineID;
				_pURPurchaseReturnLineWCF.Qty = _pURPurchaseReturnLine.Qty;
				_pURPurchaseReturnLineWCF.Reason = _pURPurchaseReturnLine.Reason;
				_pURPurchaseReturnLineWCF.OriginalpurchaseLineID = _pURPurchaseReturnLine.OriginalpurchaseLineID;
				_pURPurchaseReturnLineWCF.BatchID = _pURPurchaseReturnLine.BatchID;
				_pURPurchaseReturnLineWCF.BatchNumber = _pURPurchaseReturnLine.BatchNumber;
				_pURPurchaseReturnLineWCF.ExpiryDate = _pURPurchaseReturnLine.ExpiryDate;
				_pURPurchaseReturnLineWCF.PurchaseReturnHeaderID = _pURPurchaseReturnLine.PurchaseReturnHeaderID;
				
				pURPurchaseReturnLineCollection.Add(_pURPurchaseReturnLineWCF);
			}
			return pURPurchaseReturnLineCollection;
		}
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified 
		/// along with the details of the child table.
		/// </summary>
		///
		/// <param name="pk" type="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
		///
		/// <returns>object of class PURPurchaseReturnLineCollection</returns>
		public PURPurchaseReturnLineCollection SelectAllByForeignKeyOriginalpurchaseLineID(PURPurchaseLinePrimaryKey pk)
		{
			PURPurchaseReturnLineCollection pURPurchaseReturnLineCollection=new PURPurchaseReturnLineCollection();
			foreach (POS.DataLayer.PURPurchaseReturnLine _pURPurchaseReturnLine in POS.DataLayer.PURPurchaseReturnLineBase.SelectAllByForeignKeyOriginalpurchaseLineID(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID)))
			{
				_pURPurchaseReturnLineWCF = new PURPurchaseReturnLine();
				_pURPurchaseReturnLineWCF.PurchaseReturnLineID = _pURPurchaseReturnLine.PurchaseReturnLineID;
				_pURPurchaseReturnLineWCF.Qty = _pURPurchaseReturnLine.Qty;
				_pURPurchaseReturnLineWCF.Reason = _pURPurchaseReturnLine.Reason;
				_pURPurchaseReturnLineWCF.OriginalpurchaseLineID = _pURPurchaseReturnLine.OriginalpurchaseLineID;
				_pURPurchaseReturnLineWCF.BatchID = _pURPurchaseReturnLine.BatchID;
				_pURPurchaseReturnLineWCF.BatchNumber = _pURPurchaseReturnLine.BatchNumber;
				_pURPurchaseReturnLineWCF.ExpiryDate = _pURPurchaseReturnLine.ExpiryDate;
				_pURPurchaseReturnLineWCF.PurchaseReturnHeaderID = _pURPurchaseReturnLine.PurchaseReturnHeaderID;
				
				pURPurchaseReturnLineCollection.Add(_pURPurchaseReturnLineWCF);
			}
			return pURPurchaseReturnLineCollection;
		}
			/// <summary>
		/// This method will delete row(s) from the database using the value of the field specified 
		/// along with the details of the child table.
		/// </summary>
		///
		/// <param name="pk" type="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be deleted.</param>
		///
		/// <returns>True if succeeded</returns>
		public bool DeleteAllByForeignKeyOriginalpurchaseLineID(PURPurchaseLinePrimaryKey pk)
		{
			return POS.DataLayer.PURPurchaseReturnLineBase.DeleteAllByForeignKeyOriginalpurchaseLineID(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID));
		}
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified 
		/// along with the details of the child table.
		/// </summary>
		///
		/// <param name="pk" type="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
		/// <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>object of class PURPurchaseLineBatchCollection</returns>
		public PURPurchaseLineBatchCollection SelectAllByForeignKeyPurchaseLineIDPaged(PURPurchaseLinePrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
		{
			PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection=new PURPurchaseLineBatchCollection();
			foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectAllByForeignKeyPurchaseLineIDPaged(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID), pageSize, skipPages, orderByStatement))
			{
				_pURPurchaseLineBatchWCF = new PURPurchaseLineBatch();
				_pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID;
				_pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID;
				_pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID;
				_pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty;
				
				pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF);
			}
			return pURPurchaseLineBatchCollection;
		}
		/// <summary>
		/// This method will get row(s) from the database using the value of the field specified 
		/// along with the details of the child table.
		/// </summary>
		///
		/// <param name="pk" type="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
		///
		/// <returns>object of class PURPurchaseLineBatchCollection</returns>
		public PURPurchaseLineBatchCollection SelectAllByForeignKeyPurchaseLineID(PURPurchaseLinePrimaryKey pk)
		{
			PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection=new PURPurchaseLineBatchCollection();
			foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectAllByForeignKeyPurchaseLineID(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID)))
			{
				_pURPurchaseLineBatchWCF = new PURPurchaseLineBatch();
				_pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID;
				_pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID;
				_pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID;
				_pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty;
				
				pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF);
			}
			return pURPurchaseLineBatchCollection;
		}