/// <summary> /// This method will return a list of objects representing all records in the table. /// </summary> /// /// <returns>list of objects of class INVTakingInventory in the form of object of INVTakingInventoryCollection </returns> public INVTakingInventoryCollection SelectAll() { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in POS.DataLayer.INVTakingInventoryBase.SelectAll()) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.CreatedDate = _iNVTakingInventory.CreatedDate; _iNVTakingInventoryWCF.UpdatedBy = _iNVTakingInventory.UpdatedBy; _iNVTakingInventoryWCF.UpdateDate = _iNVTakingInventory.UpdateDate; _iNVTakingInventoryWCF.IsDeleted = _iNVTakingInventory.IsDeleted; _iNVTakingInventoryWCF.DeletedBy = _iNVTakingInventory.DeletedBy; _iNVTakingInventoryWCF.DeletedDate = _iNVTakingInventory.DeletedDate; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return(iNVTakingInventoryCollection); }
/// <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 INVTakingInventory</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 INVTakingInventory in the form of an object of class INVTakingInventoryCollection</returns> public INVTakingInventoryCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in POS.DataLayer.INVTakingInventoryBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement)) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.CreatedDate = _iNVTakingInventory.CreatedDate; _iNVTakingInventoryWCF.UpdatedBy = _iNVTakingInventory.UpdatedBy; _iNVTakingInventoryWCF.UpdateDate = _iNVTakingInventory.UpdateDate; _iNVTakingInventoryWCF.IsDeleted = _iNVTakingInventory.IsDeleted; _iNVTakingInventoryWCF.DeletedBy = _iNVTakingInventory.DeletedBy; _iNVTakingInventoryWCF.DeletedDate = _iNVTakingInventory.DeletedDate; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return(iNVTakingInventoryCollection); }
/// <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 INVTakingInventory in the form of an object of class INVTakingInventoryCollection </returns> public INVTakingInventoryCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement) { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in POS.DataLayer.INVTakingInventoryBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.CreatedDate = _iNVTakingInventory.CreatedDate; _iNVTakingInventoryWCF.UpdatedBy = _iNVTakingInventory.UpdatedBy; _iNVTakingInventoryWCF.UpdateDate = _iNVTakingInventory.UpdateDate; _iNVTakingInventoryWCF.IsDeleted = _iNVTakingInventory.IsDeleted; _iNVTakingInventoryWCF.DeletedBy = _iNVTakingInventory.DeletedBy; _iNVTakingInventoryWCF.DeletedDate = _iNVTakingInventory.DeletedDate; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return(iNVTakingInventoryCollection); }
public INVTakingInventoryCollection GetUnCommittedTaking() { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in new POS.DataLayer.INVTakingInventory().GetNotCommittedTaking()) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; _iNVTakingInventoryWCF.InventoryName = _iNVTakingInventory.InventoryName; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return iNVTakingInventoryCollection; }
public INVTakingInventoryCollection GetUnCommittedTaking() { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in new POS.DataLayer.INVTakingInventory().GetNotCommittedTaking()) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; _iNVTakingInventoryWCF.InventoryName = _iNVTakingInventory.InventoryName; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return(iNVTakingInventoryCollection); }
public INVTakingInventoryCollection GetNotCommittedTaking() { DatabaseHelper oDatabaseHelper = new DatabaseHelper(); bool ExecutionState = false; // The parameter '@dlgErrorCode' will contain the status after execution of the stored procedure. //oDatabaseHelper.AddParameter("@dlgErrorCode", -1, System.Data.ParameterDirection.Output); IDataReader dr = oDatabaseHelper.ExecuteReader("usp_INVTakingInventory_GetNotCommited", ref ExecutionState); INVTakingInventoryCollection list = new INVTakingInventoryCollection(); while (dr.Read()) { INVTakingInventory obj = new INVTakingInventory(); obj.TakingHeaderID = dr.GetInt32(dr.GetOrdinal(INVTakingInventoryFields.TakingHeaderID)); obj.TakingDate = dr.GetDateTime(dr.GetOrdinal(INVTakingInventoryFields.TakingDate)); obj.TakingName = dr.GetString(dr.GetOrdinal(INVTakingInventoryFields.TakingName)); if (!dr.IsDBNull(dr.GetOrdinal(INVTakingInventoryFields.Notes))) { obj.Notes = dr.GetString(dr.GetOrdinal(INVTakingInventoryFields.Notes)); } if (!dr.IsDBNull(dr.GetOrdinal(INVTakingInventoryFields.InventoryID))) { obj.InventoryID = dr.GetInt32(dr.GetOrdinal(INVTakingInventoryFields.InventoryID)); } //if (!dr.IsDBNull(dr.GetOrdinal("UserName"))) //{ // obj.CreatedBy = dr.GetString(dr.GetOrdinal("UserName")); //} if (!dr.IsDBNull(dr.GetOrdinal("InventoryName"))) { obj.InventoryName = dr.GetString(dr.GetOrdinal("InventoryName")); } list.Add(obj); } dr.Close(); oDatabaseHelper.Dispose(); return list; //usp_INVTakingInventory_GetNotCommited }
/// <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 INVTakingInventoryCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 3/7/2015 2:37:11 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static INVTakingInventoryCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { INVTakingInventoryCollection list = new INVTakingInventoryCollection(); if (rdr.Read()) { INVTakingInventory obj = new INVTakingInventory(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new INVTakingInventory(); 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 INVTakingInventoryCollection</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 3/7/2015 2:37:11 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static INVTakingInventoryCollection PopulateObjectsFromReader(IDataReader rdr) { INVTakingInventoryCollection list = new INVTakingInventoryCollection(); while (rdr.Read()) { INVTakingInventory obj = new INVTakingInventory(); 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 INVTakingInventory in the form of object of INVTakingInventoryCollection </returns> public INVTakingInventoryCollection SelectAll() { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in POS.DataLayer.INVTakingInventoryBase.SelectAll()) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.CreatedDate = _iNVTakingInventory.CreatedDate; _iNVTakingInventoryWCF.UpdatedBy = _iNVTakingInventory.UpdatedBy; _iNVTakingInventoryWCF.UpdateDate = _iNVTakingInventory.UpdateDate; _iNVTakingInventoryWCF.IsDeleted = _iNVTakingInventory.IsDeleted; _iNVTakingInventoryWCF.DeletedBy = _iNVTakingInventory.DeletedBy; _iNVTakingInventoryWCF.DeletedDate = _iNVTakingInventory.DeletedDate; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return iNVTakingInventoryCollection; }
/// <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 INVTakingInventory</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 INVTakingInventory in the form of an object of class INVTakingInventoryCollection</returns> public INVTakingInventoryCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement) { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in POS.DataLayer.INVTakingInventoryBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement)) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.CreatedDate = _iNVTakingInventory.CreatedDate; _iNVTakingInventoryWCF.UpdatedBy = _iNVTakingInventory.UpdatedBy; _iNVTakingInventoryWCF.UpdateDate = _iNVTakingInventory.UpdateDate; _iNVTakingInventoryWCF.IsDeleted = _iNVTakingInventory.IsDeleted; _iNVTakingInventoryWCF.DeletedBy = _iNVTakingInventory.DeletedBy; _iNVTakingInventoryWCF.DeletedDate = _iNVTakingInventory.DeletedDate; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return iNVTakingInventoryCollection; }
/// <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 INVTakingInventory in the form of an object of class INVTakingInventoryCollection </returns> public INVTakingInventoryCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement) { INVTakingInventoryCollection iNVTakingInventoryCollection = new INVTakingInventoryCollection(); foreach (POS.DataLayer.INVTakingInventory _iNVTakingInventory in POS.DataLayer.INVTakingInventoryBase.SelectAllPaged(pageSize, skipPages, orderByStatement)) { _iNVTakingInventoryWCF = new INVTakingInventory(); _iNVTakingInventoryWCF.TakingHeaderID = _iNVTakingInventory.TakingHeaderID; _iNVTakingInventoryWCF.TakingDate = _iNVTakingInventory.TakingDate; _iNVTakingInventoryWCF.TakingName = _iNVTakingInventory.TakingName; _iNVTakingInventoryWCF.CreatedBy = _iNVTakingInventory.CreatedBy; _iNVTakingInventoryWCF.CreatedDate = _iNVTakingInventory.CreatedDate; _iNVTakingInventoryWCF.UpdatedBy = _iNVTakingInventory.UpdatedBy; _iNVTakingInventoryWCF.UpdateDate = _iNVTakingInventory.UpdateDate; _iNVTakingInventoryWCF.IsDeleted = _iNVTakingInventory.IsDeleted; _iNVTakingInventoryWCF.DeletedBy = _iNVTakingInventory.DeletedBy; _iNVTakingInventoryWCF.DeletedDate = _iNVTakingInventory.DeletedDate; _iNVTakingInventoryWCF.Notes = _iNVTakingInventory.Notes; _iNVTakingInventoryWCF.InventoryID = _iNVTakingInventory.InventoryID; iNVTakingInventoryCollection.Add(_iNVTakingInventoryWCF); } return iNVTakingInventoryCollection; }