/// <summary> /// This method will return a list of objects representing all records in the table. /// </summary> /// /// <returns>list of objects of class BDCustomer in the form of object of BDCustomerCollection </returns> public BDCustomerCollection SelectAll() { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomerBase.SelectAll()) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; _bDCustomerWCF.Debit = _bDCustomer.Debit; _bDCustomerWCF.Credit = _bDCustomer.Credit; bDCustomerCollection.Add(_bDCustomerWCF); } return(bDCustomerCollection); }
/// <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 BDCustomer</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 BDCustomer in the form of an object of class BDCustomerCollection</returns> public BDCustomerCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomerBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement)) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; _bDCustomerWCF.Debit = _bDCustomer.Debit; _bDCustomerWCF.Credit = _bDCustomer.Credit; bDCustomerCollection.Add(_bDCustomerWCF); } return(bDCustomerCollection); }
/// <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 BDCustomer in the form of an object of class BDCustomerCollection </returns> public BDCustomerCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement) { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomerBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; _bDCustomerWCF.Debit = _bDCustomer.Debit; _bDCustomerWCF.Credit = _bDCustomer.Credit; bDCustomerCollection.Add(_bDCustomerWCF); } return(bDCustomerCollection); }
private void Search() { dgrid_Result.DataSource = null; string customerName = tbx_cusomerName.Text != "" ? tbx_cusomerName.Text : null; string customerCode = tbx_customerCode.Text != "" ? tbx_customerCode.Text : null; BDCustomerCollection customers = _bDCustomerWrapper.SearchByCriteria(customerName, customerCode); dgrid_Result.DataSource = customers; }
public BDCustomerCollection SearchByCriteria(string CustomerName, string CustomerCode) { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomer.SearcByCriteria(CustomerName, CustomerCode)) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; bDCustomerCollection.Add(_bDCustomerWCF); } return(bDCustomerCollection); }
/// <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 BDCustomer</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 BDCustomer in the form of an object of class BDCustomerCollection</returns> public BDCustomerCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation) { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomerBase.SelectByField(field, fieldValue, fieldValue2, typeOperation)) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; bDCustomerCollection.Add(_bDCustomerWCF); } return(bDCustomerCollection); }
public BDCustomerCollection SearchByCriteria(string CustomerName,string CustomerCode ) { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomer.SearcByCriteria(CustomerName,CustomerCode )) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; _bDCustomerWCF.Credit = _bDCustomer.Credit; _bDCustomerWCF.Debit = _bDCustomer.Debit; bDCustomerCollection.Add(_bDCustomerWCF); } return bDCustomerCollection; }
/// <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 BDCustomer</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 BDCustomer in the form of an object of class BDCustomerCollection</returns> public BDCustomerCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomerBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement)) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; _bDCustomerWCF.Debit = _bDCustomer.Debit; _bDCustomerWCF.Credit = _bDCustomer.Credit; bDCustomerCollection.Add(_bDCustomerWCF); } return bDCustomerCollection; }
/// <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 BDCustomer in the form of an object of class BDCustomerCollection </returns> public BDCustomerCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement) { BDCustomerCollection bDCustomerCollection = new BDCustomerCollection(); foreach (POS.DataLayer.BDCustomer _bDCustomer in POS.DataLayer.BDCustomerBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _bDCustomerWCF = new BDCustomer(); _bDCustomerWCF.CustomerID = _bDCustomer.CustomerID; _bDCustomerWCF.CustomerName = _bDCustomer.CustomerName; _bDCustomerWCF.CustomerCode = _bDCustomer.CustomerCode; _bDCustomerWCF.Address = _bDCustomer.Address; _bDCustomerWCF.Phone1 = _bDCustomer.Phone1; _bDCustomerWCF.Phone2 = _bDCustomer.Phone2; _bDCustomerWCF.Mobile1 = _bDCustomer.Mobile1; _bDCustomerWCF.Mobile2 = _bDCustomer.Mobile2; _bDCustomerWCF.Email = _bDCustomer.Email; _bDCustomerWCF.IsActive = _bDCustomer.IsActive; _bDCustomerWCF.Debit = _bDCustomer.Debit; _bDCustomerWCF.Credit = _bDCustomer.Credit; bDCustomerCollection.Add(_bDCustomerWCF); } return bDCustomerCollection; }
/// <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 BDCustomerCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 3/7/2015 2:37:01 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static BDCustomerCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { BDCustomerCollection list = new BDCustomerCollection(); if (rdr.Read()) { BDCustomer obj = new BDCustomer(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new BDCustomer(); 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 BDCustomerCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 3/7/2015 2:37:01 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static BDCustomerCollection PopulateObjectsFromReader(IDataReader rdr) { BDCustomerCollection list = new BDCustomerCollection(); while (rdr.Read()) { BDCustomer obj = new BDCustomer(); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }