Imports System.Windows.Forms
Public Class YD_ERP_SYS
    ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7 As New DataSet
    Dim 狀態, 狀態1, 狀態2 As String : Dim FFGG As Integer : Dim 首次開啟 As Boolean = True
    Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewWindowToolStripMenuItem.Click
        ' 建立子表單的新執行個體。
        ' 將它變成這個 MDI 表單的子表單，然後才顯示。
        Dim ChildForm As New Form With {
            .MdiParent = Me
        }
        m_ChildFormNumber += 1
        ChildForm.Text = "視窗 " & m_ChildFormNumber
        ChildForm.Show()
    End Sub
    Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ExitToolStripMenuItem.Click
        Me.Close()
    End Sub
    Private Sub CascadeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CascadeToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub
    Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles TileVerticalToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub
    Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles TileHorizontalToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub
    Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ArrangeIconsToolStripMenuItem.Click
        Me.LayoutMdi(MdiLayout.ArrangeIcons)
    End Sub
    Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles CloseAllToolStripMenuItem.Click
        ' 關閉父表單的所有子表單。
        For Each ChildForm As Form In Me.MdiChildren
            ChildForm.Close()
        Next
    End Sub
    Private m_ChildFormNumber As Integer
    Private Sub Set_清單1()
        銷售單據_dgv.DataSource = Nothing : ds1.Clear()
        銷售單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
        銷售單據_dgv.ColumnHeadersHeight = 25
        銷售單據_dgv.AllowUserToAddRows = False
        銷售單據_dgv.RowTemplate.Height = 25

        SQL_業務單據未補()
        da.Fill(ds1) : 銷售單據_dgv.DataSource = ds1.Tables(0) : conn.Close()
    End Sub
    Private Sub Set_清單2()
        財務單據_dgv.DataSource = Nothing : ds2.Clear()
        財務單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
        財務單據_dgv.ColumnHeadersHeight = 25
        財務單據_dgv.AllowUserToAddRows = False
        財務單據_dgv.RowTemplate.Height = 25

        SQL_財務單據未核()
        da.Fill(ds2) : 財務單據_dgv.DataSource = ds2.Tables(0) : conn.Close()
    End Sub
    Private Sub YD_ERP_SYS_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        '----------系統登入時抬頭資訊顯示---------------------------------------------------------------------------------------------------------------
        Me.Text = "YD ERP SYS" & "  --  " & g_conn_type & "  --  " & gUserName & "  --  系統版本  :  " & 版本

        If Val(登入人級別) = 0 Then : 使用者_cb.Enabled = True : Else : 使用者_cb.Enabled = False : End If
        '-----------------------帳號下拉清單------------------------------------------------------------------------------------------------------------
        SQL_帳號讀取()
        使用者_cb.Items.Clear() : While (dr.Read()) : 使用者_cb.Items.Add(dr("姓名")) : End While : conn.Close()
        使用者_cb.Text = gUserName
        SQL_物料空白修正() : conn.Close()

        '----------資料庫系統管理-------------------------------------------------------------------------------------------------------------
        資料庫系統管理_tsm.Enabled = CC(1) : 系統使用者管理_tsm.Enabled = CC(2) : 系統編碼規則_tsm.Enabled = CC(3) : 系統執行檔版本管理_tsm.Enabled = CC(4)
        '----------倉儲系統管理---------------------------------------------------------------------------------------------------------------
        倉儲系統管理_tsm.Enabled = CC(6) : 倉儲控制表_tsm.Enabled = CC(7) : 單據狀態查詢_tsm.Enabled = CC(8) : 倉儲入庫_tsm.Enabled = CC(9)
        盤盈盤損申請_tsm.Enabled = CC(10) : 盤盈盤損審核倉儲調整_tsm.Enabled = CC(11) : 盤盈盤損控制表_tsm.Enabled = CC(12) : 物料檔案_tsm.Enabled = CC(13)
        倉儲分區控制表_tsm.Enabled = CC(14) : 倉儲出庫_tsm.Enabled = CC(34)
        '----------採購系統管理---------------------------------------------------------------------------------------------------------------
        採購系統管理_tsm.Enabled = CC(15) : 採購控制表_tsm.Enabled = CC(16) : 一般性申請採購單_tsm.Enabled = CC(17) : 依銷售申請採購單_tsm.Enabled = CC(18)
        採購單審核_tsm.Enabled = CC(19) : 採購退貨申請_tsm.Enabled = CC(20) : 採購退貨審核_tsm.Enabled = CC(21) : 供應商資料表_tsm.Enabled = CC(22)
        採購對帳單_tsm.Enabled = CC(33)
        '----------業務系統管理---------------------------------------------------------------------------------------------------------------
        業務系統管理_tsm.Enabled = CC(23) : 訂單控制表_tsm.Enabled = CC(24) : 銷售單申請_tsm.Enabled = CC(25) : 銷售單審核_tsm.Enabled = CC(26)
        客戶資料表_tsm.Enabled = CC(27) : 銷售分析表_tsm.Enabled = CC(31) : 貨款試算表_tsm.Enabled = CC(32) : 應收帳款未收_tsm.Enabled = CC(47)
        應收帳款已收_tsm.Enabled = CC(48) : 業務單號修改功能_tsm.Enabled = CC(56)
        '----------人事系統管理---------------------------------------------------------------------------------------------------------------
        人事系統管理_tsm.Enabled = CC(28) : 人事資料表_tsm.Enabled = CC(29) : 人員ID卡系統配置設定_tsm.Enabled = CC(30)
        '----------財務系統管理---------------------------------------------------------------------------------------------------------------
        財務系統管理_tsm.Enabled = CC(38) : 薪資轉帳表_tsm.Enabled = CC(39) : 營運成本收支單申請_tsm.Enabled = CC(40) : 營運成本收支單審核_tsm.Enabled = CC(41)
        營運成本收支單一覽表_tsm.Enabled = CC(42) : 營運成本收支單對帳表_tsm.Enabled = CC(43) : 營運報表_tsm.Enabled = CC(44) : 匯率管理_tsm.Enabled = CC(45)
        會計科目管理_tsm.Enabled = CC(46) : 業績獎金彙總表_tsm.Enabled = CC(53) : 業績結單控制表_tsm.Enabled = CC(54) : 業務獎金計算基礎_tcm.Enabled = CC(55)
        Timer1.Enabled = True
    End Sub
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        狀態 = "銷售單據入系統狀態" : Dim 單數 As Integer : Set_清單2()
        For i As Integer = 0 To 業務_cb.Items.Count - 1
            業務_cb.SelectedIndex = i
            Set_清單1()
            If 銷售單據_dgv.Rows.Count > 0 Then
                單數 = (Strings.Mid(銷售單據_dgv.Rows(0).Cells("單號").Value, 2, 6) - Strings.Mid(銷售單據_dgv.Rows(銷售單據_dgv.Rows.Count - 1).Cells("單號").Value, 2, 6)) - 銷售單據_dgv.Rows.Count
                Dim 天數 As Integer = DateDiff(DateInterval.Day, 銷售單據_dgv.Rows(0).Cells("開單日期").Value, Today())
                If (單數 > 100 Or 天數 > 7) And 單數 > 0 Then
                    狀態1 = 業務_cb.Text & " 號業務單最後入單單號 [ " & 銷售單據_dgv.Rows(0).Cells("單號").Value & " ]，開單日期是 [ " & 銷售單據_dgv.Rows(0).Cells("開單日期").Value & " ]。 
由單號 [" & 銷售單據_dgv.Rows(銷售單據_dgv.Rows.Count - 1).Cells("單號").Value & "]  到系統中最後一單，約有 " & 單數 & " 張單據未補齊。" & vbCrLf &
    "-------------------------------------------------------------------"
                    狀態 = 狀態 & vbCrLf &
                                   狀態1
                End If
            End If
        Next
        狀態2 = "財務單據簽核狀態"
        狀態 = 狀態 & vbCrLf & vbCrLf & 狀態2 & vbCrLf & "財務單據還有 [" & 財務單據_dgv.Rows.Count & "] 張未簽核!!"

        If 首次開啟 = True Then
            首次開啟 = False
            Dim aa1 As MsgBoxResult = MsgBox(狀態, MsgBoxStyle.OkCancel)
            If aa1 = MsgBoxResult.Ok Then : Timer1.Enabled = False
            ElseIf aa1 = MsgBoxResult.Cancel Then : Timer1.Enabled = False
            End If
        End If
    End Sub
    Private Sub YD_ERP_SYS_Unload(sender As Object, e As EventArgs) Handles MyBase.Closing
        LoginForm1.Close()
    End Sub
    Private Sub YD_ERP_SYS_SIZE(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
        Me.BackgroundImage = My.Resources.底圖1 : Me.BackgroundImageLayout = 3
    End Sub
    Private Sub 使用者_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 使用者_cb.SelectedIndexChanged
        gUserName = 使用者_cb.Text
        Me.Text = "YD ERP SYS" & "  --  " & g_conn_type & "  --  " & gUserName & "  --  系統版本  :  " & 版本
    End Sub
    '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Private Sub 歸零()
        NU1 = 0 : NU2 = 0 : NU3 = 0 : NU4 = 0 : NU5 = 0
        PPAA = "" : PA = "" : PA1 = "" : PA2 = "" : PA3 = "" : PA4 = "" : PA5 = "" : PA6 = "" : PA7 = "" : PA8 = "" : PA9 = "" : PA10 = "" : PA11 = "" : PA12 = "" : PA13 = "" : PA14 = "" : PA15 = ""
        PA16 = "" : PA17 = "" : PA18 = "" : PA19 = "" : PA20 = "" : PA21 = "" : PA22 = "" : PA23 = "" : PA24 = "" : PA25 = "" : PA26 = "" : PA27 = "" : PA28 = "" : PA29 = "" : PA30 = "" : PA31 = ""
        PA32 = "" : PA33 = "" : PA34 = "" : PA35 = "" : PA36 = ""
    End Sub
    '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Private Sub 系統執行檔版本管理_tsm_Click(sender As Object, e As EventArgs) Handles 系統執行檔版本管理_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 系統執行檔版本管理.ShowDialog()
    End Sub
    Private Sub 系統使用者管理_tsm_Click(sender As Object, e As EventArgs) Handles 系統使用者管理_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 系統使用者管理.Show() : 系統使用者管理.BringToFront()
    End Sub
    Private Sub 系統編碼規則_tsm_Click(sender As Object, e As EventArgs) Handles 系統編碼規則_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 系統編碼規則.Show() : 系統編碼規則.BringToFront()
    End Sub
    Private Sub 人事資料表_tsm_Click(sender As Object, e As EventArgs) Handles 人事資料表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 人事資料表.Show() : 人事資料表.BringToFront()
    End Sub
    Private Sub 客戶資料表_tsm_Click(sender As Object, e As EventArgs) Handles 客戶資料表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 客戶資料強制對話框模式 = False : 客戶資料表.Show() : 客戶資料表.BringToFront()
    End Sub
    Private Sub 供應商資料表_tsm_Click(sender As Object, e As EventArgs) Handles 供應商資料表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 供應商資料表.Show() : 供應商資料表.BringToFront()
    End Sub
    Private Sub 物料檔案_tsm_Click(sender As Object, e As EventArgs) Handles 物料檔案_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 物料檔案.Show() : 物料檔案.BringToFront()
    End Sub
    Private Sub 人員ID卡系統配置設定_tsm_Click(sender As Object, e As EventArgs) Handles 人員ID卡系統配置設定_tsm.Click
        歸零() : 人員ID卡系統配置設定.ShowDialog() : 人員ID卡系統配置設定.BringToFront()
    End Sub
    Private Sub 倉儲分區控制表_tsm_Click(sender As Object, e As EventArgs) Handles 倉儲分區控制表_tsm.Click
        歸零() : 倉儲分區控制表.ShowDialog() : 倉儲分區控制表.BringToFront()
    End Sub
    Private Sub 倉儲控制表_tsm_Click(sender As Object, e As EventArgs) Handles 倉儲控制表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 倉儲控制表.Show() : 倉儲控制表.BringToFront()
    End Sub
    Private Sub 盤盈盤損申請_tsm_Click(sender As Object, e As EventArgs) Handles 盤盈盤損申請_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 盤盈盤損申請.Show() : 盤盈盤損申請.BringToFront()
    End Sub
    Private Sub 盤盈盤損確認倉儲調整_tsm_Click(sender As Object, e As EventArgs) Handles 盤盈盤損審核倉儲調整_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 盤盈盤損審核.Show() : 盤盈盤損審核.BringToFront()
    End Sub
    Private Sub 盤盈盤損控制表_tsm_Click(sender As Object, e As EventArgs) Handles 盤盈盤損控制表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 盤盈盤損控制表.Show() : 盤盈盤損控制表.BringToFront()
    End Sub
    Private Sub 銷售單申請_tsm_Click(sender As Object, e As EventArgs) Handles 銷售單申請_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 銷售單申請.Show() : 銷售單申請.BringToFront()
    End Sub
    Private Sub 一般性申請採購單_tsm_Click(sender As Object, e As EventArgs) Handles 一般性申請採購單_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 一般申請_採購單.Show() : 一般申請_採購單.BringToFront()
    End Sub
    Private Sub 銷售單審核_tsm_Click(sender As Object, e As EventArgs) Handles 銷售單審核_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 銷售單審核.Show() : 銷售單審核.BringToFront()
    End Sub
    Private Sub 訂單控制表_tsm_Click(sender As Object, e As EventArgs) Handles 訂單控制表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 訂單控制表.Show() : 訂單控制表.BringToFront()
    End Sub
    Private Sub 個人資料管理_tsm_Click(sender As Object, e As EventArgs) Handles 個人帳號管理_tsm.Click
        歸零() : 個人帳號管理.ShowDialog() : 個人帳號管理.BringToFront()
    End Sub
    Private Sub 銷售分析表_tsm_Click(sender As Object, e As EventArgs) Handles 銷售分析表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 銷售分析表.Show() : 銷售分析表.BringToFront()
    End Sub
    Private Sub 貨款試算表_tsm_Click(sender As Object, e As EventArgs) Handles 貨款試算表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 貨款試算表.Show() : 貨款試算表.BringToFront()
    End Sub
    Private Sub 依銷售申請採購單_tsm_Click(sender As Object, e As EventArgs) Handles 依銷售申請採購單_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 銷售申請_採購單.Show() : 銷售申請_採購單.BringToFront()
    End Sub
    Private Sub 採購控制表_tsm_Click(sender As Object, e As EventArgs) Handles 採購控制表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 採購對帳單.Show() : 採購對帳單.BringToFront()
    End Sub
    Private Sub 採購單審核_tsm_Click(sender As Object, e As EventArgs) Handles 採購單審核_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 採購單審核.Show() : 採購單審核.BringToFront()
    End Sub
    Private Sub 採購對帳單_tsm_Click(sender As Object, e As EventArgs) Handles 採購對帳單_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 採購應付帳款.Show() : 採購應付帳款.BringToFront()
    End Sub
    Private Sub 倉儲入庫_tsm_Click(sender As Object, e As EventArgs) Handles 倉儲入庫_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 倉儲入庫.Show() : 倉儲入庫.BringToFront()
    End Sub
    Private Sub 倉儲出庫_tsm_Click(sender As Object, e As EventArgs) Handles 倉儲出庫_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 倉儲出庫.Show() : 倉儲出庫.BringToFront()
    End Sub
    Private Sub 單據狀態查詢_tsm_Click(sender As Object, e As EventArgs) Handles 單據狀態查詢_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 單據狀態查詢.Show() : 單據狀態查詢.BringToFront()
    End Sub
    Private Sub 會計科目管理ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles 會計科目管理_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 會計科目管理.Show() : 會計科目管理.BringToFront()
    End Sub
    Private Sub 營運成本收支單申請ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles 營運成本收支單申請_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 財務_收支單申請.Show() : 財務_收支單申請.BringToFront()
    End Sub
    Private Sub 營運成本收支單審核ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles 營運成本收支單審核_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 財務_收支單審核.Show() : 財務_收支單審核.BringToFront()
    End Sub
    Private Sub 業績獎金彙總表_tsm_Click(sender As Object, e As EventArgs) Handles 業績獎金彙總表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 業績獎金彙總表.Show() : 業績獎金彙總表.BringToFront()
    End Sub
    Private Sub 業務獎金計算基礎_tcm_Click(sender As Object, e As EventArgs) Handles 業務獎金計算基礎_tcm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 業務獎金計算基礎.Show() : 業務獎金計算基礎.BringToFront()
    End Sub
    Private Sub 業績單據完單設定_tsm_Click(sender As Object, e As EventArgs) Handles 業績結單控制表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 業績結單控制表.Show() : 業績結單控制表.BringToFront()
    End Sub
    Private Sub 業績運費明細表_tsm_Click(sender As Object, e As EventArgs) Handles 業績運費明細表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 業績運費明細表.Show() : 業績運費明細表.BringToFront()
    End Sub
    Private Sub 營運成本收支單一覽表ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles 營運成本收支單一覽表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : PA18 = "" : PA19 = "" : PA20 = "" : 財務_收支單一覽表.Show() : 財務_收支單一覽表.BringToFront()
    End Sub
    Private Sub 高層客製報表_tsm_Click(sender As Object, e As EventArgs) Handles 高層客製報表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : PA18 = "" : PA19 = "" : PA20 = "" : 高層客製報表.Show() : 高層客製報表.BringToFront()
    End Sub
    Private Sub 營運成本收支單對帳表ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 營運成本收支單對帳表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : PA18 = "" : PA19 = "" : PA20 = "" : 營運成本收支單_對帳表.Show() : 營運成本收支單_對帳表.BringToFront()
    End Sub
    Private Sub 營運成本收支決算表ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles 營運報表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 財務_決算表.Show() : 財務_決算表.BringToFront()
    End Sub
    Private Sub 匯率管理ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles 匯率管理_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 匯率管理.Show() : 匯率管理.BringToFront()
    End Sub
    Private Sub 簽名檔管理ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 簽名檔管理ToolStripMenuItem.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 簽名檔管理.Show() : 簽名檔管理.BringToFront()
    End Sub
    Private Sub 薪資轉帳表ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 薪資轉帳表_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        歸零() : 薪資轉帳表.Show() : 薪資轉帳表.BringToFront()
    End Sub
    Private Sub 應收帳款未收ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 應收帳款未收_tsm.Click
        歸零() : 應收帳款未收.ShowDialog() : 應收帳款未收.BringToFront()
    End Sub
    Private Sub 應收帳款已收_tsm_Click(sender As Object, e As EventArgs) Handles 應收帳款已收_tsm.Click
        歸零() : 應收帳款已收.ShowDialog() : 應收帳款已收.BringToFront()
    End Sub
    Private Sub 業務單號修改功能_tsm_Click(sender As Object, e As EventArgs) Handles 業務單號修改功能_tsm.Click
        歸零() : 業務單號修改功能.ShowDialog() : 業務單號修改功能.BringToFront()
    End Sub
    Private Sub 營運日報表_tsm_Click(sender As Object, e As EventArgs) Handles 營運日報表_tsm.Click
        歸零() : 營運日報表.ShowDialog() : 營運日報表.BringToFront()
    End Sub
End Class
