垂直居中的Safari问题

时间:2015-12-15 14:47:16

标签: html css safari flexbox justify

我正在设计我的个人网站,有些代码在safari中不起作用。 这是我的网站网址 http://hoomansanjabi.ir

我想以我的徽标为中心。 我认为safari有这个代码的问题:

Private Sub Wells_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    lblUserActive.Text = UserActive
    ZoneActive = Nothing
    WellActive = Nothing

    provider = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source ="
    dataFile = "f:\wortendyke\WortendykeTables.accdb"
    connString = provider & dataFile
    myConnection.ConnectionString = connString
    Errors = ""

    Try
        If Button19.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button19.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button19.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button19.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try


    Try
        If Button23.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button23.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button23.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button23.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button17.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button17.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button17.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button17.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button3.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button3.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button3.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button3.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try
    Try
        If Button20.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button20.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button20.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button20.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button1.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button1.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button1.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button1.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button2.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button2.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button2.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button2.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button18.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button18.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button18.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button18.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button7.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button7.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button7.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button7.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button16.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button16.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button16.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button16.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button15.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button15.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button15.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button15.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button14.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button14.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button14.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button14.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button13.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button13.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button13.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button13.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button12.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button12.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button12.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button12.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button11.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button11.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button11.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button11.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button10.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button10.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button10.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button10.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button9.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button9.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button9.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button9.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button8.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button8.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button8.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button8.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button6.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button6.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button6.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button6.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button5.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button5.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button5.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button5.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try

    Try
        If Button4.Enabled = True Then

            myConnection.Open()
            Dim str As String
            str = "SELECT * FROM maintable WHERE location='" & Button4.Text & "' AND pumpingdate=#" & dateActive & "#"
            Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
            dr = cmd.ExecuteReader
            dr.Read()
            If Button4.Text = dr("location").ToString And dateActive = dr("pumpingdate").ToString Then
                Button4.Enabled = False
                myConnection.Close()
                Me.Refresh()
            End If

        End If

    Catch ex As Exception

    End Try



End Sub

0 个答案:

没有答案