Exemplo n.º 1
0
        /// <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="INVProductStockPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class INVProductStock</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			12/27/2014 6:56:07 PM				Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        public static INVProductStock SelectOneWithINVProductStockBatchUsingProductStockID(INVProductStockPrimaryKey pk)
        {
            DatabaseHelper  oDatabaseHelper = new DatabaseHelper();
            bool            ExecutionState  = false;
            INVProductStock obj             = null;

            // Pass the values of all key parameters to the stored procedure.
            System.Collections.Specialized.NameValueCollection nvc = pk.GetKeysAndValues();
            foreach (string key in nvc.Keys)
            {
                oDatabaseHelper.AddParameter("@" + key, nvc[key]);
            }

            // 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("gsp_INVProductStock_SelectOneWithINVProductStockBatchUsingProductStockID", ref ExecutionState);

            if (dr.Read())
            {
                obj = new INVProductStock();
                PopulateObjectFromReader(obj, dr);

                dr.NextResult();

                //Get the child records.
                obj.INVProductStockBatchCollectionUsingProductStockID = INVProductStockBatch.PopulateObjectsFromReader(dr);
            }
            dr.Close();
            oDatabaseHelper.Dispose();
            return(obj);
        }
Exemplo n.º 2
0
        /// <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="INVStockTypePrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class INVProductStockCollection</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			12/27/2014 6:56:07 PM				Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        public static INVProductStockCollection SelectAllByForeignKeyStockTypeID(INVStockTypePrimaryKey pk)
        {
            DatabaseHelper            oDatabaseHelper = new DatabaseHelper();
            bool                      ExecutionState  = false;
            INVProductStockCollection obj             = null;

            // Pass the values of all key parameters to the stored procedure.
            System.Collections.Specialized.NameValueCollection nvc = pk.GetKeysAndValues();
            foreach (string key in nvc.Keys)
            {
                oDatabaseHelper.AddParameter("@" + key, nvc[key]);
            }

            // 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("gsp_INVProductStock_SelectAllByForeignKeyStockTypeID", ref ExecutionState);

            obj = new INVProductStockCollection();
            obj = INVProductStock.PopulateObjectsFromReaderWithCheckingReader(dr, oDatabaseHelper);

            dr.Close();
            oDatabaseHelper.Dispose();
            return(obj);
        }
Exemplo n.º 3
0
        public bool InsertINVProductStockWithBatch(INVProductStock iNVProductStock)
        {
            bool           ExecutionState  = false;
            DatabaseHelper oDatabaseHelper = new DatabaseHelper();

            oDatabaseHelper.AddParameter("@ProductID", iNVProductStock.ProductID);

            oDatabaseHelper.AddParameter("@TotalQty", iNVProductStock.TotalQty);

            oDatabaseHelper.AddParameter("@CreatedBy", iNVProductStock.CreatedBy);

            oDatabaseHelper.AddParameter("@InventoryID", iNVProductStock.InventoryID);

            oDatabaseHelper.AddParameter("@BatchNumber", iNVProductStock.BatchNo);

            oDatabaseHelper.AddParameter("@ExpiryDate", iNVProductStock.ExpiryDate);

            oDatabaseHelper.AddParameter("@BatchQty", iNVProductStock.BatchQty);

            oDatabaseHelper.AddParameter("@dlgErrorCode", -1, System.Data.ParameterDirection.Output);

            oDatabaseHelper.ExecuteScalar("usp_INVProductStock_InsertProductStockWithBatches", ref ExecutionState);

            oDatabaseHelper.Dispose();
            return(ExecutionState);
        }
Exemplo n.º 4
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 INVProductStockCollection</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			12/27/2014 6:56:07 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static INVProductStockCollection PopulateObjectsFromReader(IDataReader rdr)
        {
            INVProductStockCollection list = new INVProductStockCollection();

            while (rdr.Read())
            {
                INVProductStock obj = new INVProductStock();
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
            }
            return(list);
        }
Exemplo n.º 5
0
        /// <summary>
        /// This method will insert one new row into the database using the property Information
        /// </summary>
        ///
        /// <param name="iNVProductStock" type="INVProductStock">This INVProductStock  will be inserted in the database.</param>
        ///
        /// <returns>True if succeeded</returns>
        public bool Insert(INVProductStock iNVProductStock)
        {
            _iNVProductStock = new POS.DataLayer.INVProductStock();
            _iNVProductStock.ProductStockID = iNVProductStock.ProductStockID;
            _iNVProductStock.ProductID      = iNVProductStock.ProductID;
            _iNVProductStock.TotalQty       = iNVProductStock.TotalQty;
            _iNVProductStock.StockTypeID    = iNVProductStock.StockTypeID;
            _iNVProductStock.OpeningQty     = iNVProductStock.OpeningQty;
            _iNVProductStock.OpennigDate    = iNVProductStock.OpennigDate;
            _iNVProductStock.CreateDate     = iNVProductStock.CreateDate;
            _iNVProductStock.CreatedBy      = iNVProductStock.CreatedBy;
            _iNVProductStock.UpdateDate     = iNVProductStock.UpdateDate;
            _iNVProductStock.UpdatedBy      = iNVProductStock.UpdatedBy;

            return(_iNVProductStock.Insert());
        }
Exemplo n.º 6
0
        ///<summary>
        /// This method will update one new row into the database using the property Information
        /// </summary>
        ///
        /// <param name="iNVProductStock" type="INVProductStock">This INVProductStock  will be updated in the database.</param>
        ///
        /// <returns>True if succeeded</returns>
        public bool Update(INVProductStock iNVProductStock)
        {
            _iNVProductStock = POS.DataLayer.INVProductStock.SelectOne(new POS.DataLayer.INVProductStockPrimaryKey(iNVProductStock.ProductStockID));

            _iNVProductStock.ProductID   = iNVProductStock.ProductID;
            _iNVProductStock.TotalQty    = iNVProductStock.TotalQty;
            _iNVProductStock.StockTypeID = iNVProductStock.StockTypeID;
            _iNVProductStock.OpeningQty  = iNVProductStock.OpeningQty;
            _iNVProductStock.OpennigDate = iNVProductStock.OpennigDate;
            _iNVProductStock.CreateDate  = iNVProductStock.CreateDate;
            _iNVProductStock.CreatedBy   = iNVProductStock.CreatedBy;
            _iNVProductStock.UpdateDate  = iNVProductStock.UpdateDate;
            _iNVProductStock.UpdatedBy   = iNVProductStock.UpdatedBy;

            return(_iNVProductStock.Update());
        }
Exemplo n.º 7
0
        /// <summary>
        /// This method will return an object representing the record matching the primary key information specified.
        /// </summary>
        ///
        /// <param name="pk" type="INVProductStockPrimaryKey">Primary Key information based on which data is to be fetched.</param>
        ///
        /// <returns>object of class INVProductStock</returns>
        public INVProductStock SelectOne(INVProductStockPrimaryKey pk)
        {
            _iNVProductStockWCF = new INVProductStock();
            _iNVProductStock    = POS.DataLayer.INVProductStockBase.SelectOne(new POS.DataLayer.INVProductStockPrimaryKey(pk.ProductStockID));

            _iNVProductStockWCF.ProductStockID = _iNVProductStock.ProductStockID;
            _iNVProductStockWCF.ProductID      = _iNVProductStock.ProductID;
            _iNVProductStockWCF.TotalQty       = _iNVProductStock.TotalQty;
            _iNVProductStockWCF.StockTypeID    = _iNVProductStock.StockTypeID;
            _iNVProductStockWCF.OpeningQty     = _iNVProductStock.OpeningQty;
            _iNVProductStockWCF.OpennigDate    = _iNVProductStock.OpennigDate;
            _iNVProductStockWCF.CreateDate     = _iNVProductStock.CreateDate;
            _iNVProductStockWCF.CreatedBy      = _iNVProductStock.CreatedBy;
            _iNVProductStockWCF.UpdateDate     = _iNVProductStock.UpdateDate;
            _iNVProductStockWCF.UpdatedBy      = _iNVProductStock.UpdatedBy;

            return(_iNVProductStockWCF);
        }
Exemplo n.º 8
0
		/// <summary>
		/// This method will return an object representing the record matching the primary key information specified.
		/// </summary>
		///
		/// <param name="pk" type="INVProductStockPrimaryKey">Primary Key information based on which data is to be fetched.</param>
		///
		/// <returns>object of class INVProductStock</returns>
		public INVProductStock SelectOne(INVProductStockPrimaryKey pk)
		{
			_iNVProductStockWCF = new INVProductStock();
			_iNVProductStock = POS.DataLayer.INVProductStockBase.SelectOne(new POS.DataLayer.INVProductStockPrimaryKey(pk.ProductStockID));
			
				_iNVProductStockWCF.ProductStockID = _iNVProductStock.ProductStockID;
				_iNVProductStockWCF.ProductID = _iNVProductStock.ProductID;
				_iNVProductStockWCF.TotalQty = _iNVProductStock.TotalQty;
				_iNVProductStockWCF.StockTypeID = _iNVProductStock.StockTypeID;
				_iNVProductStockWCF.OpeningQty = _iNVProductStock.OpeningQty;
				_iNVProductStockWCF.OpennigDate = _iNVProductStock.OpennigDate;
				_iNVProductStockWCF.CreateDate = _iNVProductStock.CreateDate;
				_iNVProductStockWCF.CreatedBy = _iNVProductStock.CreatedBy;
				_iNVProductStockWCF.UpdateDate = _iNVProductStock.UpdateDate;
				_iNVProductStockWCF.UpdatedBy = _iNVProductStock.UpdatedBy;
				_iNVProductStockWCF.InventoryID = _iNVProductStock.InventoryID;
				_iNVProductStockWCF.IsBlocked = _iNVProductStock.IsBlocked;
				
			return _iNVProductStockWCF;
		}
Exemplo n.º 9
0
        private static INVProductStockCollection Fill(IDataReader dr, bool getWithBatch)
        {
            INVProductStockCollection collection = new INVProductStockCollection();

            while (dr.Read())
            {
                INVProductStock obj = new INVProductStock();
                obj.ProductStockID = dr.GetInt32(dr.GetOrdinal(ALLINVProductStockFields.ProductStockID));
                obj.ProductID      = dr.GetInt32(dr.GetOrdinal(ALLINVProductStockFields.ProductID));
                obj.TotalQty       = dr.GetDecimal(dr.GetOrdinal(ALLINVProductStockFields.TotalQty));
                obj.StockTypeID    = dr.GetInt32(dr.GetOrdinal(ALLINVProductStockFields.StockTypeID));
                obj.ProductName    = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.ProductName));
                obj.StockType      = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.StockTypeName));
                if (!dr.IsDBNull(dr.GetOrdinal(ALLINVProductStockFields.ProductCode)))
                {
                    obj.ProductCode = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.ProductCode));
                }
                if (dr.GetOrdinal("IsAcceptBatch") != null)
                {
                    obj.IsAcceptBatch = dr.GetBoolean(dr.GetOrdinal("IsAcceptBatch"));
                }
                if (getWithBatch)
                {
                    if (dr.GetOrdinal(ALLINVProductStockFields.BatchNumber) != null)
                    {
                        obj.BatchNo = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.BatchNumber));
                    }
                    if (dr.GetOrdinal(ALLINVProductStockFields.ExpiryDate) != null)
                    {
                        obj.ExpiryDate = dr.GetDateTime(dr.GetOrdinal(ALLINVProductStockFields.ExpiryDate));
                    }
                    if (dr.GetOrdinal(ALLINVProductStockFields.BatchQty) != null)
                    {
                        obj.BatchQty = dr.GetDecimal(dr.GetOrdinal(ALLINVProductStockFields.BatchQty));
                    }
                }
                collection.Add(obj);
            }
            return(collection);
        }
Exemplo n.º 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 INVProductStockCollection</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			12/27/2014 6:56:07 PM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static INVProductStockCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper)
        {
            INVProductStockCollection list = new INVProductStockCollection();

            if (rdr.Read())
            {
                INVProductStock obj = new INVProductStock();
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
                while (rdr.Read())
                {
                    obj = new INVProductStock();
                    PopulateObjectFromReader(obj, rdr);
                    list.Add(obj);
                }
                oDatabaseHelper.Dispose();
                return(list);
            }
            else
            {
                oDatabaseHelper.Dispose();
                return(null);
            }
        }
Exemplo n.º 11
0
		/// <summary>
		/// This method will insert one new row into the database using the property Information
		/// </summary>
		///
		/// <param name="iNVProductStock" type="INVProductStock">This INVProductStock  will be inserted in the database.</param>
		///
		/// <returns>True if succeeded</returns>
		public bool Insert(INVProductStock iNVProductStock)
		{
			_iNVProductStock = new POS.DataLayer.INVProductStock();
			_iNVProductStock.ProductStockID=iNVProductStock.ProductStockID;
			_iNVProductStock.ProductID=iNVProductStock.ProductID;
			_iNVProductStock.TotalQty=iNVProductStock.TotalQty;
			_iNVProductStock.StockTypeID=iNVProductStock.StockTypeID;
			_iNVProductStock.OpeningQty=iNVProductStock.OpeningQty;
			_iNVProductStock.OpennigDate=iNVProductStock.OpennigDate;
			_iNVProductStock.CreateDate=iNVProductStock.CreateDate;
			_iNVProductStock.CreatedBy=iNVProductStock.CreatedBy;
			_iNVProductStock.UpdateDate=iNVProductStock.UpdateDate;
			_iNVProductStock.UpdatedBy=iNVProductStock.UpdatedBy;
			_iNVProductStock.InventoryID=iNVProductStock.InventoryID;
			_iNVProductStock.IsBlocked=iNVProductStock.IsBlocked;
			
			return _iNVProductStock.Insert();
		}
Exemplo n.º 12
0
			///<summary>
		/// This method will update one new row into the database using the property Information
		/// </summary>
		///
		/// <param name="iNVProductStock" type="INVProductStock">This INVProductStock  will be updated in the database.</param>
		///
		/// <returns>True if succeeded</returns>
		public bool Update(INVProductStock iNVProductStock)
		{
			_iNVProductStock=POS.DataLayer.INVProductStock.SelectOne(new POS.DataLayer.INVProductStockPrimaryKey(iNVProductStock.ProductStockID));
			
			_iNVProductStock.ProductID=iNVProductStock.ProductID;
			_iNVProductStock.TotalQty=iNVProductStock.TotalQty;
			_iNVProductStock.StockTypeID=iNVProductStock.StockTypeID;
			_iNVProductStock.OpeningQty=iNVProductStock.OpeningQty;
			_iNVProductStock.OpennigDate=iNVProductStock.OpennigDate;
			_iNVProductStock.CreateDate=iNVProductStock.CreateDate;
			_iNVProductStock.CreatedBy=iNVProductStock.CreatedBy;
			_iNVProductStock.UpdateDate=iNVProductStock.UpdateDate;
			_iNVProductStock.UpdatedBy=iNVProductStock.UpdatedBy;
			_iNVProductStock.InventoryID=iNVProductStock.InventoryID;
			_iNVProductStock.IsBlocked=iNVProductStock.IsBlocked;
			
			return _iNVProductStock.Update();
		}
Exemplo n.º 13
0
        private static INVProductStockCollection Fill(IDataReader dr, bool getWithBatch)
        {
            INVProductStockCollection collection = new INVProductStockCollection();

            while (dr.Read())
            {
                INVProductStock obj = new INVProductStock();
                obj.ProductStockID = dr.GetInt32(dr.GetOrdinal(ALLINVProductStockFields.ProductStockID));
                obj.ProductID = dr.GetInt32(dr.GetOrdinal(ALLINVProductStockFields.ProductID));
                obj.TotalQty = dr.GetDecimal(dr.GetOrdinal(ALLINVProductStockFields.TotalQty));
                obj.StockTypeID = dr.GetInt32(dr.GetOrdinal(ALLINVProductStockFields.StockTypeID));
                obj.ProductName = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.ProductName));
                obj.StockType = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.StockTypeName));
                if (!dr.IsDBNull(dr.GetOrdinal(ALLINVProductStockFields.ProductCode)))
                {
                    obj.ProductCode = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.ProductCode));
                }
                if (dr.GetOrdinal("IsAcceptBatch") != null)
                {
                    obj.IsAcceptBatch = dr.GetBoolean(dr.GetOrdinal("IsAcceptBatch"));
                }
                if (getWithBatch)
                {
                    if (dr.GetOrdinal(ALLINVProductStockFields.BatchNumber) != null)
                    {
                        obj.BatchNo = dr.GetString(dr.GetOrdinal(ALLINVProductStockFields.BatchNumber));
                    }
                    if (dr.GetOrdinal(ALLINVProductStockFields.ExpiryDate) != null)
                    {
                        obj.ExpiryDate = dr.GetDateTime(dr.GetOrdinal(ALLINVProductStockFields.ExpiryDate));
                    }
                    if (dr.GetOrdinal(ALLINVProductStockFields.BatchQty) != null)
                    {
                        obj.BatchQty = dr.GetDecimal(dr.GetOrdinal(ALLINVProductStockFields.BatchQty));
                    }
                   
                }
                collection.Add(obj);

            }
            return collection;
        }
Exemplo n.º 14
0
        public bool InsertINVProductStockWithBatch(INVProductStock iNVProductStock)
        {
            bool ExecutionState = false;
            DatabaseHelper oDatabaseHelper = new DatabaseHelper();

            oDatabaseHelper.AddParameter("@ProductID", iNVProductStock.ProductID);

            oDatabaseHelper.AddParameter("@TotalQty", iNVProductStock.TotalQty);

            oDatabaseHelper.AddParameter("@CreatedBy", iNVProductStock.CreatedBy);

            oDatabaseHelper.AddParameter("@InventoryID", iNVProductStock.InventoryID);

            oDatabaseHelper.AddParameter("@BatchNumber", iNVProductStock.BatchNo);

            oDatabaseHelper.AddParameter("@ExpiryDate", iNVProductStock.ExpiryDate);

            oDatabaseHelper.AddParameter("@BatchQty", iNVProductStock.BatchQty);

            oDatabaseHelper.AddParameter("@dlgErrorCode", -1, System.Data.ParameterDirection.Output);

            oDatabaseHelper.ExecuteScalar("usp_INVProductStock_InsertProductStockWithBatches", ref ExecutionState);

            oDatabaseHelper.Dispose();
            return ExecutionState;
        }
Exemplo n.º 15
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 INVProductStockCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:24 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVProductStockCollection PopulateObjectsFromReader(IDataReader rdr) 
		{
			INVProductStockCollection list = new INVProductStockCollection();
			
			while (rdr.Read())
			{
				INVProductStock obj = new INVProductStock();
				PopulateObjectFromReader(obj,rdr);
				list.Add(obj);
			}
			return list;
			
		}
Exemplo n.º 16
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 INVProductStockCollection</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:24 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		internal static INVProductStockCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) 
		{

			INVProductStockCollection list = new INVProductStockCollection();
			
            if (rdr.Read())
			{
				INVProductStock obj = new INVProductStock();
				PopulateObjectFromReader(obj, rdr);
				list.Add(obj);
				while (rdr.Read())
				{
					obj = new INVProductStock();
					PopulateObjectFromReader(obj, rdr);
					list.Add(obj);
				}
				oDatabaseHelper.Dispose();
				return list;
			}
			else
			{
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}
Exemplo n.º 17
0
		/// <summary>
		/// This method will return an object representing the record matching the primary key information specified.
		/// </summary>
		///
		/// <param name="pk" type="INVProductStockPrimaryKey">Primary Key information based on which data is to be fetched.</param>
		///
		/// <returns>object of class INVProductStock</returns>
		///
		/// <remarks>
		///
		/// <RevisionHistory>
		/// Author				Date			Description
		/// DLGenerator			3/7/2015 2:37:24 PM		Created function
		/// 
		/// </RevisionHistory>
		///
		/// </remarks>
		///
		public static INVProductStock SelectOne(INVProductStockPrimaryKey pk)
		{
			DatabaseHelper oDatabaseHelper = new DatabaseHelper();
			bool ExecutionState = false;
			
			// Pass the values of all key parameters to the stored procedure.
			System.Collections.Specialized.NameValueCollection nvc = pk.GetKeysAndValues();
			foreach (string key in nvc.Keys)
			{
				oDatabaseHelper.AddParameter("@" + key,nvc[key] );
			}
			// 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("gsp_INVProductStock_SelectbyPrimaryKey", ref ExecutionState);
			if (dr.Read())
			{
				INVProductStock obj=new INVProductStock();	
				PopulateObjectFromReader(obj,dr);
				dr.Close();              
				oDatabaseHelper.Dispose();
				return obj;
			}
			else
			{
				dr.Close();
				oDatabaseHelper.Dispose();
				return null;
			}
			
		}