Imports System.Data.SqlClient

Public Class clsEmpresa

    Private _CODIGO_EMP As Long
    Private _CODIGO_FUNC As Integer

    Private _CODIGO_SEG As Integer
    Private _CODIGO_TIER As Integer
    Private _CODIGO_REG As Integer
    Private _CODIGO_CORP As Integer

    Private _NOME_EMP As String
    Private _FANTASIA_EMP As String
    Private _ENDERECOFATUR_EMP As String
    Private _NUMEROFATUR_EMP As String
    Private _COMPLEMENTOFATUR_EMP As String
    Private _BAIRROFATUR_EMP As String
    Private _CEPFATUR_EMP As String
    Private _CIDADEFATUR_EMP As String
    Private _ESTADOFATUR_EMP As String
    Private _CNPJFATUR_EMP As String
    Private _IEFATUR_EMP As String
    Private _IMFATUR_EMP As String
    Private _EMAILFATUR_EMP As String
    Private _TELEFONEFATUR_EMP As String
    Private _CELULARFATUR_EMP As String
    Private _ENDERECOENTREGA_EMP As String
    Private _NUMEROENTREGA_EMP As String
    Private _COMPLEMENTOENTREGA_EMP As String
    Private _BAIRROENTREGA_EMP As String
    Private _CEPENTREGA_EMP As String
    Private _CIDADEENTREGA_EMP As String
    Private _ESTADOENTREGA_EMP As String
    Private _CNPJENTREGA_EMP As String
    Private _IEENTREGA_EMP As String
    Private _IMENTREGA_EMP As String
    Private _CONTATOENTREGA_EMP As String
    Private _EMAILENTREGA_EMP As String
    Private _TELEFONEENTREGA_EMP As String
    Private _CELULARENTREGA_EMP As String
    Private _ENDERECOCOB_EMP As String
    Private _NUMEROCOB_EMP As String
    Private _COMPLEMENTOCOB_EMP As String
    Private _BAIRROCOB_EMP As String
    Private _CEPCOB_EMP As String
    Private _CIDADECOB_EMP As String
    Private _ESTADOCOB_EMP As String
    Private _CNPJCOB_EMP As String
    Private _IECOB_EMP As String
    Private _IMCOB_EMP As String
    Private _EMAILCOB_EMP As String
    Private _TELEFONECOB_EMP As String
    Private _CELULARCOB_EMP As String
    Private _CONTATOFATUR_EMP As String
    Private _CONTATOCOB_EMP As String

    Public Property CODIGO_EMP() As Long
        Get
            Return _CODIGO_EMP
        End Get
        Set(ByVal value As Long)
            _CODIGO_EMP = value
        End Set
    End Property

    Public Property CODIGO_FUNC() As Integer
        Get
            Return _CODIGO_FUNC
        End Get
        Set(ByVal value As Integer)
            _CODIGO_FUNC = value
        End Set
    End Property

    Public Property CODIGO_SEG() As Integer
        Get
            Return _CODIGO_SEG
        End Get
        Set(ByVal value As Integer)
            _CODIGO_SEG = value
        End Set
    End Property

    Public Property CODIGO_TIER() As Integer
        Get
            Return _CODIGO_TIER
        End Get
        Set(ByVal value As Integer)
            _CODIGO_TIER = value
        End Set
    End Property

    Public Property CODIGO_REG() As Integer
        Get
            Return _CODIGO_REG
        End Get
        Set(ByVal value As Integer)
            _CODIGO_REG = value
        End Set
    End Property

    Public Property CODIGO_CORP() As Integer
        Get
            Return _CODIGO_CORP
        End Get
        Set(ByVal value As Integer)
            _CODIGO_CORP = value
        End Set
    End Property

    Public Property NOME_EMP() As String
        Get
            Return _NOME_EMP
        End Get
        Set(ByVal value As String)
            _NOME_EMP = value
        End Set
    End Property

    Public Property FANTASIA_EMP() As String
        Get
            Return _FANTASIA_EMP
        End Get
        Set(ByVal value As String)
            _FANTASIA_EMP = value
        End Set
    End Property

    Public Property ENDERECOFATUR_EMP() As String
        Get
            Return _ENDERECOFATUR_EMP
        End Get
        Set(ByVal value As String)
            _ENDERECOFATUR_EMP = value
        End Set
    End Property

    Public Property NUMEROFATUR_EMP() As String
        Get
            Return _NUMEROFATUR_EMP
        End Get
        Set(ByVal value As String)
            _NUMEROFATUR_EMP = value

        End Set
    End Property

    Public Property COMPLEMENTOFATUR_EMP() As String
        Get
            Return _COMPLEMENTOFATUR_EMP
        End Get
        Set(ByVal value As String)
            _COMPLEMENTOFATUR_EMP = value

        End Set
    End Property

    Public Property BAIRROFATUR_EMP() As String
        Get
            Return _BAIRROFATUR_EMP
        End Get
        Set(ByVal value As String)
            _BAIRROFATUR_EMP = value
        End Set
    End Property

    Public Property CEPFATUR_EMP() As String
        Get
            Return _CEPFATUR_EMP
        End Get
        Set(ByVal value As String)
            _CEPFATUR_EMP = value
        End Set
    End Property

    Public Property CIDADEFATUR_EMP() As String
        Get
            Return _CIDADEFATUR_EMP
        End Get
        Set(ByVal value As String)
            _CIDADEFATUR_EMP = value
        End Set
    End Property

    Public Property ESTADOFATUR_EMP() As String
        Get
            Return _ESTADOFATUR_EMP
        End Get
        Set(ByVal value As String)
            _ESTADOFATUR_EMP = value
        End Set
    End Property

    Public Property CNPJFATUR_EMP() As String
        Get
            Return _CNPJFATUR_EMP
        End Get
        Set(ByVal value As String)
            _CNPJFATUR_EMP = value
        End Set
    End Property

    Public Property IEFATUR_EMP() As String
        Get
            Return _IEFATUR_EMP
        End Get
        Set(ByVal value As String)
            _IEFATUR_EMP = value

        End Set
    End Property

    Public Property IMFATUR_EMP() As String
        Get
            Return _IMFATUR_EMP
        End Get
        Set(ByVal value As String)
            _IMFATUR_EMP = value

        End Set
    End Property

    Public Property CONTATOFATUR_EMP() As String
        Get
            Return _CONTATOFATUR_EMP
        End Get
        Set(ByVal value As String)
            _CONTATOFATUR_EMP = value
        End Set
    End Property

    Public Property EMAILFATUR_EMP() As String
        Get
            Return _EMAILFATUR_EMP
        End Get
        Set(ByVal value As String)
            _EMAILFATUR_EMP = value

        End Set
    End Property

    Public Property TELEFONEFATUR_EMP() As String
        Get
            Return _TELEFONEFATUR_EMP
        End Get
        Set(ByVal value As String)
            _TELEFONEFATUR_EMP = value
        End Set
    End Property

    Public Property CELULARFATUR_EMP() As String
        Get
            Return _CELULARFATUR_EMP
        End Get
        Set(ByVal value As String)
            _CELULARFATUR_EMP = value

        End Set
    End Property

    Public Property ENDERECOENTREGA_EMP() As String
        Get
            Return _ENDERECOENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _ENDERECOENTREGA_EMP = value
        End Set
    End Property

    Public Property NUMEROENTREGA_EMP() As String
        Get
            Return _NUMEROENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _NUMEROENTREGA_EMP = value

        End Set
    End Property

    Public Property COMPLEMENTOENTREGA_EMP() As String
        Get
            Return _COMPLEMENTOENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _COMPLEMENTOENTREGA_EMP = value
        End Set
    End Property

    Public Property BAIRROENTREGA_EMP() As String
        Get
            Return _BAIRROENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _BAIRROENTREGA_EMP = value
        End Set
    End Property

    Public Property CEPENTREGA_EMP() As String
        Get
            Return _CEPENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _CEPENTREGA_EMP = value
        End Set
    End Property

    Public Property CIDADEENTREGA_EMP() As String
        Get
            Return _CIDADEENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _CIDADEENTREGA_EMP = value
        End Set
    End Property

    Public Property ESTADOENTREGA_EMP() As String
        Get
            Return _ESTADOENTREGA_EMP
        End Get
        Set(ByVal value As String)

        End Set
    End Property

    Public Property CNPJENTREGA_EMP() As String
        Get
            Return _CNPJENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _CNPJENTREGA_EMP = value
        End Set
    End Property

    Public Property IEENTREGA_EMP() As String
        Get
            Return _IEENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _IEENTREGA_EMP = value

        End Set
    End Property

    Public Property IMENTREGA_EMP() As String
        Get
            Return _IMENTREGA_EMP

        End Get
        Set(ByVal value As String)
            _IMENTREGA_EMP = value

        End Set
    End Property

    Public Property CONTATOENTREGA_EMP() As String
        Get
            Return _CONTATOENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _CONTATOENTREGA_EMP = value

        End Set
    End Property

    Public Property EMAILENTREGA_EMP() As String
        Get
            Return _EMAILENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _EMAILENTREGA_EMP = value
        End Set
    End Property

    Public Property TELEFONEENTREGA_EMP() As String
        Get
            Return _TELEFONEENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _TELEFONEENTREGA_EMP = value
        End Set
    End Property

    Public Property CELULARENTREGA_EMP() As String
        Get
            Return _CELULARENTREGA_EMP
        End Get
        Set(ByVal value As String)
            _CELULARENTREGA_EMP = value
        End Set
    End Property

    Public Property ENDERECOCOB_EMP() As String
        Get
            Return _ENDERECOCOB_EMP
        End Get
        Set(ByVal value As String)
            _ENDERECOCOB_EMP = value
        End Set
    End Property

    Public Property NUMEROCOB_EMP() As String
        Get
            Return _NUMEROCOB_EMP
        End Get
        Set(ByVal value As String)
            _TELEFONECOB_EMP = value
        End Set
    End Property

    Public Property COMPLEMENTOCOB_EMP() As String
        Get
            Return _COMPLEMENTOCOB_EMP
        End Get
        Set(ByVal value As String)
            _COMPLEMENTOCOB_EMP = value
        End Set
    End Property

    Public Property BAIRROCOB_EMP() As String
        Get
            Return _BAIRROCOB_EMP
        End Get
        Set(ByVal value As String)
            _BAIRROCOB_EMP = value
        End Set
    End Property

    Public Property CEPCOB_EMP() As String
        Get
            Return _CEPCOB_EMP
        End Get
        Set(ByVal value As String)
            _CEPCOB_EMP = value
        End Set
    End Property

    Public Property CIDADECOB_EMP() As String
        Get
            Return _CIDADECOB_EMP
        End Get
        Set(ByVal value As String)
            _CIDADECOB_EMP = value
        End Set
    End Property

    Public Property ESTADOCOB_EMP() As String
        Get
            Return _ESTADOCOB_EMP
        End Get
        Set(ByVal value As String)
            _ESTADOCOB_EMP = value
        End Set
    End Property

    Public Property CNPJCOB_EMP() As String
        Get
            Return _CNPJCOB_EMP
        End Get
        Set(ByVal value As String)
            _CNPJCOB_EMP = value
        End Set
    End Property

    Public Property IECOB_EMP() As String
        Get
            Return _IECOB_EMP
        End Get
        Set(ByVal value As String)
            _IECOB_EMP = value
        End Set
    End Property

    Public Property IMCOB_EMP() As String
        Get
            Return _IMCOB_EMP
        End Get
        Set(ByVal value As String)
            _IMCOB_EMP = value
        End Set
    End Property

    Public Property CONTATOCOB_EMP() As String
        Get
            Return _CONTATOCOB_EMP
        End Get
        Set(ByVal value As String)
            _CONTATOCOB_EMP = value
        End Set
    End Property

    Public Property EMAILCOB_EMP() As String
        Get
            Return _EMAILCOB_EMP
        End Get
        Set(ByVal value As String)
            _EMAILCOB_EMP = value
        End Set
    End Property

    Public Property TELEFONECOB_EMP() As String
        Get
            Return _TELEFONECOB_EMP
        End Get
        Set(ByVal value As String)
            _TELEFONECOB_EMP = value
        End Set
    End Property

    Public Property CELULARCOB_EMP() As String
        Get
            Return _CELULARCOB_EMP
        End Get
        Set(ByVal value As String)
            _CELULARCOB_EMP = value
        End Set
    End Property

    Private _ATUALIZADO As Boolean
    Public Property ATUALIZADO() As Boolean
        Get
            Return _ATUALIZADO
        End Get
        Set(ByVal value As Boolean)
            _ATUALIZADO = value
        End Set
    End Property

    Private _DATAATUALIZACAO As DateTime
    Public Property DATAATUALIZACAO() As DateTime
        Get
            Return _DATAATUALIZACAO
        End Get
        Set(ByVal value As DateTime)
            _DATAATUALIZACAO = value
        End Set
    End Property

    Public Function SelectEmpresaByCode(ByVal intCodigo As Long) As sqlDataReader

        Dim clsbanco As New clsBanco
        Dim strsql As String

        strsql = "SELECT * FROM TBL_EMPRESA "
        strsql = strsql & " WHERE CODIGO_EMP =" & intCodigo
        Return clsbanco.RetornaDataReader(strsql.ToString)

    End Function
    Public Function SelectEmpresaByName(ByVal strName As String) As DataSet

        Dim clsbanco As New clsBanco
        Dim strsql As String

        strsql = "SELECT "
        strsql = strsql & "CODIGO_EMP "
        strsql = strsql & ",NOME_EMP "
        strsql = strsql & ",CIDADEFATUR_EMP "
        strsql = strsql & ",ESTADOFATUR_EMP "
        strsql = strsql & " FROM TBL_EMPRESA  "
        If strName <> "" Then
            strsql = strsql & " WHERE NOME_EMP LIKE '" & strName & "%'"
        End If

        Return clsbanco.RetornaDataSet(strsql.ToString)

    End Function
    Public Function SelectEmpresa() As DataSet
        Dim clsBanco As New clsBanco
        Dim strsql As String

        strsql = "SELECT CODIGO_EMP, NOME_EMP FROM TBL_EMPRESA ORDER BY NOME_EMP"

        Return clsBanco.RetornaDataSet(strsql.ToString)

    End Function
    Public Function InsertEmpresa() As Long

        Dim clsbanco As New clsBanco
        Dim strsql As String

        strsql = "INSERT INTO TBL_EMPRESA ("
        strsql = strsql & "CODIGO_EMP"
        strsql = strsql & ",CODIGO_FUNC"
        strsql = strsql & ",CODIGO_SEG"
        strsql = strsql & ",CODIGO_TIER"
        strsql = strsql & ",CODIGO_CORP"
        strsql = strsql & ",CODIGO_REG"
        strsql = strsql & ",NOME_EMP"
        strsql = strsql & ",FANTASIA_EMP"
        strsql = strsql & ",ENDERECOFATUR_EMP "
        strsql = strsql & ",NUMEROFATUR_EMP "
        strsql = strsql & ",COMPLEMENTOFATUR_EMP "
        strsql = strsql & ",BAIRROFATUR_EMP"
        strsql = strsql & ",CEPFATUR_EMP "
        strsql = strsql & ",CIDADEFATUR_EMP "
        strsql = strsql & ",ESTADOFATUR_EMP "
        strsql = strsql & ",CNPJFATUR_EMP "
        strsql = strsql & ",IEFATUR_EMP "
        strsql = strsql & ",IMFATUR_EMP "
        strsql = strsql & ",CONTATOFATUR_EMP "
        strsql = strsql & ",EMAILFATUR_EMP "
        strsql = strsql & ",TELEFONEFATUR_EMP "
        strsql = strsql & ",CELULARFATUR_EMP "
        strsql = strsql & ",ENDERECOENTREGA_EMP "
        strsql = strsql & ",NUMEROENTREGA_EMP "
        strsql = strsql & ",COMPLEMENTOENTREGA_EMP "
        strsql = strsql & ",BAIRROENTREGA_EMP "
        strsql = strsql & ",CEPENTREGA_EMP "
        strsql = strsql & ",CIDADEENTREGA_EMP "
        strsql = strsql & ",ESTADOENTREGA_EMP "
        strsql = strsql & ",CNPJENTREGA_EMP "
        strsql = strsql & ",IEENTREGA_EMP "
        strsql = strsql & ",IMENTREGA_EMP "
        strsql = strsql & ",CONTATOENTREGA_EMP "
        strsql = strsql & ",EMAILENTREGA_EMP "
        strsql = strsql & ",TELEFONEENTREGA_EMP "
        strsql = strsql & ",CELULARENTREGA_EMP "
        strsql = strsql & ",ENDERECOCOB_EMP "
        strsql = strsql & ",NUMEROCOB_EMP "
        strsql = strsql & ",COMPLEMENTOCOB_EMP "
        strsql = strsql & ",BAIRROCOB_EMP "
        strsql = strsql & ",CEPCOB_EMP "
        strsql = strsql & ",CIDADECOB_EMP "
        strsql = strsql & ",ESTADOCOB_EMP "
        strsql = strsql & ",CNPJCOB_EMP "
        strsql = strsql & ",IECOB_EMP "
        strsql = strsql & ",IMCOB_EMP "
        strsql = strsql & ",CONTATOCOB_EMP "
        strsql = strsql & ",EMAILCOB_EMP "
        strsql = strsql & ",TELEFONECOB_EMP "
        strsql = strsql & ",CELULARCOB_EMP"
        strsql = strsql & ",ATUALIZADO"
        strsql = strsql & ")VALUES("
        strsql = strsql & _CODIGO_EMP
        strsql = strsql & "," & _CODIGO_FUNC
        strsql = strsql & "," & _CODIGO_SEG
        strsql = strsql & "," & _CODIGO_TIER
        strsql = strsql & "," & _CODIGO_CORP
        strsql = strsql & "," & _CODIGO_REG
        strsql = strsql & ",'" & _NOME_EMP & "'"
        strsql = strsql & ",'" & _FANTASIA_EMP & "'"
        strsql = strsql & ",'" & _ENDERECOFATUR_EMP & "'"
        strsql = strsql & ",'" & _NUMEROFATUR_EMP & "'"
        strsql = strsql & ",'" & _COMPLEMENTOFATUR_EMP & "'"
        strsql = strsql & ",'" & _BAIRROFATUR_EMP & "'"
        strsql = strsql & ",'" & _CEPFATUR_EMP & "'"
        strsql = strsql & ",'" & _CIDADEFATUR_EMP & "'"
        strsql = strsql & ",'" & _ESTADOFATUR_EMP & "'"
        strsql = strsql & ",'" & _CNPJFATUR_EMP & "'"
        strsql = strsql & ",'" & _IEFATUR_EMP & "'"
        strsql = strsql & ",'" & _IMFATUR_EMP & "'"
        strsql = strsql & ",'" & _CONTATOFATUR_EMP & "'"
        strsql = strsql & ",'" & _EMAILFATUR_EMP & "'"
        strsql = strsql & ",'" & _TELEFONEFATUR_EMP & "'"
        strsql = strsql & ",'" & _CELULARFATUR_EMP & "'"
        strsql = strsql & ",'" & _ENDERECOENTREGA_EMP & "'"
        strsql = strsql & ",'" & _NUMEROENTREGA_EMP & "'"
        strsql = strsql & ",'" & _COMPLEMENTOENTREGA_EMP & "'"
        strsql = strsql & ",'" & _BAIRROENTREGA_EMP & "'"
        strsql = strsql & ",'" & _CEPENTREGA_EMP & "'"
        strsql = strsql & ",'" & _CIDADEENTREGA_EMP & "'"
        strsql = strsql & ",'" & _ESTADOENTREGA_EMP & "'"
        strsql = strsql & ",'" & _CNPJENTREGA_EMP & "'"
        strsql = strsql & ",'" & _IEENTREGA_EMP & "'"
        strsql = strsql & ",'" & _IMENTREGA_EMP & "'"
        strsql = strsql & ",'" & _CONTATOENTREGA_EMP & "'"
        strsql = strsql & ",'" & _EMAILENTREGA_EMP & "'"
        strsql = strsql & ",'" & _TELEFONEENTREGA_EMP & "'"
        strsql = strsql & ",'" & _CELULARENTREGA_EMP & "'"
        strsql = strsql & ",'" & _ENDERECOCOB_EMP & "'"
        strsql = strsql & ",'" & _NUMEROCOB_EMP & "'"
        strsql = strsql & ",'" & _COMPLEMENTOCOB_EMP & "'"
        strsql = strsql & ",'" & _BAIRROCOB_EMP & "'"
        strsql = strsql & ",'" & _CEPCOB_EMP & "'"
        strsql = strsql & ",'" & _CIDADECOB_EMP & "'"
        strsql = strsql & ",'" & _ESTADOCOB_EMP & "'"
        strsql = strsql & ",'" & _CNPJCOB_EMP & "'"
        strsql = strsql & ",'" & _IECOB_EMP & "'"
        strsql = strsql & ",'" & _IMCOB_EMP & "'"
        strsql = strsql & ",'" & _CONTATOCOB_EMP & "'"
        strsql = strsql & ",'" & _EMAILCOB_EMP & "'"
        strsql = strsql & ",'" & _TELEFONECOB_EMP & "'"
        strsql = strsql & ",'" & _CELULARCOB_EMP & "'"
        strsql = strsql & "," & 1
        strsql = strsql & ")"

        clsbanco.ExecutaComando(strsql.ToString)

    End Function
    Public Sub UpdateEmpresa(ByVal intCodigo As Long)

        Dim clsbanco As New clsBanco
        Dim strsql As String

        strsql = "UPDATE TBL_EMPRESA SET "
        strsql = strsql & "NOME_EMP = '" & _NOME_EMP & "'"
        strsql = strsql & ",CODIGO_FUNC = " & _CODIGO_FUNC
        strsql = strsql & ",CODIGO_SEG = " & _CODIGO_SEG
        strsql = strsql & ",CODIGO_TIER = " & _CODIGO_TIER
        strsql = strsql & ",CODIGO_REG = " & _CODIGO_REG
        strsql = strsql & ",CODIGO_CORP = " & _CODIGO_CORP
        strsql = strsql & ",FANTASIA_EMP = '" & FANTASIA_EMP & "'"
        strsql = strsql & ",ENDERECOFATUR_EMP = '" & ENDERECOFATUR_EMP & "'"
        strsql = strsql & ",NUMEROFATUR_EMP = '" & NUMEROFATUR_EMP & "'"
        strsql = strsql & ",COMPLEMENTOFATUR_EMP = '" & COMPLEMENTOFATUR_EMP & "'"
        strsql = strsql & ",BAIRROFATUR_EMP = '" & BAIRROFATUR_EMP & "'"
        strsql = strsql & ",CEPFATUR_EMP = '" & CEPFATUR_EMP & "'"
        strsql = strsql & ",CIDADEFATUR_EMP = '" & CIDADEFATUR_EMP & "'"
        strsql = strsql & ",ESTADOFATUR_EMP = '" & ESTADOFATUR_EMP & "'"
        strsql = strsql & ",CNPJFATUR_EMP = '" & CNPJFATUR_EMP & "'"
        strsql = strsql & ",IEFATUR_EMP = '" & IEFATUR_EMP & "'"
        strsql = strsql & ",IMFATUR_EMP = '" & IMFATUR_EMP & "'"
        strsql = strsql & ",CONTATOFATUR_EMP = '" & CONTATOFATUR_EMP & "'"
        strsql = strsql & ",EMAILFATUR_EMP = '" & EMAILFATUR_EMP & "'"
        strsql = strsql & ",TELEFONEFATUR_EMP = '" & TELEFONEFATUR_EMP & "'"
        strsql = strsql & ",CELULARFATUR_EMP = '" & CELULARFATUR_EMP & "'"
        strsql = strsql & ",ENDERECOENTREGA_EMP = '" & ENDERECOENTREGA_EMP & "'"
        strsql = strsql & ",NUMEROENTREGA_EMP = '" & NUMEROENTREGA_EMP & "'"
        strsql = strsql & ",COMPLEMENTOENTREGA_EMP = '" & COMPLEMENTOENTREGA_EMP & "'"
        strsql = strsql & ",BAIRROENTREGA_EMP = '" & BAIRROENTREGA_EMP & "'"
        strsql = strsql & ",CEPENTREGA_EMP = '" & CEPENTREGA_EMP & "'"
        strsql = strsql & ",CIDADEENTREGA_EMP = '" & CIDADEENTREGA_EMP & "'"
        strsql = strsql & ",ESTADOENTREGA_EMP = '" & ESTADOENTREGA_EMP & "'"
        strsql = strsql & ",CNPJENTREGA_EMP = '" & CNPJENTREGA_EMP & "'"
        strsql = strsql & ",IEENTREGA_EMP = '" & IEENTREGA_EMP & "'"
        strsql = strsql & ",IMENTREGA_EMP = '" & IMENTREGA_EMP & "'"
        strsql = strsql & ",CONTATOENTREGA_EMP = '" & CONTATOENTREGA_EMP & "'"
        strsql = strsql & ",EMAILENTREGA_EMP = '" & EMAILENTREGA_EMP & "'"
        strsql = strsql & ",TELEFONEENTREGA_EMP = '" & TELEFONEENTREGA_EMP & "'"
        strsql = strsql & ",CELULARENTREGA_EMP = '" & CELULARENTREGA_EMP & "'"
        strsql = strsql & ",ENDERECOCOB_EMP = '" & ENDERECOCOB_EMP & "'"
        strsql = strsql & ",NUMEROCOB_EMP = '" & NUMEROCOB_EMP & "'"
        strsql = strsql & ",COMPLEMENTOCOB_EMP = '" & COMPLEMENTOCOB_EMP & "'"
        strsql = strsql & ",BAIRROCOB_EMP = '" & BAIRROCOB_EMP & "'"
        strsql = strsql & ",CEPCOB_EMP = '" & CEPCOB_EMP & "'"
        strsql = strsql & ",CIDADECOB_EMP = '" & CIDADECOB_EMP & "'"
        strsql = strsql & ",ESTADOCOB_EMP = '" & ESTADOCOB_EMP & "'"
        strsql = strsql & ",CNPJCOB_EMP = '" & CNPJCOB_EMP & "'"
        strsql = strsql & ",IECOB_EMP = '" & IECOB_EMP & "'"
        strsql = strsql & ",IMCOB_EMP = '" & IMCOB_EMP & "'"
        strsql = strsql & ",CONTATOCOB_EMP = '" & CONTATOCOB_EMP & "'"
        strsql = strsql & ",EMAILCOB_EMP = '" & EMAILCOB_EMP & "'"
        strsql = strsql & ",TELEFONECOB_EMP = '" & TELEFONECOB_EMP & "'"
        strsql = strsql & ",CELULARCOB_EMP = '" & CELULARCOB_EMP & "'"
        strsql = strsql & " WHERE CODIGO_EMP = " & intCodigo

        clsbanco.ExecutaComando(strsql.ToString)

    End Sub
    Public Sub DeleteEmpresa(ByVal intCodigo As Long)
        Dim clsbanco As New clsBanco
        Dim strsql As String
        strsql = "DELETE FROM TBL_EMPRESA "
        strsql = strsql & " WHERE CODIGO_EMP = " & intCodigo
        clsbanco.ExecutaComando(strsql.ToString)

    End Sub


End Class
