public VPurchaseReturnHeaderCollection SearchByCriteria(string CustomerName, string InvoiceNumber, DateTime DateFrom, DateTime DateTo) { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeader.SearchByriteria(CustomerName, DateFrom, DateTo, InvoiceNumber)) { VPurchaseReturnHeader _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return vPurchaseReturnHeaderCollection; }
/// <summary> /// This method will return a list of objects representing all records in the table. /// </summary> /// /// <returns>list of objects of class VPurchaseReturnHeader in the form of object of VPurchaseReturnHeaderCollection </returns> public VPurchaseReturnHeaderCollection SelectAll() { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeaderBase.SelectAll()) { _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return vPurchaseReturnHeaderCollection; }
public VPurchaseReturnHeaderCollection SearchByCriteria(string CustomerName, string InvoiceNumber, DateTime DateFrom, DateTime DateTo) { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeader.SearchByriteria(CustomerName, DateFrom, DateTo, InvoiceNumber)) { VPurchaseReturnHeader _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return(vPurchaseReturnHeaderCollection); }
/// <summary> /// This method will return a list of objects representing all records in the table. /// </summary> /// /// <returns>list of objects of class VPurchaseReturnHeader in the form of object of VPurchaseReturnHeaderCollection </returns> public VPurchaseReturnHeaderCollection SelectAll() { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeaderBase.SelectAll()) { _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return(vPurchaseReturnHeaderCollection); }
/// <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 VPurchaseReturnHeader</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 VPurchaseReturnHeader in the form of an object of class VPurchaseReturnHeaderCollection</returns> public VPurchaseReturnHeaderCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeaderBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement)) { _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return(vPurchaseReturnHeaderCollection); }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// /// <param name="vPurchaseReturnHeader" type="VPurchaseReturnHeader">This VPurchaseReturnHeader will be inserted in the database.</param> /// /// <returns>True if succeeded</returns> //public bool Insert(VPurchaseReturnHeader vPurchaseReturnHeader) //{ // _vPurchaseReturnHeader = new POS.DataLayer.VPurchaseReturnHeader(); // _vPurchaseReturnHeader.PurchaseReturnID=vPurchaseReturnHeader.PurchaseReturnID; // _vPurchaseReturnHeader.ReturnDate=vPurchaseReturnHeader.ReturnDate; // _vPurchaseReturnHeader.IsClosed=vPurchaseReturnHeader.IsClosed; // _vPurchaseReturnHeader.InvoiceNumber=vPurchaseReturnHeader.InvoiceNumber; // _vPurchaseReturnHeader.SupplierName=vPurchaseReturnHeader.SupplierName; // _vPurchaseReturnHeader.PurcaseHeaderID=vPurchaseReturnHeader.PurcaseHeaderID; // return _vPurchaseReturnHeader.Insert(); //} /// <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 VPurchaseReturnHeader in the form of an object of class VPurchaseReturnHeaderCollection </returns> public VPurchaseReturnHeaderCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement) { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeaderBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return(vPurchaseReturnHeaderCollection); }
/// <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 VPurchaseReturnHeader</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 VPurchaseReturnHeader in the form of an object of class VPurchaseReturnHeaderCollection</returns> public VPurchaseReturnHeaderCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeaderBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement)) { _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return vPurchaseReturnHeaderCollection; }
/// <summary> /// This method will insert one new row into the database using the property Information /// </summary> /// /// <param name="vPurchaseReturnHeader" type="VPurchaseReturnHeader">This VPurchaseReturnHeader will be inserted in the database.</param> /// /// <returns>True if succeeded</returns> //public bool Insert(VPurchaseReturnHeader vPurchaseReturnHeader) //{ // _vPurchaseReturnHeader = new POS.DataLayer.VPurchaseReturnHeader(); // _vPurchaseReturnHeader.PurchaseReturnID=vPurchaseReturnHeader.PurchaseReturnID; // _vPurchaseReturnHeader.ReturnDate=vPurchaseReturnHeader.ReturnDate; // _vPurchaseReturnHeader.IsClosed=vPurchaseReturnHeader.IsClosed; // _vPurchaseReturnHeader.InvoiceNumber=vPurchaseReturnHeader.InvoiceNumber; // _vPurchaseReturnHeader.SupplierName=vPurchaseReturnHeader.SupplierName; // _vPurchaseReturnHeader.PurcaseHeaderID=vPurchaseReturnHeader.PurcaseHeaderID; // return _vPurchaseReturnHeader.Insert(); //} /// <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 VPurchaseReturnHeader in the form of an object of class VPurchaseReturnHeaderCollection </returns> public VPurchaseReturnHeaderCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement) { VPurchaseReturnHeaderCollection vPurchaseReturnHeaderCollection = new VPurchaseReturnHeaderCollection(); foreach (POS.DataLayer.VPurchaseReturnHeader _vPurchaseReturnHeader in POS.DataLayer.VPurchaseReturnHeaderBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _vPurchaseReturnHeaderWCF = new VPurchaseReturnHeader(); _vPurchaseReturnHeaderWCF.PurchaseReturnID = _vPurchaseReturnHeader.PurchaseReturnID; _vPurchaseReturnHeaderWCF.ReturnDate = _vPurchaseReturnHeader.ReturnDate; _vPurchaseReturnHeaderWCF.IsClosed = _vPurchaseReturnHeader.IsClosed; _vPurchaseReturnHeaderWCF.InvoiceNumber = _vPurchaseReturnHeader.InvoiceNumber; _vPurchaseReturnHeaderWCF.SupplierName = _vPurchaseReturnHeader.SupplierName; _vPurchaseReturnHeaderWCF.PurcaseHeaderID = _vPurchaseReturnHeader.PurcaseHeaderID; vPurchaseReturnHeaderCollection.Add(_vPurchaseReturnHeaderWCF); } return vPurchaseReturnHeaderCollection; }
/// <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 VPurchaseReturnHeaderCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/4/2015 9:57:48 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static VPurchaseReturnHeaderCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { VPurchaseReturnHeaderCollection list = new VPurchaseReturnHeaderCollection(); if (rdr.Read()) { VPurchaseReturnHeader obj = new VPurchaseReturnHeader(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new VPurchaseReturnHeader(); 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 VPurchaseReturnHeaderCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/4/2015 9:57:48 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static VPurchaseReturnHeaderCollection PopulateObjectsFromReader(IDataReader rdr) { VPurchaseReturnHeaderCollection list = new VPurchaseReturnHeaderCollection(); while (rdr.Read()) { VPurchaseReturnHeader obj = new VPurchaseReturnHeader(); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }