Option Strict Off
Public Class FTP資料夾管理
    ReadOnly ds As New DataSet
    Private Sub Set_使用者清單()
        資料夾清單_dgv.DataSource = Nothing : ds.Clear()
        資料夾清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
        資料夾清單_dgv.ColumnHeadersHeight = 25
        資料夾清單_dgv.AllowUserToAddRows = False
        SQL_FTP資料夾管理表()
        da.Fill(ds) : 資料夾清單_dgv.DataSource = ds.Tables(0) : conn.Close()
        資料夾清單_dgv.Columns(0).FillWeight = 70 : 資料夾清單_dgv.Columns(1).FillWeight = 200 : 資料夾清單_dgv.Columns(2).FillWeight = 200 : 資料夾清單_dgv.Columns(3).FillWeight = 70
    End Sub
    Private Sub FTP資料夾管理_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.MdiParent = YS_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
        Target1 = Target
        WebBrowser1.Url = New Uri(Target1)
        Set_使用者清單()
    End Sub
    Private Sub 介面關閉_Closed(sender As Object, e As EventArgs) Handles MyBase.Closed
        MyModule1.虛擬桌面開啟()
    End Sub
    Private Sub 登入閒置控制_MouseMove(sender As Object, e As EventArgs) Handles MyBase.MouseMove
        timeNow = 0 : YS_ERP_SYS.Timer1.Enabled = False : YS_ERP_SYS.Timer1.Enabled = True
    End Sub
    Private Sub 登入閒置控制_KeyPress(sender As Object, e As EventArgs) Handles MyBase.KeyPress
        timeNow = 0 : YS_ERP_SYS.Timer1.Enabled = False : YS_ERP_SYS.Timer1.Enabled = True
    End Sub
    Private Sub 資料夾清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 資料夾清單_dgv.CellClick
        If e.RowIndex = -1 Then : Else
            資料夾名稱_tb.Text = 資料夾清單_dgv(0, e.RowIndex).Value.ToString : 指定頁面_tb.Text = 資料夾清單_dgv(1, e.RowIndex).Value.ToString : 備註_tb.Text = 資料夾清單_dgv(2, e.RowIndex).Value.ToString
            指定_tb.Text = 資料夾清單_dgv(3, e.RowIndex).Value.ToString
        End If
    End Sub
    Private Sub 新增_bt_Click(sender As Object, e As EventArgs) Handles 新增_bt.Click
        SQL_FTP資料夾管理表_新增() : conn.Close() : Set_使用者清單()
    End Sub
    Private Sub 修改_bt_Click(sender As Object, e As EventArgs) Handles 修改_bt.Click
        SQL_FTP資料夾管理表_修改() : conn.Close() : Set_使用者清單()
    End Sub
    Private Sub 刪除_bt_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
        Dim result As DialogResult = MessageBox.Show("確定要刪除該筆資料??", "請選擇", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
        If result = DialogResult.Yes Then : SQL_FTP資料夾管理表_刪除() : conn.Close() : Set_使用者清單() : End If
    End Sub
End Class