public StoreProductHistory Get(int nID, int nUserID)
        {
            Connection.Open();
            Command.CommandText = StoreProductHistoryDA.Get(nID, nUserID);

            SqlDataReader       reader = Command.ExecuteReader();
            StoreProductHistory _oStoreProductHistory = new StoreProductHistory();

            if (reader.HasRows)
            {
                _oStoreProductHistory = MakeObject(reader);
            }
            reader.Close();
            Connection.Close();
            return(_oStoreProductHistory);
        }
        public List <StoreProductHistory> Gets(int nBUID, int nUserID)
        {
            Connection.Open();
            Command.CommandText = StoreProductHistoryDA.Gets(nBUID, nUserID);

            SqlDataReader              reader = Command.ExecuteReader();
            StoreProductHistory        _oStoreProductHistory  = new StoreProductHistory();
            List <StoreProductHistory> _oStoreProductHistorys = new List <StoreProductHistory>();

            if (reader.HasRows)
            {
                _oStoreProductHistorys = MakeObjects(reader);
            }
            reader.Close();
            Connection.Close();
            return(_oStoreProductHistorys);
        }
        public string Delete(StoreProductHistory oStoreProductHistory, int nUserID)
        {
            string sReturnMessage = "";

            Connection.Open();
            Command.CommandText = StoreProductHistoryDA.IUD(oStoreProductHistory, EnumDBOperation.Delete, nUserID);
            try
            {
                Command.ExecuteNonQuery();
            }
            catch (Exception e)
            {
                sReturnMessage = e.Message.Split('~')[0];
            }
            Connection.Close();
            return(sReturnMessage);
        }