private SALSalesReturnHeader GetSalesReturnHeader(int salesReturnHeaderID) { SALSalesReturnHeaderPrimaryKey pk = new SALSalesReturnHeaderPrimaryKey(); pk.SlaesReturnHeaderID = salesReturnHeaderID; return(sALSalesReturnHeaderWrapper.SelectOne(pk)); }
/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="SALSalesReturnHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class SALSalesReturnHeader</returns> public SALSalesReturnHeader SelectOne(SALSalesReturnHeaderPrimaryKey pk) { _sALSalesReturnHeaderWCF = new SALSalesReturnHeader(); _sALSalesReturnHeader = POS.DataLayer.SALSalesReturnHeaderBase.SelectOne(new POS.DataLayer.SALSalesReturnHeaderPrimaryKey(pk.SlaesReturnHeaderID)); _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; return _sALSalesReturnHeaderWCF; }
///<summary> ///This method will Delete the object from the database ///</summary> ///<param name="pk" type="SALSalesReturnHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// <returns>True if succeeded</returns> public bool Delete(SALSalesReturnHeaderPrimaryKey pk) { return POS.DataLayer.SALSalesReturnHeaderBase.Delete(new POS.DataLayer.SALSalesReturnHeaderPrimaryKey(pk.SlaesReturnHeaderID)); }
/// <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="SALSalesReturnHeaderPrimaryKey">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 SALSalesReturnLineCollection</returns> public SALSalesReturnLineCollection SelectAllByForeignKeySalesReturnHeaderIDPaged(SALSalesReturnHeaderPrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { SALSalesReturnLineCollection sALSalesReturnLineCollection=new SALSalesReturnLineCollection(); foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAllByForeignKeySalesReturnHeaderIDPaged(new POS.DataLayer.SALSalesReturnHeaderPrimaryKey(pk.SlaesReturnHeaderID), pageSize, skipPages, orderByStatement)) { _sALSalesReturnLineWCF = new SALSalesReturnLine(); _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID; _sALSalesReturnLineWCF.Qty = _sALSalesReturnLine.Qty; _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason; _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID; _sALSalesReturnLineWCF.BatchID = _sALSalesReturnLine.BatchID; _sALSalesReturnLineWCF.BatchNumber = _sALSalesReturnLine.BatchNumber; _sALSalesReturnLineWCF.ExpiryDate = _sALSalesReturnLine.ExpiryDate; _sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID; sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF); } return sALSalesReturnLineCollection; }
/// <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="SALSalesReturnHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class SALSalesReturnLineCollection</returns> public SALSalesReturnLineCollection SelectAllByForeignKeySalesReturnHeaderID(SALSalesReturnHeaderPrimaryKey pk) { SALSalesReturnLineCollection sALSalesReturnLineCollection=new SALSalesReturnLineCollection(); foreach (POS.DataLayer.SALSalesReturnLine _sALSalesReturnLine in POS.DataLayer.SALSalesReturnLineBase.SelectAllByForeignKeySalesReturnHeaderID(new POS.DataLayer.SALSalesReturnHeaderPrimaryKey(pk.SlaesReturnHeaderID))) { _sALSalesReturnLineWCF = new SALSalesReturnLine(); _sALSalesReturnLineWCF.SalesReturnLineID = _sALSalesReturnLine.SalesReturnLineID; _sALSalesReturnLineWCF.Qty = _sALSalesReturnLine.Qty; _sALSalesReturnLineWCF.Reason = _sALSalesReturnLine.Reason; _sALSalesReturnLineWCF.OriginalSalesLineID = _sALSalesReturnLine.OriginalSalesLineID; _sALSalesReturnLineWCF.BatchID = _sALSalesReturnLine.BatchID; _sALSalesReturnLineWCF.BatchNumber = _sALSalesReturnLine.BatchNumber; _sALSalesReturnLineWCF.ExpiryDate = _sALSalesReturnLine.ExpiryDate; _sALSalesReturnLineWCF.SalesReturnHeaderID = _sALSalesReturnLine.SalesReturnHeaderID; sALSalesReturnLineCollection.Add(_sALSalesReturnLineWCF); } return sALSalesReturnLineCollection; }
/// <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="SALSalesReturnHeaderPrimaryKey">Primary Key information based on which data is to be deleted.</param> /// /// <returns>True if succeeded</returns> public bool DeleteAllByForeignKeySalesReturnHeaderID(SALSalesReturnHeaderPrimaryKey pk) { return POS.DataLayer.SALSalesReturnLineBase.DeleteAllByForeignKeySalesReturnHeaderID(new POS.DataLayer.SALSalesReturnHeaderPrimaryKey(pk.SlaesReturnHeaderID)); }