/// <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="SALSalesHeaderPrimaryKey">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 BDCustomerAccountCollection</returns> public BDCustomerAccountCollection SelectAllByForeignKeySalesInvoiceIdPaged(SALSalesHeaderPrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection(); foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAllByForeignKeySalesInvoiceIdPaged(new POS.DataLayer.SALSalesHeaderPrimaryKey(pk.SalesHeaderID), pageSize, skipPages, orderByStatement)) { _bDCustomerAccountWCF = new BDCustomerAccount(); _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber; _bDCustomerAccountWCF.CustomerID = _bDCustomerAccount.CustomerID; _bDCustomerAccountWCF.SalesInvoiceId = _bDCustomerAccount.SalesInvoiceId; _bDCustomerAccountWCF.SalesDate = _bDCustomerAccount.SalesDate; _bDCustomerAccountWCF.InvoiceNumber = _bDCustomerAccount.InvoiceNumber; _bDCustomerAccountWCF.TotalPrice = _bDCustomerAccount.TotalPrice; _bDCustomerAccountWCF.PaidAmount = _bDCustomerAccount.PaidAmount; _bDCustomerAccountWCF.RemainingAmount = _bDCustomerAccount.RemainingAmount; _bDCustomerAccountWCF.IsVoid = _bDCustomerAccount.IsVoid; _bDCustomerAccountWCF.CreatedBy = _bDCustomerAccount.CreatedBy; _bDCustomerAccountWCF.CreateDate = _bDCustomerAccount.CreateDate; _bDCustomerAccountWCF.UpdatedBy = _bDCustomerAccount.UpdatedBy; _bDCustomerAccountWCF.UpdateDate = _bDCustomerAccount.UpdateDate; _bDCustomerAccountWCF.IsDeleted = _bDCustomerAccount.IsDeleted; _bDCustomerAccountWCF.DeletedBy = _bDCustomerAccount.DeletedBy; _bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate; _bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType; bDCustomerAccountCollection.Add(_bDCustomerAccountWCF); } return(bDCustomerAccountCollection); }
/// <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="SALSalesHeaderPrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class BDCustomerAccountCollection</returns> public BDCustomerAccountCollection SelectAllByForeignKeySalesInvoiceId(SALSalesHeaderPrimaryKey pk) { BDCustomerAccountCollection bDCustomerAccountCollection = new BDCustomerAccountCollection(); foreach (POS.DataLayer.BDCustomerAccount _bDCustomerAccount in POS.DataLayer.BDCustomerAccountBase.SelectAllByForeignKeySalesInvoiceId(new POS.DataLayer.SALSalesHeaderPrimaryKey(pk.SalesHeaderID))) { _bDCustomerAccountWCF = new BDCustomerAccount(); _bDCustomerAccountWCF.CustomerAccountNumber = _bDCustomerAccount.CustomerAccountNumber; _bDCustomerAccountWCF.CustomerID = _bDCustomerAccount.CustomerID; _bDCustomerAccountWCF.SalesInvoiceId = _bDCustomerAccount.SalesInvoiceId; _bDCustomerAccountWCF.SalesDate = _bDCustomerAccount.SalesDate; _bDCustomerAccountWCF.InvoiceNumber = _bDCustomerAccount.InvoiceNumber; _bDCustomerAccountWCF.TotalPrice = _bDCustomerAccount.TotalPrice; _bDCustomerAccountWCF.PaidAmount = _bDCustomerAccount.PaidAmount; _bDCustomerAccountWCF.RemainingAmount = _bDCustomerAccount.RemainingAmount; _bDCustomerAccountWCF.IsVoid = _bDCustomerAccount.IsVoid; _bDCustomerAccountWCF.CreatedBy = _bDCustomerAccount.CreatedBy; _bDCustomerAccountWCF.CreateDate = _bDCustomerAccount.CreateDate; _bDCustomerAccountWCF.UpdatedBy = _bDCustomerAccount.UpdatedBy; _bDCustomerAccountWCF.UpdateDate = _bDCustomerAccount.UpdateDate; _bDCustomerAccountWCF.IsDeleted = _bDCustomerAccount.IsDeleted; _bDCustomerAccountWCF.DeletedBy = _bDCustomerAccount.DeletedBy; _bDCustomerAccountWCF.DeletedDate = _bDCustomerAccount.DeletedDate; _bDCustomerAccountWCF.Depit = _bDCustomerAccount.Depit; _bDCustomerAccountWCF.Credit = _bDCustomerAccount.Credit; _bDCustomerAccountWCF.ChequeNumber = _bDCustomerAccount.ChequeNumber; _bDCustomerAccountWCF.InvoiceType = _bDCustomerAccount.InvoiceType; _bDCustomerAccountWCF.LstDayToPay = _bDCustomerAccount.LstDayToPay; bDCustomerAccountCollection.Add(_bDCustomerAccountWCF); } return(bDCustomerAccountCollection); }
private void GetSalesOrderData(int salesHeaderID) { SALSalesHeaderPrimaryKey pk = new SALSalesHeaderPrimaryKey(); pk.SalesHeaderID = salesHeaderID; _sALSalesHeader = _sALSalesHeaderWrapper.SelectOne(pk); sALSalesLineCollection = _sALSalesLinerWrapper.SelectByField(salesHeaderID); }
/// <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="SALSalesHeaderPrimaryKey">Primary Key information based on which data is to be deleted.</param> /// /// <returns>True if succeeded</returns> public bool DeleteAllByForeignKeySalesInvoiceId(SALSalesHeaderPrimaryKey pk) { return(POS.DataLayer.BDCustomerAccountBase.DeleteAllByForeignKeySalesInvoiceId(new POS.DataLayer.SALSalesHeaderPrimaryKey(pk.SalesHeaderID))); }