/// <summary> /// This method will return a list of objects representing all records in the table. /// </summary> /// /// <returns>list of objects of class PURPurchaseHeader in the form of object of PURPurchaseHeaderCollection </returns> public PURPurchaseHeaderCollection SelectAll() { PURPurchaseHeaderCollection pURPurchaseHeaderCollection = new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeaderBase.SelectAll()) { _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); }
/// <summary> /// This method will return a list of objects representing the specified number of entries from the specified record number in the table /// using the value of the field specified /// </summary> /// /// <param name="field" type="string">Field of the class PURPurchaseHeader</param> /// <param name="fieldValue" type="object">Value for the field specified.</param> /// <param name="fieldValue2" type="object">Value for the field specified.</param> /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param> /// <param name="orderByStatement" type="string">The field value to number.</param> /// <param name="pageSize" type="int">Number of records returned.</param> /// <param name="skipPages" type="int">The number of missing pages.</param> /// /// <returns>List of object of class PURPurchaseHeader in the form of an object of class PURPurchaseHeaderCollection</returns> public PURPurchaseHeaderCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { PURPurchaseHeaderCollection pURPurchaseHeaderCollection = new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeaderBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, 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); }
public PURPurchaseHeaderCollection HeaderSearch(int InventoryID, DateTime FromDate, DateTime ToDate, string SupplierName, string InvoiceNumber) { PURPurchaseHeaderCollection PURPurcaseHeaderCollection = new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeader.HeaderSearch(InventoryID, FromDate, ToDate, SupplierName, InvoiceNumber)) { PURPurchaseHeader _pURPurchaseHeaderWCF = new PURPurchaseHeader(); _pURPurchaseHeaderWCF.PurcaseHeaderID = _pURPurchaseHeader.PurcaseHeaderID; _pURPurchaseHeaderWCF.PurchaseDate = _pURPurchaseHeader.PurchaseDate; _pURPurchaseHeaderWCF.SupplierID = _pURPurchaseHeader.SupplierID; _pURPurchaseHeaderWCF.SupplierName = _pURPurchaseHeader.SupplierName; _pURPurchaseHeaderWCF.InvoiceNumber = _pURPurchaseHeader.InvoiceNumber; _pURPurchaseHeaderWCF.InvoiceDate = _pURPurchaseHeader.InvoiceDate; // _pURPurchaseHeaderWCF.SellerID = _pURPurchaseHeader.SellerID; _pURPurchaseHeaderWCF.PaymentTypeID = _pURPurchaseHeader.PaymentTypeID; _pURPurchaseHeaderWCF.TotalPrice = _pURPurchaseHeader.TotalPrice; _pURPurchaseHeaderWCF.PaidAmount = _pURPurchaseHeader.PaidAmount; _pURPurchaseHeaderWCF.RemainingAmount = _pURPurchaseHeader.RemainingAmount; _pURPurchaseHeaderWCF.LastDayToPay = _pURPurchaseHeader.LastDayToPay; _pURPurchaseHeaderWCF.TotalDiscountAmount = _pURPurchaseHeader.TotalDiscountAmount; _pURPurchaseHeaderWCF.TotalDiscountRatio = _pURPurchaseHeader.TotalDiscountRatio; _pURPurchaseHeaderWCF.IsClosed = _pURPurchaseHeader.IsClosed; _pURPurchaseHeaderWCF.IsVoid = _pURPurchaseHeader.IsVoid; _pURPurchaseHeaderWCF.IsPrinted = _pURPurchaseHeader.IsPrinted; _pURPurchaseHeaderWCF.ServicePrice = _pURPurchaseHeader.ServicePrice; _pURPurchaseHeaderWCF.TaxTypeID = _pURPurchaseHeader.TaxTypeID; _pURPurchaseHeaderWCF.RefuseReasonID = _pURPurchaseHeader.RefuseReasonID; _pURPurchaseHeaderWCF.CreatedBy = _pURPurchaseHeader.CreatedBy; _pURPurchaseHeaderWCF.CreateDate = _pURPurchaseHeader.CreateDate; _pURPurchaseHeaderWCF.UpdatedBy = _pURPurchaseHeader.UpdatedBy; _pURPurchaseHeaderWCF.updateDate = _pURPurchaseHeader.updateDate; _pURPurchaseHeaderWCF.IsDeleted = _pURPurchaseHeader.IsDeleted; _pURPurchaseHeaderWCF.DeletedBy = _pURPurchaseHeader.DeletedBy; _pURPurchaseHeaderWCF.DeleteDate = _pURPurchaseHeader.DeleteDate; PURPurcaseHeaderCollection.Add(_pURPurchaseHeaderWCF); } return(PURPurcaseHeaderCollection); }
public PURPurchaseHeaderCollection HeaderSearch(int InventoryID,DateTime FromDate,DateTime ToDate ,string SupplierName, string InvoiceNumber) { PURPurchaseHeaderCollection PURPurcaseHeaderCollection = new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeader.HeaderSearch(InventoryID,FromDate, ToDate ,SupplierName, InvoiceNumber)) { PURPurchaseHeader _pURPurchaseHeaderWCF = new PURPurchaseHeader(); _pURPurchaseHeaderWCF.PurcaseHeaderID = _pURPurchaseHeader.PurcaseHeaderID; _pURPurchaseHeaderWCF.PurchaseDate = _pURPurchaseHeader.PurchaseDate; _pURPurchaseHeaderWCF.SupplierID = _pURPurchaseHeader.SupplierID; _pURPurchaseHeaderWCF .SupplierName = _pURPurchaseHeader.SupplierName; _pURPurchaseHeaderWCF.InvoiceNumber = _pURPurchaseHeader.InvoiceNumber; _pURPurchaseHeaderWCF.InvoiceDate = _pURPurchaseHeader.InvoiceDate; // _pURPurchaseHeaderWCF.SellerID = _pURPurchaseHeader.SellerID; _pURPurchaseHeaderWCF.PaymentTypeID = _pURPurchaseHeader.PaymentTypeID; _pURPurchaseHeaderWCF.TotalPrice = _pURPurchaseHeader.TotalPrice; _pURPurchaseHeaderWCF.PaidAmount = _pURPurchaseHeader.PaidAmount; _pURPurchaseHeaderWCF.RemainingAmount = _pURPurchaseHeader.RemainingAmount; _pURPurchaseHeaderWCF.LastDayToPay = _pURPurchaseHeader.LastDayToPay; _pURPurchaseHeaderWCF.TotalDiscountAmount = _pURPurchaseHeader.TotalDiscountAmount; _pURPurchaseHeaderWCF.TotalDiscountRatio = _pURPurchaseHeader.TotalDiscountRatio; _pURPurchaseHeaderWCF.IsClosed = _pURPurchaseHeader.IsClosed; _pURPurchaseHeaderWCF.IsVoid = _pURPurchaseHeader.IsVoid; _pURPurchaseHeaderWCF.IsPrinted = _pURPurchaseHeader.IsPrinted; _pURPurchaseHeaderWCF.ServicePrice = _pURPurchaseHeader.ServicePrice; _pURPurchaseHeaderWCF.TaxTypeID = _pURPurchaseHeader.TaxTypeID; _pURPurchaseHeaderWCF.RefuseReasonID = _pURPurchaseHeader.RefuseReasonID; _pURPurchaseHeaderWCF.CreatedBy = _pURPurchaseHeader.CreatedBy; _pURPurchaseHeaderWCF.CreateDate = _pURPurchaseHeader.CreateDate; _pURPurchaseHeaderWCF.UpdatedBy = _pURPurchaseHeader.UpdatedBy; _pURPurchaseHeaderWCF.updateDate = _pURPurchaseHeader.updateDate; _pURPurchaseHeaderWCF.IsDeleted = _pURPurchaseHeader.IsDeleted; _pURPurchaseHeaderWCF.DeletedBy = _pURPurchaseHeader.DeletedBy; _pURPurchaseHeaderWCF.DeleteDate = _pURPurchaseHeader.DeleteDate; PURPurcaseHeaderCollection.Add(_pURPurchaseHeaderWCF); } return PURPurcaseHeaderCollection; }
private static PURPurchaseHeaderCollection PopulateFromReader(IDataReader rdr) { PURPurchaseHeaderCollection pURPurchaseHeaderCollection = new PURPurchaseHeaderCollection(); while (rdr.Read()) { PURPurchaseHeader obj = new PURPurchaseHeader(); obj.PurcaseHeaderID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.PurcaseHeaderID)); obj.PurchaseDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseHeaderFields.PurchaseDate)); obj.SupplierID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.SupplierID)); if (!rdr.IsDBNull(rdr.GetOrdinal("SupplierName"))) { obj.SupplierName = rdr.GetString(rdr.GetOrdinal("SupplierName")); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.InvoiceNumber))) { obj.InvoiceNumber = rdr.GetString(rdr.GetOrdinal(PURPurchaseHeaderFields.InvoiceNumber)); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.InvoiceDate))) { obj.InvoiceDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseHeaderFields.InvoiceDate)); } // if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.SellerID))) // { // obj.SellerID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.SellerID)); // } //if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.PaymentTypeID))) //{ // obj.PaymentTypeID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.PaymentTypeID)); //} obj.TotalPrice = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseHeaderFields.TotalPrice)); obj.PaidAmount = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseHeaderFields.PaidAmount)); obj.RemainingAmount = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseHeaderFields.RemainingAmount)); if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.LastDayToPay))) { obj.LastDayToPay = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseHeaderFields.LastDayToPay)); } obj.TotalDiscountAmount = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseHeaderFields.TotalDiscountAmount)); obj.TotalDiscountRatio = rdr.GetDouble(rdr.GetOrdinal(PURPurchaseHeaderFields.TotalDiscountRatio)); obj.IsClosed = rdr.GetBoolean(rdr.GetOrdinal(PURPurchaseHeaderFields.IsClosed)); obj.IsVoid = rdr.GetBoolean(rdr.GetOrdinal(PURPurchaseHeaderFields.IsVoid)); obj.IsPrinted = rdr.GetBoolean(rdr.GetOrdinal(PURPurchaseHeaderFields.IsPrinted)); obj.ServicePrice = rdr.GetDecimal(rdr.GetOrdinal(PURPurchaseHeaderFields.ServicePrice)); if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.TaxTypeID))) { obj.TaxTypeID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.TaxTypeID)); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.RefuseReasonID))) { obj.RefuseReasonID = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.RefuseReasonID)); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.CreatedBy))) { obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.CreatedBy)); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.CreateDate))) { obj.CreateDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseHeaderFields.CreateDate)); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.UpdatedBy))) { obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.UpdatedBy)); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.updateDate))) { obj.updateDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseHeaderFields.updateDate)); } obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(PURPurchaseHeaderFields.IsDeleted)); if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.DeletedBy))) { obj.DeletedBy = rdr.GetInt32(rdr.GetOrdinal(PURPurchaseHeaderFields.DeletedBy)); } if (!rdr.IsDBNull(rdr.GetOrdinal(PURPurchaseHeaderFields.DeleteDate))) { obj.DeleteDate = rdr.GetDateTime(rdr.GetOrdinal(PURPurchaseHeaderFields.DeleteDate)); } pURPurchaseHeaderCollection.Add(obj); } return pURPurchaseHeaderCollection; }
/// <summary> /// Populates the fields for multiple objects from the columns found in an open reader. /// </summary> /// /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param> /// /// <returns>Object of PURPurchaseHeaderCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 31/5/2015 10:35:27 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static PURPurchaseHeaderCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { PURPurchaseHeaderCollection list = new PURPurchaseHeaderCollection(); if (rdr.Read()) { PURPurchaseHeader obj = new PURPurchaseHeader(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new PURPurchaseHeader(); PopulateObjectFromReader(obj, rdr); list.Add(obj); } oDatabaseHelper.Dispose(); return list; } else { oDatabaseHelper.Dispose(); return null; } }
/// <summary> /// Populates the fields for multiple objects from the columns found in an open reader. /// </summary> /// /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param> /// /// <returns>Object of PURPurchaseHeaderCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 31/5/2015 10:35:27 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static PURPurchaseHeaderCollection PopulateObjectsFromReader(IDataReader rdr) { PURPurchaseHeaderCollection list = new PURPurchaseHeaderCollection(); while (rdr.Read()) { PURPurchaseHeader obj = new PURPurchaseHeader(); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }
/// <summary> /// This method will return a list of objects representing all records in the table. /// </summary> /// /// <returns>list of objects of class PURPurchaseHeader in the form of object of PURPurchaseHeaderCollection </returns> public PURPurchaseHeaderCollection SelectAll() { PURPurchaseHeaderCollection pURPurchaseHeaderCollection = new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeaderBase.SelectAll()) { _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; }
/// <summary> /// This method will return a list of objects representing the specified number of entries from the specified record number in the table /// using the value of the field specified /// </summary> /// /// <param name="field" type="string">Field of the class PURPurchaseHeader</param> /// <param name="fieldValue" type="object">Value for the field specified.</param> /// <param name="fieldValue2" type="object">Value for the field specified.</param> /// <param name="typeOperation" type="TypeOperation">Operator that is used if fieldValue2=null or fieldValue2="".</param> /// <param name="orderByStatement" type="string">The field value to number.</param> /// <param name="pageSize" type="int">Number of records returned.</param> /// <param name="skipPages" type="int">The number of missing pages.</param> /// /// <returns>List of object of class PURPurchaseHeader in the form of an object of class PURPurchaseHeaderCollection</returns> public PURPurchaseHeaderCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { PURPurchaseHeaderCollection pURPurchaseHeaderCollection = new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeaderBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, 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; }
/// <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="BDSupplierPrimaryKey">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 SelectAllByForeignKeySupplierIDPaged(BDSupplierPrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { PURPurchaseHeaderCollection pURPurchaseHeaderCollection=new PURPurchaseHeaderCollection(); foreach (POS.DataLayer.PURPurchaseHeader _pURPurchaseHeader in POS.DataLayer.PURPurchaseHeaderBase.SelectAllByForeignKeySupplierIDPaged(new POS.DataLayer.BDSupplierPrimaryKey(pk.SupplierID), 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; }