Imports CamadaDTO
Imports CamadaDAL
Public Class EnsaioBLL
    Public Function GetTodosEnsaios() As List(Of Ensaio)
        Dim db As New EnsaioDAL
        Return db.GetEnsaios()
    End Function
    Public Function GetEnsaioPorCodigo(ByVal _CodigoEnsaio As Integer) As Ensaio
        Dim db As New EnsaioDAL
        Return db.GetEnsaioPorId(_CodigoEnsaio)
    End Function
    Public Function GetEnsaiosPorData(ByVal _DataInicial As Date, ByVal _DataFinal As Date, ByVal _CodigoEnsaio As String) As List(Of Ensaio)
        Dim db As New EnsaioDAL
        Return db.GetEnsaiosPorData(_DataInicial, _DataFinal, _CodigoEnsaio)
    End Function
    Public Function SalvarFormEnsaio(ByVal numeroEnsaio As Integer, ByVal TextBoxNomeEnsaio As String, ByVal TextBoxNumeroLote As String, ByVal dataEnsaio As Date, ComboBoxNumeroAmostra As String, ByVal ComboBoxNumeroBlocos As String, ByVal ComboBoxReferenciasPorBloco As String, ByVal ComboBoxIntervaloEntreMedicoes As String, ByVal ComboBox1aIncubacao As String, ByVal ComboBox2aIncubacao As String, ByVal ComboBox3aIncubacao As String, ByVal ComboBoxReferencia01 As String, ByVal ComboBoxReferencia02 As String, ByVal ComboBoxReferencia03 As String, ByVal TextBoxConcentracao01 As String, ByVal TextBoxConcentracao02 As String, ByVal TextBoxConcentracao03 As String, ByVal ComboBoxUnidade01 As String, ByVal ComboBoxUnidade02 As String, ByVal ComboBoxUnidade03 As String, ByVal tecnicoResponsavel As String, ByVal ampola As String) As String
        Dim db As New EnsaioDAL
        Return db.SalvarFormEnsaio(numeroEnsaio, TextBoxNomeEnsaio, TextBoxNumeroLote, dataEnsaio, ComboBoxNumeroAmostra, ComboBoxNumeroBlocos, ComboBoxReferenciasPorBloco, ComboBoxIntervaloEntreMedicoes, ComboBox1aIncubacao, ComboBox2aIncubacao, ComboBox3aIncubacao, ComboBoxReferencia01, ComboBoxReferencia02, ComboBoxReferencia03, TextBoxConcentracao01, TextBoxConcentracao02, TextBoxConcentracao03, ComboBoxUnidade01, ComboBoxUnidade02, ComboBoxUnidade03, tecnicoResponsavel, ampola)
    End Function
    Public Function SalvaAtributoEnsaio(ByVal numeroEnsaio As Integer, ByVal campo As String, ByVal resultado As String)
        Dim db As New EnsaioDAL
        Return db.SalvaAtributoEnsaio(numeroEnsaio, campo, resultado)
    End Function

    Public Function Salvar(ByVal cls As Ensaio)
        Dim db As New EnsaioDAL
        Return db.Salva(cls)
    End Function
    Public Function DeletarEnsaio(ByVal _CodigoEnsaio As Integer)
        Dim db As New EnsaioDAL
        Return db.DeletaEnsaio(_CodigoEnsaio)
    End Function


End Class
