예제 #1
0
        /// <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="SALSalesLinePrimaryKey">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 SALSalesLineBatchCollection</returns>
        public SALSalesLineBatchCollection SelectAllByForeignKeySalesLineIDPaged(SALSalesLinePrimaryKey pk, int pageSize, int skipPages, string orderByStatement)
        {
            SALSalesLineBatchCollection sALSalesLineBatchCollection = new SALSalesLineBatchCollection();

            foreach (POS.DataLayer.SALSalesLineBatch _sALSalesLineBatch in POS.DataLayer.SALSalesLineBatchBase.SelectAllByForeignKeySalesLineIDPaged(new POS.DataLayer.SALSalesLinePrimaryKey(pk.SalesLineID), pageSize, skipPages, orderByStatement))
            {
                _sALSalesLineBatchWCF = new SALSalesLineBatch();
                _sALSalesLineBatchWCF.SalesLineBatchID = _sALSalesLineBatch.SalesLineBatchID;
                _sALSalesLineBatchWCF.SalesLineID      = _sALSalesLineBatch.SalesLineID;
                _sALSalesLineBatchWCF.BatchID          = _sALSalesLineBatch.BatchID;

                sALSalesLineBatchCollection.Add(_sALSalesLineBatchWCF);
            }
            return(sALSalesLineBatchCollection);
        }
예제 #2
0
        /// <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="SALSalesLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class SALSalesLineBatchCollection</returns>
        public SALSalesLineBatchCollection SelectAllByForeignKeySalesLineID(SALSalesLinePrimaryKey pk)
        {
            SALSalesLineBatchCollection sALSalesLineBatchCollection = new SALSalesLineBatchCollection();

            foreach (POS.DataLayer.SALSalesLineBatch _sALSalesLineBatch in POS.DataLayer.SALSalesLineBatchBase.SelectAllByForeignKeySalesLineID(new POS.DataLayer.SALSalesLinePrimaryKey(pk.SalesLineID)))
            {
                _sALSalesLineBatchWCF = new SALSalesLineBatch();
                _sALSalesLineBatchWCF.SalesLineBatchID = _sALSalesLineBatch.SalesLineBatchID;
                _sALSalesLineBatchWCF.SalesLineID      = _sALSalesLineBatch.SalesLineID;
                _sALSalesLineBatchWCF.BatchID          = _sALSalesLineBatch.BatchID;

                sALSalesLineBatchCollection.Add(_sALSalesLineBatchWCF);
            }
            return(sALSalesLineBatchCollection);
        }
예제 #3
0
        /// <summary>
        /// This method will return an object representing the record matching the primary key information specified.
        /// </summary>
        ///
        /// <param name="pk" type="SALSalesLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class SALSalesLine</returns>
        public SALSalesLine SelectOne(SALSalesLinePrimaryKey pk)
        {
            _sALSalesLineWCF = new SALSalesLine();
            _sALSalesLine    = POS.DataLayer.SALSalesLineBase.SelectOne(new POS.DataLayer.SALSalesLinePrimaryKey(pk.SalesLineID));

            _sALSalesLineWCF.SalesLineID    = _sALSalesLine.SalesLineID;
            _sALSalesLineWCF.SalesHeaderID  = _sALSalesLine.SalesHeaderID;
            _sALSalesLineWCF.ProductID      = _sALSalesLine.ProductID;
            _sALSalesLineWCF.TotalQty       = _sALSalesLine.TotalQty;
            _sALSalesLineWCF.TotalBonus     = _sALSalesLine.TotalBonus;
            _sALSalesLineWCF.DiscountAmount = _sALSalesLine.DiscountAmount;
            _sALSalesLineWCF.DiscountRatio  = _sALSalesLine.DiscountRatio;
            _sALSalesLineWCF.UnitPrice      = _sALSalesLine.UnitPrice;
            _sALSalesLineWCF.CreatedBy      = _sALSalesLine.CreatedBy;
            _sALSalesLineWCF.CreateDate     = _sALSalesLine.CreateDate;
            _sALSalesLineWCF.UpdatedBy      = _sALSalesLine.UpdatedBy;
            _sALSalesLineWCF.UpdateDate     = _sALSalesLine.UpdateDate;
            _sALSalesLineWCF.IsDeleted      = _sALSalesLine.IsDeleted;
            _sALSalesLineWCF.DeletedBy      = _sALSalesLine.DeletedBy;
            _sALSalesLineWCF.DeleteDate     = _sALSalesLine.DeleteDate;

            return(_sALSalesLineWCF);
        }
예제 #4
0
 /// <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="SALSalesLinePrimaryKey">Primary Key information based on which data is to be deleted.</param>
 ///
 /// <returns>True if succeeded</returns>
 public bool DeleteAllByForeignKeySalesLineID(SALSalesLinePrimaryKey pk)
 {
     return(POS.DataLayer.SALSalesLineBatchBase.DeleteAllByForeignKeySalesLineID(new POS.DataLayer.SALSalesLinePrimaryKey(pk.SalesLineID)));
 }
예제 #5
0
 ///<summary>
 ///This method will Delete the object from the database
 ///</summary>
 ///<param name="pk" type="SALSalesLinePrimaryKey">Primary Key information based on which data is to be fetched.</param>
 /// <returns>True if succeeded</returns>
 public bool Delete(SALSalesLinePrimaryKey pk)
 {
     return(POS.DataLayer.SALSalesLineBase.Delete(new POS.DataLayer.SALSalesLinePrimaryKey(pk.SalesLineID)));
 }