Option Strict Off
Option Explicit On
Imports System.Linq
Imports System.Collections.Generic
Namespace FMSStore_Bus
   Public Class Product
   Private Const m_modName As String = "FMSStore_Bus.Product"
   Public Function FindByDescription(ByVal Description As String) As gmRTL.DataLib.SqlClient.Recordset
      FindByDescription = Nothing
      Dim obj As FMSStore_DB.Product = Nothing
      Try
         gmRTL.Core.GlobalException.ClearErrorObject()


         obj = New FMSStore_DB.Product
         FindByDescription = obj.FindByDescription(Description)
         obj = Nothing


         Exit Function

      Catch exc As System.Exception
         gmRTL.Core.GlobalException.SetErrorObject(exc)
         obj = Nothing

         FMStocks_DB.Helpers.RaiseError(m_modName,"FindByDescription(" & Description & ")",String.Empty,0,False)
      End Try
   End Function
   Public Function GetBySKU(ByVal SKU As Integer) As gmRTL.DataLib.SqlClient.Recordset
      GetBySKU = Nothing
      Dim obj As FMSStore_DB.Product = Nothing
      Try
         gmRTL.Core.GlobalException.ClearErrorObject()


         obj = New FMSStore_DB.Product
         GetBySKU = obj.GetBySKU(SKU)
         obj = Nothing


         Exit Function

      Catch exc As System.Exception
         gmRTL.Core.GlobalException.SetErrorObject(exc)
         obj = Nothing

         FMStocks_DB.Helpers.RaiseError(m_modName,"GetBySKU(" & SKU & ")",String.Empty,0,False)
      End Try
   End Function
   Public Function List() As gmRTL.DataLib.SqlClient.Recordset
      List = Nothing
      Dim obj As FMSStore_DB.Product = Nothing
      Try
         gmRTL.Core.GlobalException.ClearErrorObject()


         obj = New FMSStore_DB.Product
         List = obj.List()
         obj = Nothing


         Exit Function

      Catch exc As System.Exception
         gmRTL.Core.GlobalException.SetErrorObject(exc)
         obj = Nothing

         FMStocks_DB.Helpers.RaiseError(m_modName,"List()",String.Empty,0,False)
      End Try
   End Function
   End Class
End Namespace
