/// <summary> /// This method will return an object representing the record matching the primary key information specified. /// </summary> /// /// <param name="pk" type="BDTaxTypePrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class BDTaxType</returns> public BDTaxType SelectOne(BDTaxTypePrimaryKey pk) { _bDTaxTypeWCF = new BDTaxType(); _bDTaxType = POS.DataLayer.BDTaxTypeBase.SelectOne(new POS.DataLayer.BDTaxTypePrimaryKey(pk.TaxTypeID)); _bDTaxTypeWCF.TaxTypeID = _bDTaxType.TaxTypeID; _bDTaxTypeWCF.TaxTypeName = _bDTaxType.TaxTypeName; _bDTaxTypeWCF.TaxValue = _bDTaxType.TaxValue; return _bDTaxTypeWCF; }
/// <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="BDTaxTypePrimaryKey">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 SelectAllByForeignKeyTaxTypeIDPaged(BDTaxTypePrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { SALSalesHeaderCollection sALSalesHeaderCollection=new SALSalesHeaderCollection(); foreach (POS.DataLayer.SALSalesHeader _sALSalesHeader in POS.DataLayer.SALSalesHeaderBase.SelectAllByForeignKeyTaxTypeIDPaged(new POS.DataLayer.BDTaxTypePrimaryKey(pk.TaxTypeID), 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 Delete the object from the database ///</summary> ///<param name="pk" type="BDTaxTypePrimaryKey">Primary Key information based on which data is to be fetched.</param> /// <returns>True if succeeded</returns> public bool Delete(BDTaxTypePrimaryKey pk) { return POS.DataLayer.BDTaxTypeBase.Delete(new POS.DataLayer.BDTaxTypePrimaryKey(pk.TaxTypeID)); }
/// <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="BDTaxTypePrimaryKey">Primary Key information based on which data is to be deleted.</param> /// /// <returns>True if succeeded</returns> public bool DeleteAllByForeignKeyTaxTypeID(BDTaxTypePrimaryKey pk) { return POS.DataLayer.SALSalesHeaderBase.DeleteAllByForeignKeyTaxTypeID(new POS.DataLayer.BDTaxTypePrimaryKey(pk.TaxTypeID)); }