Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FTP資料夾管理.vb 2.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. Option Strict Off
  2. Public Class FTP資料夾管理
  3. ReadOnly ds As New DataSet
  4. Private Sub Set_使用者清單()
  5. DataGridView1.DataSource = Nothing : ds.Clear()
  6. DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  7. DataGridView1.ColumnHeadersHeight = 25
  8. DataGridView1.AllowUserToAddRows = False
  9. SQL_FTP資料夾路徑分配()
  10. da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
  11. DataGridView1.Columns(0).Width = 70 : DataGridView1.Columns(1).Width = 200 : DataGridView1.Columns(2).Width = 200 : DataGridView1.Columns(3).Width = 70
  12. End Sub
  13. Private Sub FTP資料夾管理_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  14. Me.MdiParent = MAOJI_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
  15. Set_使用者清單()
  16. Target1 = Target : WebBrowser1.Url = New Uri(Target1)
  17. End Sub
  18. Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
  19. If e.RowIndex = -1 Then : Else
  20. TextBox1.Text = DataGridView1(0, e.RowIndex).Value.ToString : TextBox2.Text = DataGridView1(1, e.RowIndex).Value.ToString : TextBox3.Text = DataGridView1(2, e.RowIndex).Value.ToString
  21. TextBox4.Text = DataGridView1(3, e.RowIndex).Value.ToString
  22. End If
  23. End Sub
  24. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  25. SQL_FTP資料夾管理新增() : conn.Close() : Set_使用者清單()
  26. End Sub
  27. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  28. SQL_FTP資料夾管理修改() : conn.Close() : Set_使用者清單()
  29. End Sub
  30. Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
  31. Dim aa As MsgBoxResult = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
  32. If aa = MsgBoxResult.Ok Then
  33. SQL_FTP資料夾管理刪除()
  34. End If : conn.Close() : Set_使用者清單()
  35. End Sub
  36. End Class