Exemple #1
0
        private void Search()
        {
            dgrid_Result.DataSource = null;
            string inventoryName = tbx_Name.Text != "" ? tbx_Name.Text : null;
            INVInventoryCollection inventorys = _invInventoryWrapper.SearchByCriteria(inventoryName);

            dgrid_Result.DataSource = inventorys;
        }
Exemple #2
0
        public INVInventoryCollection SearchByCriteria(string InventoryName)
        {
            INVInventoryCollection invInventoryCollection = new INVInventoryCollection();
            foreach (POS.DataLayer.INVInventory _invInventory in POS.DataLayer.INVInventory.SearcByCriteria(InventoryName))
            {
                _invInventoryWCF = new INVInventory();

                _invInventoryWCF.InventoryID = _invInventory.InventoryID;
                _invInventoryWCF.InventoryName = _invInventory.InventoryName;
                _invInventoryWCF.Notes = _invInventory.Notes;

                invInventoryCollection.Add(_invInventoryWCF);
            }
            return invInventoryCollection;
        }
        /// <summary>
        /// This method will return a list of objects representing all records in the table.
        /// </summary>
        ///
        /// <returns>list of objects of class INVInventory in the form of object of INVInventoryCollection </returns>
        public INVInventoryCollection SelectAll()
        {
            INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();

            foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectAll())
            {
                _iNVInventoryWCF = new INVInventory();

                _iNVInventoryWCF.InventoryID   = _iNVInventory.InventoryID;
                _iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
                _iNVInventoryWCF.Notes         = _iNVInventory.Notes;

                iNVInventoryCollection.Add(_iNVInventoryWCF);
            }
            return(iNVInventoryCollection);
        }
        /// <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 INVInventory</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 INVInventory in the form of an object of class INVInventoryCollection</returns>
        public INVInventoryCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
        {
            INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();

            foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
            {
                _iNVInventoryWCF = new INVInventory();

                _iNVInventoryWCF.InventoryID   = _iNVInventory.InventoryID;
                _iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
                _iNVInventoryWCF.Notes         = _iNVInventory.Notes;

                iNVInventoryCollection.Add(_iNVInventoryWCF);
            }
            return(iNVInventoryCollection);
        }
        /// <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 INVInventory in the form of an object of class INVInventoryCollection </returns>
        public INVInventoryCollection SelectAllPaged(int?pageSize, int?skipPages, string orderByStatement)
        {
            INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();

            foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
            {
                _iNVInventoryWCF = new INVInventory();

                _iNVInventoryWCF.InventoryID   = _iNVInventory.InventoryID;
                _iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
                _iNVInventoryWCF.Notes         = _iNVInventory.Notes;

                iNVInventoryCollection.Add(_iNVInventoryWCF);
            }
            return(iNVInventoryCollection);
        }
        /// <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 INVInventory</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 INVInventory in the form of an object of class INVInventoryCollection</returns>
        public INVInventoryCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
        {
            INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();

            foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
            {
                _iNVInventoryWCF = new INVInventory();

                _iNVInventoryWCF.InventoryID   = _iNVInventory.InventoryID;
                _iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
                _iNVInventoryWCF.Notes         = _iNVInventory.Notes;

                iNVInventoryCollection.Add(_iNVInventoryWCF);
            }
            return(iNVInventoryCollection);
        }
		/// <summary>
		/// This method will return a list of objects representing all records in the table.
		/// </summary>
		///
		/// <returns>list of objects of class INVInventory in the form of object of INVInventoryCollection </returns>
		public INVInventoryCollection SelectAll()
		{
			INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();
			foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectAll())
			{
				_iNVInventoryWCF = new INVInventory();
				
				_iNVInventoryWCF.InventoryID = _iNVInventory.InventoryID;
				_iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
				_iNVInventoryWCF.Notes = _iNVInventory.Notes;
				_iNVInventoryWCF.IsBasic = _iNVInventory.IsBasic;
				
				iNVInventoryCollection.Add(_iNVInventoryWCF);
			}
			return iNVInventoryCollection;
		}
Exemple #8
0
        public INVInventoryCollection SearchByCriteria(string InventoryName)
        {
            INVInventoryCollection invInventoryCollection = new INVInventoryCollection();

            foreach (POS.DataLayer.INVInventory _invInventory in POS.DataLayer.INVInventory.SearcByCriteria(InventoryName))
            {
                _invInventoryWCF = new INVInventory();

                _invInventoryWCF.InventoryID   = _invInventory.InventoryID;
                _invInventoryWCF.InventoryName = _invInventory.InventoryName;
                _invInventoryWCF.Notes         = _invInventory.Notes;

                invInventoryCollection.Add(_invInventoryWCF);
            }
            return(invInventoryCollection);
        }
Exemple #9
0
		/// <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 INVInventoryCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			5/3/2015 10:23:04 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVInventoryCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			INVInventoryCollection list = new INVInventoryCollection();
			
			while (rdr.Read())
			{
				INVInventory obj = new INVInventory();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
Exemple #10
0
		/// <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 INVInventoryCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			5/3/2015 10:23:04 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVInventoryCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			INVInventoryCollection list = new INVInventoryCollection();
			
            if (rdr.Read())
			{
				INVInventory obj = new INVInventory();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new INVInventory();
					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 INVInventory</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 INVInventory in the form of an object of class INVInventoryCollection</returns>
		public INVInventoryCollection SelectByFieldPaged(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation, int pageSize, int skipPages, string orderByStatement)
		{
			INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();
			foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectByFieldPaged(field, fieldValue, fieldValue2, typeOperation, pageSize, skipPages, orderByStatement))
			{
				_iNVInventoryWCF = new INVInventory();
				
				_iNVInventoryWCF.InventoryID = _iNVInventory.InventoryID;
				_iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
				_iNVInventoryWCF.Notes = _iNVInventory.Notes;
				_iNVInventoryWCF.IsBasic = _iNVInventory.IsBasic;
				
				iNVInventoryCollection.Add(_iNVInventoryWCF);
			}
			return iNVInventoryCollection;
		}
		/// <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 INVInventory in the form of an object of class INVInventoryCollection </returns>
		public INVInventoryCollection SelectAllPaged(int? pageSize, int? skipPages, string orderByStatement)
		{
			INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();
			foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectAllPaged(pageSize, skipPages, orderByStatement))
			{
				_iNVInventoryWCF = new INVInventory();
				
				_iNVInventoryWCF.InventoryID = _iNVInventory.InventoryID;
				_iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
				_iNVInventoryWCF.Notes = _iNVInventory.Notes;
				_iNVInventoryWCF.IsBasic = _iNVInventory.IsBasic;
				
				iNVInventoryCollection.Add(_iNVInventoryWCF);
			}
			return iNVInventoryCollection;
		}
		/// <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 INVInventory</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 INVInventory in the form of an object of class INVInventoryCollection</returns>
		public INVInventoryCollection SelectByField(string field, object fieldValue, object fieldValue2, TypeOperation typeOperation)
		{
			INVInventoryCollection iNVInventoryCollection = new INVInventoryCollection();
			foreach (POS.DataLayer.INVInventory _iNVInventory in POS.DataLayer.INVInventoryBase.SelectByField(field, fieldValue, fieldValue2, typeOperation))
			{
				_iNVInventoryWCF = new INVInventory();
				
				_iNVInventoryWCF.InventoryID = _iNVInventory.InventoryID;
				_iNVInventoryWCF.InventoryName = _iNVInventory.InventoryName;
				_iNVInventoryWCF.Notes = _iNVInventory.Notes;
				_iNVInventoryWCF.IsBasic = _iNVInventory.IsBasic;
				
				iNVInventoryCollection.Add(_iNVInventoryWCF);
			}
			return iNVInventoryCollection;
		}