/// <summary> /// This method will return a list of objects representing all records in the table. /// </summary> /// /// <returns>list of objects of class PURPurchaseLineBatch in the form of object of PURPurchaseLineBatchCollection </returns> public PURPurchaseLineBatchCollection SelectAll() { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection = new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectAll()) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return pURPurchaseLineBatchCollection; }
/// <summary> /// This method will return a list of objects representing the specified number of entries from the specified record number in the table. /// </summary> /// /// <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>list of objects of class PURPurchaseLineBatch in the form of an object of class PURPurchaseLineBatchCollection </returns> public PURPurchaseLineBatchCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement) { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection = new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return(pURPurchaseLineBatchCollection); }
/// <summary> /// This method will get row(s) from the database using the value of the field specified /// </summary> /// /// <param name="field" type="string">Field of the class PURPurchaseLineBatch</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> /// /// <returns>List of object of class PURPurchaseLineBatch in the form of an object of class PURPurchaseLineBatchCollection</returns> public PURPurchaseLineBatchCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation) { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection = new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectByField(field, fieldValue, fieldValue2, typeOperation)) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return(pURPurchaseLineBatchCollection); }
/// <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 PURPurchaseLineBatchCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 3/7/2015 2:37:28 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static PURPurchaseLineBatchCollection PopulateObjectsFromReader(IDataReader rdr) { PURPurchaseLineBatchCollection list = new PURPurchaseLineBatchCollection(); while (rdr.Read()) { PURPurchaseLineBatch obj = new PURPurchaseLineBatch(); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }
/// <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 PURPurchaseLineBatchCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 3/7/2015 2:37:28 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static PURPurchaseLineBatchCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { PURPurchaseLineBatchCollection list = new PURPurchaseLineBatchCollection(); if (rdr.Read()) { PURPurchaseLineBatch obj = new PURPurchaseLineBatch(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new PURPurchaseLineBatch(); PopulateObjectFromReader(obj, rdr); list.Add(obj); } oDatabaseHelper.Dispose(); return list; } else { oDatabaseHelper.Dispose(); return null; } }
/// <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 PURPurchaseLineBatch</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 PURPurchaseLineBatch in the form of an object of class PURPurchaseLineBatchCollection</returns> public PURPurchaseLineBatchCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection = new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement)) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return pURPurchaseLineBatchCollection; }
/// <summary> /// This method will return a list of objects representing the specified number of entries from the specified record number in the table. /// </summary> /// /// <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>list of objects of class PURPurchaseLineBatch in the form of an object of class PURPurchaseLineBatchCollection </returns> public PURPurchaseLineBatchCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement) { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection = new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return pURPurchaseLineBatchCollection; }
/// <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="PURPurchaseLinePrimaryKey">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 PURPurchaseLineBatchCollection</returns> public PURPurchaseLineBatchCollection SelectAllByForeignKeyPurchaseLineIDPaged(PURPurchaseLinePrimaryKey pk, int pageSize, int skipPages, string orderByStatement) { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection=new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectAllByForeignKeyPurchaseLineIDPaged(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID), pageSize, skipPages, orderByStatement)) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return pURPurchaseLineBatchCollection; }
/// <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="PURPurchaseLinePrimaryKey">Primary Key information based on which data is to be fetched.</param> /// /// <returns>object of class PURPurchaseLineBatchCollection</returns> public PURPurchaseLineBatchCollection SelectAllByForeignKeyPurchaseLineID(PURPurchaseLinePrimaryKey pk) { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection=new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectAllByForeignKeyPurchaseLineID(new POS.DataLayer.PURPurchaseLinePrimaryKey(pk.PurchaseLineID))) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return pURPurchaseLineBatchCollection; }
/// <summary> /// This method will get row(s) from the database using the value of the field specified /// </summary> /// /// <param name="field" type="string">Field of the class PURPurchaseLineBatch</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> /// /// <returns>List of object of class PURPurchaseLineBatch in the form of an object of class PURPurchaseLineBatchCollection</returns> public PURPurchaseLineBatchCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation) { PURPurchaseLineBatchCollection pURPurchaseLineBatchCollection = new PURPurchaseLineBatchCollection(); foreach (POS.DataLayer.PURPurchaseLineBatch _pURPurchaseLineBatch in POS.DataLayer.PURPurchaseLineBatchBase.SelectByField(field, fieldValue, fieldValue2, typeOperation)) { _pURPurchaseLineBatchWCF = new PURPurchaseLineBatch(); _pURPurchaseLineBatchWCF.PurchaseLineBatchID = _pURPurchaseLineBatch.PurchaseLineBatchID; _pURPurchaseLineBatchWCF.PurchaseLineID = _pURPurchaseLineBatch.PurchaseLineID; _pURPurchaseLineBatchWCF.BatchID = _pURPurchaseLineBatch.BatchID; _pURPurchaseLineBatchWCF.Qty = _pURPurchaseLineBatch.Qty; pURPurchaseLineBatchCollection.Add(_pURPurchaseLineBatchWCF); } return pURPurchaseLineBatchCollection; }