/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="PaymentTypePrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class PaymentType</returns> public PaymentType SelectOne(PaymentTypePrimaryKey pk) { _paymentTypeWCF = new PaymentType(); _paymentType = POS.DataLayer.PaymentTypeBase.SelectOne(new POS.DataLayer.PaymentTypePrimaryKey(pk.PaymentTypeID)); _paymentTypeWCF.PaymentTypeID = _paymentType.PaymentTypeID; _paymentTypeWCF.PaymentTypeName = _paymentType.PaymentTypeName; return _paymentTypeWCF; }
///<summary> ///This method will Delete the object from the database ///</summary> ///<param name="pk" type="PaymentTypePrimaryKey">Primary Key information based on which data is to be fetched.</param> /// <returns>True if succeeded</returns> public bool Delete(PaymentTypePrimaryKey pk) { return POS.DataLayer.PaymentTypeBase.Delete(new POS.DataLayer.PaymentTypePrimaryKey(pk.PaymentTypeID)); }
/// <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="PaymentTypePrimaryKey">Primary Key information based on which data is to be deleted.</param> /// /// <returns>True if succeeded</returns> public bool DeleteAllByForeignKeyPaymentTypeID(PaymentTypePrimaryKey pk) { return POS.DataLayer.SALSalesHeaderBase.DeleteAllByForeignKeyPaymentTypeID(new POS.DataLayer.PaymentTypePrimaryKey(pk.PaymentTypeID)); }
/// <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="PaymentTypePrimaryKey">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 SALSalesHeaderCollection</returns> public SALSalesHeaderCollection SelectAllByForeignKeyPaymentTypeIDPaged(PaymentTypePrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { SALSalesHeaderCollection sALSalesHeaderCollection=new SALSalesHeaderCollection(); foreach (POS.DataLayer.SALSalesHeader _sALSalesHeader in POS.DataLayer.SALSalesHeaderBase.SelectAllByForeignKeyPaymentTypeIDPaged(new POS.DataLayer.PaymentTypePrimaryKey(pk.PaymentTypeID), pageSize, skipPages, orderByStatement)) { _sALSalesHeaderWCF = new SALSalesHeader(); _sALSalesHeaderWCF.SalesHeaderID = _sALSalesHeader.SalesHeaderID; _sALSalesHeaderWCF.SalesDate = _sALSalesHeader.SalesDate; _sALSalesHeaderWCF.CustomerID = _sALSalesHeader.CustomerID; _sALSalesHeaderWCF.InvoiceNumber = _sALSalesHeader.InvoiceNumber; _sALSalesHeaderWCF.InvoiceDate = _sALSalesHeader.InvoiceDate; _sALSalesHeaderWCF.SellerID = _sALSalesHeader.SellerID; _sALSalesHeaderWCF.PaymentTypeID = _sALSalesHeader.PaymentTypeID; _sALSalesHeaderWCF.TotalPrice = _sALSalesHeader.TotalPrice; _sALSalesHeaderWCF.PaidAmount = _sALSalesHeader.PaidAmount; _sALSalesHeaderWCF.RemainingAmount = _sALSalesHeader.RemainingAmount; _sALSalesHeaderWCF.LastDayToPay = _sALSalesHeader.LastDayToPay; _sALSalesHeaderWCF.TotalDiscountAmount = _sALSalesHeader.TotalDiscountAmount; _sALSalesHeaderWCF.TotalDiscountRatio = _sALSalesHeader.TotalDiscountRatio; _sALSalesHeaderWCF.IsClosed = _sALSalesHeader.IsClosed; _sALSalesHeaderWCF.IsVoid = _sALSalesHeader.IsVoid; _sALSalesHeaderWCF.IsPrinted = _sALSalesHeader.IsPrinted; _sALSalesHeaderWCF.ServicePrice = _sALSalesHeader.ServicePrice; _sALSalesHeaderWCF.TaxTypeID = _sALSalesHeader.TaxTypeID; _sALSalesHeaderWCF.RefuseReasonID = _sALSalesHeader.RefuseReasonID; _sALSalesHeaderWCF.CreatedBy = _sALSalesHeader.CreatedBy; _sALSalesHeaderWCF.CreateDate = _sALSalesHeader.CreateDate; _sALSalesHeaderWCF.UpdatedBy = _sALSalesHeader.UpdatedBy; _sALSalesHeaderWCF.UpdateDate = _sALSalesHeader.UpdateDate; _sALSalesHeaderWCF.IsDeleted = _sALSalesHeader.IsDeleted; _sALSalesHeaderWCF.DeletedBy = _sALSalesHeader.DeletedBy; _sALSalesHeaderWCF.DeletDate = _sALSalesHeader.DeletDate; _sALSalesHeaderWCF.InventoryID = _sALSalesHeader.InventoryID; _sALSalesHeaderWCF.FinalPrice = _sALSalesHeader.FinalPrice; _sALSalesHeaderWCF.ChequeNumber = _sALSalesHeader.ChequeNumber; sALSalesHeaderCollection.Add(_sALSalesHeaderWCF); } return sALSalesHeaderCollection; }
/// <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="PaymentTypePrimaryKey">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 PURPurchaseHeaderCollection</returns> public PURPurchaseHeaderCollection SelectAllByForeignKeyPaymentTypeIDPaged(PaymentTypePrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { PURPurchaseHeaderCollection pURPurchaseHeaderCollection=new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeaderBase.SelectAllByForeignKeyPaymentTypeIDPaged(new POS.DataLayer.PaymentTypePrimaryKey(pk.PaymentTypeID), pageSize, skipPages, orderByStatement)) { _pURPurchaseHeaderWCF = new PURPurchaseHeader(); _pURPurchaseHeaderWCF.PurcaseHeaderID = _pURPurchaseHeader.PurcaseHeaderID; _pURPurchaseHeaderWCF.PurchaseDate = _pURPurchaseHeader.PurchaseDate; _pURPurchaseHeaderWCF.PaymentTypeID = _pURPurchaseHeader.PaymentTypeID; _pURPurchaseHeaderWCF.SupplierID = _pURPurchaseHeader.SupplierID; _pURPurchaseHeaderWCF.InvoiceNumber = _pURPurchaseHeader.InvoiceNumber; _pURPurchaseHeaderWCF.CreateDate = _pURPurchaseHeader.CreateDate; _pURPurchaseHeaderWCF.CreatedBy = _pURPurchaseHeader.CreatedBy; _pURPurchaseHeaderWCF.updateDate = _pURPurchaseHeader.updateDate; _pURPurchaseHeaderWCF.UpdatedBy = _pURPurchaseHeader.UpdatedBy; _pURPurchaseHeaderWCF.IsDeleted = _pURPurchaseHeader.IsDeleted; _pURPurchaseHeaderWCF.DeleteDate = _pURPurchaseHeader.DeleteDate; _pURPurchaseHeaderWCF.TotalPrice = _pURPurchaseHeader.TotalPrice; _pURPurchaseHeaderWCF.ServicePrice = _pURPurchaseHeader.ServicePrice; _pURPurchaseHeaderWCF.PaidAmount = _pURPurchaseHeader.PaidAmount; _pURPurchaseHeaderWCF.IsClosed = _pURPurchaseHeader.IsClosed; _pURPurchaseHeaderWCF.IsVoid = _pURPurchaseHeader.IsVoid; _pURPurchaseHeaderWCF.IsPrinted = _pURPurchaseHeader.IsPrinted; _pURPurchaseHeaderWCF.RefuseReasonID = _pURPurchaseHeader.RefuseReasonID; _pURPurchaseHeaderWCF.TotalDiscountAmount = _pURPurchaseHeader.TotalDiscountAmount; _pURPurchaseHeaderWCF.TotalDiscountRatio = _pURPurchaseHeader.TotalDiscountRatio; _pURPurchaseHeaderWCF.TaxTypeID = _pURPurchaseHeader.TaxTypeID; _pURPurchaseHeaderWCF.RemainingAmount = _pURPurchaseHeader.RemainingAmount; _pURPurchaseHeaderWCF.LastDayToPay = _pURPurchaseHeader.LastDayToPay; _pURPurchaseHeaderWCF.DeletedBy = _pURPurchaseHeader.DeletedBy; _pURPurchaseHeaderWCF.Notes = _pURPurchaseHeader.Notes; _pURPurchaseHeaderWCF.InventoryID = _pURPurchaseHeader.InventoryID; _pURPurchaseHeaderWCF.InvoiceDate = _pURPurchaseHeader.InvoiceDate; _pURPurchaseHeaderWCF.ChequeNumber = _pURPurchaseHeader.ChequeNumber; pURPurchaseHeaderCollection.Add(_pURPurchaseHeaderWCF); } return pURPurchaseHeaderCollection; }