Public Class YS_ERP_SYS
    Dim ZX1, ZY1, ZX2(50), ZY2(50), SX1(50), SY1(50), AX2(50), AY2(50), XX1(50), XY1(50), QX2(15), QY2(15), WX1(15), WY1(15) As Double
    Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewWindowToolStripMenuItem.Click
        Dim ChildForm As New System.Windows.Forms.Form : ChildForm.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 Sub 重置()
        工人 = False : 重新計算 = True : 首次開啟 = True ': 不變形 = True
        BL = False : BL1 = False ': BL2 = False : BL3 = False : BL4 = False : BL5 = False : BL6 = False : BL7 = False : BL8 = False
        NU1 = 0 : NU2 = 0 : NU3 = 0 : NU4 = 0 : NU5 = 0
        BBL1 = "" : BBL2 = "" : BBL3 = "" : BBL4 = "" : BBL5 = "" : BBL6 = "" : 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 = "" : PA37 = "" : PA38 = "" : PA39 = ""
        PA40 = "" : PA41 = "" : PA42 = "" : PA43 = "" : PA44 = "" : PA45 = "" : PA46 = "" : PA47 = "" : PA48 = "" : PA49 = "" : PA50 = "" : PA51 = ""
        PPAA = "" : DTP = "" : DTP1 = "" : DTP2 = "" : DTP3 = "" ': 列印用SQL = "" : 列印用SQL2 = ""
        'For i As Integer = 0 To 999 : H(i) = False : Next
    End Sub
    Private m_ChildFormNumber As Integer
    Private Sub YS_ERP_SYS_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ZX1 = 流程空間_p.Size.Width : ZY1 = 流程空間_p.Size.Height
        ZX2(0) = 客戶資料表_bt.Size.Width : ZY2(0) = 客戶資料表_bt.Size.Height : SX1(0) = 客戶資料表_bt.Location.X : SY1(0) = 客戶資料表_bt.Location.Y
        ZX2(1) = 洽談日報表_bt.Size.Width : ZY2(1) = 洽談日報表_bt.Size.Height : SX1(1) = 洽談日報表_bt.Location.X : SY1(1) = 洽談日報表_bt.Location.Y
        ZX2(2) = 案場清單_bt.Size.Width : ZY2(2) = 案場清單_bt.Size.Height : SX1(2) = 案場清單_bt.Location.X : SY1(2) = 案場清單_bt.Location.Y
        ZX2(3) = 客戶資料轉移_bt.Size.Width : ZY2(3) = 客戶資料轉移_bt.Size.Height : SX1(3) = 客戶資料轉移_bt.Location.X : SY1(3) = 客戶資料轉移_bt.Location.Y
        ZX2(4) = 休假歷史紀錄_bt.Size.Width : ZY2(4) = 休假歷史紀錄_bt.Size.Height : SX1(4) = 休假歷史紀錄_bt.Location.X : SY1(4) = 休假歷史紀錄_bt.Location.Y
        ZX2(5) = 加班申請資料_bt.Size.Width : ZY2(5) = 加班申請資料_bt.Size.Height : SX1(5) = 加班申請資料_bt.Location.X : SY1(5) = 加班申請資料_bt.Location.Y
        ZX2(6) = 休假核准_bt.Size.Width : ZY2(6) = 休假核准_bt.Size.Height : SX1(6) = 休假核准_bt.Location.X : SY1(6) = 休假核准_bt.Location.Y
        ZX2(7) = 加班核准_bt.Size.Width : ZY2(7) = 加班核准_bt.Size.Height : SX1(7) = 加班核准_bt.Location.X : SY1(7) = 加班核准_bt.Location.Y
        ZX2(8) = 休假申請_bt.Size.Width : ZY2(8) = 休假申請_bt.Size.Height : SX1(8) = 休假申請_bt.Location.X : SY1(8) = 休假申請_bt.Location.Y
        ZX2(9) = 加班申請_bt.Size.Width : ZY2(9) = 加班申請_bt.Size.Height : SX1(9) = 加班申請_bt.Location.X : SY1(9) = 加班申請_bt.Location.Y
        ZX2(10) = 公司組織結構_bt.Size.Width : ZY2(10) = 公司組織結構_bt.Size.Height : SX1(10) = 公司組織結構_bt.Location.X : SY1(10) = 公司組織結構_bt.Location.Y
        ZX2(11) = Button12.Size.Width : ZY2(11) = Button12.Size.Height : SX1(11) = Button12.Location.X : SY1(11) = Button12.Location.Y
        ZX2(12) = 考勤明細表_bt.Size.Width : ZY2(12) = 考勤明細表_bt.Size.Height : SX1(12) = 考勤明細表_bt.Location.X : SY1(12) = 考勤明細表_bt.Location.Y
        ZX2(13) = 行事曆請假_bt.Size.Width : ZY2(13) = 行事曆請假_bt.Size.Height : SX1(13) = 行事曆請假_bt.Location.X : SY1(13) = 行事曆請假_bt.Location.Y
        ZX2(14) = ID卡配置設定_bt.Size.Width : ZY2(14) = ID卡配置設定_bt.Size.Height : SX1(14) = ID卡配置設定_bt.Location.X : SY1(14) = ID卡配置設定_bt.Location.Y
        ZX2(15) = 國定假日設定_bt.Size.Width : ZY2(15) = 國定假日設定_bt.Size.Height : SX1(15) = 國定假日設定_bt.Location.X : SY1(15) = 國定假日設定_bt.Location.Y
        ZX2(16) = 到離職管理_bt.Size.Width : ZY2(16) = 到離職管理_bt.Size.Height : SX1(16) = 到離職管理_bt.Location.X : SY1(16) = 到離職管理_bt.Location.Y
        ZX2(17) = 案件摘要表_bt.Size.Width : ZY2(17) = 案件摘要表_bt.Size.Height : SX1(17) = 案件摘要表_bt.Location.X : SY1(17) = 案件摘要表_bt.Location.Y
        ZX2(18) = 太陽能資訊表_bt.Size.Width : ZY2(18) = 太陽能資訊表_bt.Size.Height : SX1(18) = 太陽能資訊表_bt.Location.X : SY1(18) = 太陽能資訊表_bt.Location.Y
        ZX2(19) = Button20.Size.Width : ZY2(19) = Button20.Size.Height : SX1(19) = Button20.Location.X : SY1(19) = Button20.Location.Y
        ZX2(20) = 公函_bt.Size.Width : ZY2(20) = 公函_bt.Size.Height : SX1(20) = 公函_bt.Location.X : SY1(20) = 公函_bt.Location.Y
        ZX2(21) = 公函審核_bt.Size.Width : ZY2(21) = 公函審核_bt.Size.Height : SX1(21) = 公函審核_bt.Location.X : SY1(21) = 公函審核_bt.Location.Y
        ZX2(22) = 文件_bt.Size.Width : ZY2(22) = 文件_bt.Size.Height : SX1(22) = 文件_bt.Location.X : SY1(22) = 文件_bt.Location.Y
        ZX2(23) = 系統執行檔版本管理_bt.Size.Width : ZY2(23) = 系統執行檔版本管理_bt.Size.Height : SX1(23) = 系統執行檔版本管理_bt.Location.X : SY1(23) = 系統執行檔版本管理_bt.Location.Y
        ZX2(24) = 系統對應電腦註冊_bt.Size.Width : ZY2(24) = 系統對應電腦註冊_bt.Size.Height : SX1(24) = 系統對應電腦註冊_bt.Location.X : SY1(24) = 系統對應電腦註冊_bt.Location.Y
        ZX2(25) = 個人帳號管理_bt.Size.Width : ZY2(25) = 個人帳號管理_bt.Size.Height : SX1(25) = 個人帳號管理_bt.Location.X : SY1(25) = 個人帳號管理_bt.Location.Y
        ZX2(26) = 系統通用變數管理_bt.Size.Width : ZY2(26) = 系統通用變數管理_bt.Size.Height : SX1(26) = 系統通用變數管理_bt.Location.X : SY1(26) = 系統通用變數管理_bt.Location.Y
        ZX2(27) = 系統使用者管理_bt.Size.Width : ZY2(27) = 系統使用者管理_bt.Size.Height : SX1(27) = 系統使用者管理_bt.Location.X : SY1(27) = 系統使用者管理_bt.Location.Y
        ZX2(28) = 系統權限預設表_bt.Size.Width : ZY2(28) = 系統權限預設表_bt.Size.Height : SX1(28) = 系統權限預設表_bt.Location.X : SY1(28) = 系統權限預設表_bt.Location.Y
        ZX2(29) = 系統組織結構與權限設定_bt.Size.Width : ZY2(29) = 系統組織結構與權限設定_bt.Size.Height : SX1(29) = 系統組織結構與權限設定_bt.Location.X : SY1(29) = 系統組織結構與權限設定_bt.Location.Y
        ZX2(30) = 系統組織架構設定_bt.Size.Width : ZY2(30) = 系統組織架構設定_bt.Size.Height : SX1(30) = 系統組織架構設定_bt.Location.X : SY1(30) = 系統組織架構設定_bt.Location.Y
        ZX2(31) = 部門權限設定_bt.Size.Width : ZY2(31) = 部門權限設定_bt.Size.Height : SX1(31) = 部門權限設定_bt.Location.X : SY1(31) = 部門權限設定_bt.Location.Y
        ZX2(32) = 報修單_bt.Size.Width : ZY2(32) = 報修單_bt.Size.Height : SX1(32) = 報修單_bt.Location.X : SY1(32) = 報修單_bt.Location.Y

        AX2(0) = 客戶資料表_pb.Size.Width : AY2(0) = 客戶資料表_pb.Size.Height : XX1(0) = 客戶資料表_pb.Location.X : XY1(0) = 客戶資料表_pb.Location.Y
        AX2(1) = 洽談日報表_pb.Size.Width : AY2(1) = 洽談日報表_pb.Size.Height : XX1(1) = 洽談日報表_pb.Location.X : XY1(1) = 洽談日報表_pb.Location.Y
        AX2(2) = 案場清單_pb.Size.Width : AY2(2) = 案場清單_pb.Size.Height : XX1(2) = 案場清單_pb.Location.X : XY1(2) = 案場清單_pb.Location.Y
        AX2(3) = 客戶資料轉移_pt.Size.Width : AY2(3) = 客戶資料轉移_pt.Size.Height : XX1(3) = 客戶資料轉移_pt.Location.X : XY1(3) = 客戶資料轉移_pt.Location.Y
        AX2(4) = 休假歷史紀錄_pb.Size.Width : AY2(4) = 休假歷史紀錄_pb.Size.Height : XX1(4) = 休假歷史紀錄_pb.Location.X : XY1(4) = 休假歷史紀錄_pb.Location.Y
        AX2(5) = 加班申請資料_pb.Size.Width : AY2(5) = 加班申請資料_pb.Size.Height : XX1(5) = 加班申請資料_pb.Location.X : XY1(5) = 加班申請資料_pb.Location.Y
        AX2(6) = 休假核准_pb.Size.Width : AY2(6) = 休假核准_pb.Size.Height : XX1(6) = 休假核准_pb.Location.X : XY1(6) = 休假核准_pb.Location.Y
        AX2(7) = 加班核准_pb.Size.Width : AY2(7) = 加班核准_pb.Size.Height : XX1(7) = 加班核准_pb.Location.X : XY1(7) = 加班核准_pb.Location.Y
        AX2(8) = 休假申請_pb.Size.Width : AY2(8) = 休假申請_pb.Size.Height : XX1(8) = 休假申請_pb.Location.X : XY1(8) = 休假申請_pb.Location.Y
        AX2(9) = 加班申請_pb.Size.Width : AY2(9) = 加班申請_pb.Size.Height : XX1(9) = 加班申請_pb.Location.X : XY1(9) = 加班申請_pb.Location.Y
        AX2(10) = 公司組織結構_pb.Size.Width : AY2(10) = 公司組織結構_pb.Size.Height : XX1(10) = 公司組織結構_pb.Location.X : XY1(10) = 公司組織結構_pb.Location.Y
        AX2(11) = PictureBox12.Size.Width : AY2(11) = PictureBox12.Size.Height : XX1(11) = PictureBox12.Location.X : XY1(11) = PictureBox12.Location.Y
        AX2(12) = 考勤明細表_pb.Size.Width : AY2(12) = 考勤明細表_pb.Size.Height : XX1(12) = 考勤明細表_pb.Location.X : XY1(12) = 考勤明細表_pb.Location.Y
        AX2(13) = 行事曆請假_pb.Size.Width : AY2(13) = 行事曆請假_pb.Size.Height : XX1(13) = 行事曆請假_pb.Location.X : XY1(13) = 行事曆請假_pb.Location.Y
        AX2(14) = ID卡配置設定_pb.Size.Width : AY2(14) = ID卡配置設定_pb.Size.Height : XX1(14) = ID卡配置設定_pb.Location.X : XY1(14) = ID卡配置設定_pb.Location.Y
        AX2(15) = 國定假日設定_pb.Size.Width : AY2(15) = 國定假日設定_pb.Size.Height : XX1(15) = 國定假日設定_pb.Location.X : XY1(15) = 國定假日設定_pb.Location.Y
        AX2(16) = 到離職管理_pb.Size.Width : AY2(16) = 到離職管理_pb.Size.Height : XX1(16) = 到離職管理_pb.Location.X : XY1(16) = 到離職管理_pb.Location.Y
        AX2(17) = 案件摘要表_pt.Size.Width : AY2(17) = 案件摘要表_pt.Size.Height : XX1(17) = 案件摘要表_pt.Location.X : XY1(17) = 案件摘要表_pt.Location.Y
        AX2(18) = 太陽能資訊表_pb.Size.Width : AY2(18) = 太陽能資訊表_pb.Size.Height : XX1(18) = 太陽能資訊表_pb.Location.X : XY1(18) = 太陽能資訊表_pb.Location.Y
        AX2(19) = PictureBox20.Size.Width : AY2(19) = PictureBox20.Size.Height : XX1(19) = PictureBox20.Location.X : XY1(19) = PictureBox20.Location.Y
        AX2(20) = 公函_pb.Size.Width : AY2(20) = 公函_pb.Size.Height : XX1(20) = 公函_pb.Location.X : XY1(20) = 公函_pb.Location.Y
        AX2(21) = 公函審核_pb.Size.Width : AY2(21) = 公函審核_pb.Size.Height : XX1(21) = 公函審核_pb.Location.X : XY1(21) = 公函審核_pb.Location.Y
        AX2(22) = 文件_pb.Size.Width : AY2(22) = 文件_pb.Size.Height : XX1(22) = 文件_pb.Location.X : XY1(22) = 文件_pb.Location.Y
        AX2(23) = 系統執行檔版本管理_pb.Size.Width : AY2(23) = 系統執行檔版本管理_pb.Size.Height : XX1(23) = 系統執行檔版本管理_pb.Location.X : XY1(23) = 系統執行檔版本管理_pb.Location.Y
        AX2(24) = 系統對應電腦註冊_pb.Size.Width : AY2(24) = 系統對應電腦註冊_pb.Size.Height : XX1(24) = 系統對應電腦註冊_pb.Location.X : XY1(24) = 系統對應電腦註冊_pb.Location.Y
        AX2(25) = 個人帳號管理_pb.Size.Width : AY2(25) = 個人帳號管理_pb.Size.Height : XX1(25) = 個人帳號管理_pb.Location.X : XY1(25) = 個人帳號管理_pb.Location.Y
        AX2(26) = 系統通用變數管理_pb.Size.Width : AY2(26) = 系統通用變數管理_pb.Size.Height : XX1(26) = 系統通用變數管理_pb.Location.X : XY1(26) = 系統通用變數管理_pb.Location.Y
        AX2(27) = 系統使用者管理_pb.Size.Width : AY2(27) = 系統使用者管理_pb.Size.Height : XX1(27) = 系統使用者管理_pb.Location.X : XY1(27) = 系統使用者管理_pb.Location.Y
        AX2(28) = 系統權限預設表_pb.Size.Width : AY2(28) = 系統權限預設表_pb.Size.Height : XX1(28) = 系統權限預設表_pb.Location.X : XY1(28) = 系統權限預設表_pb.Location.Y
        AX2(29) = 系統組織結構與權限設定_pb.Size.Width : AY2(29) = 系統組織結構與權限設定_pb.Size.Height : XX1(29) = 系統組織結構與權限設定_pb.Location.X : XY1(29) = 系統組織結構與權限設定_pb.Location.Y
        AX2(30) = 系統組織架構設定_pb.Size.Width : AY2(30) = 系統組織架構設定_pb.Size.Height : XX1(30) = 系統組織架構設定_pb.Location.X : XY1(30) = 系統組織架構設定_pb.Location.Y
        AX2(31) = 部門權限設定_pb.Size.Width : AY2(31) = 部門權限設定_pb.Size.Height : XX1(31) = 部門權限設定_pb.Location.X : XY1(31) = 部門權限設定_pb.Location.Y
        AX2(32) = 報修單_pb.Size.Width : AY2(32) = 報修單_pb.Size.Height : XX1(32) = 報修單_pb.Location.X : XY1(32) = 報修單_pb.Location.Y

        QX2(0) = Label1.Size.Width : QY2(0) = Label1.Size.Height : WX1(0) = Label1.Location.X : WY1(0) = Label1.Location.Y
        QX2(1) = Label2.Size.Width : QY2(1) = Label2.Size.Height : WX1(1) = Label2.Location.X : WY1(1) = Label2.Location.Y
        QX2(2) = Label3.Size.Width : QY2(2) = Label3.Size.Height : WX1(2) = Label3.Location.X : WY1(2) = Label3.Location.Y
        QX2(3) = Label4.Size.Width : QY2(3) = Label4.Size.Height : WX1(3) = Label4.Location.X : WY1(3) = Label4.Location.Y
        QX2(4) = Label5.Size.Width : QY2(4) = Label5.Size.Height : WX1(4) = Label5.Location.X : WY1(4) = Label5.Location.Y
        QX2(5) = Label6.Size.Width : QY2(5) = Label6.Size.Height : WX1(5) = Label6.Location.X : WY1(5) = Label6.Location.Y
        QX2(6) = Label7.Size.Width : QY2(6) = Label7.Size.Height : WX1(6) = Label7.Location.X : WY1(6) = Label7.Location.Y
        QX2(7) = Label8.Size.Width : QY2(7) = Label8.Size.Height : WX1(7) = Label8.Location.X : WY1(7) = Label8.Location.Y
        QX2(8) = Label9.Size.Width : QY2(8) = Label9.Size.Height : WX1(8) = Label9.Location.X : WY1(8) = Label9.Location.Y
        QX2(9) = Label10.Size.Width : QY2(9) = Label10.Size.Height : WX1(9) = Label10.Location.X : WY1(9) = Label10.Location.Y
        QX2(10) = Label11.Size.Width : QY2(10) = Label11.Size.Height : WX1(10) = Label11.Location.X : WY1(10) = Label11.Location.Y
        QX2(11) = Label12.Size.Width : QY2(11) = Label12.Size.Height : WX1(11) = Label12.Location.X : WY1(11) = Label12.Location.Y
        QX2(12) = Label13.Size.Width : QY2(12) = Label13.Size.Height : WX1(12) = Label13.Location.X : WY1(12) = Label13.Location.Y
        QX2(13) = Label14.Size.Width : QY2(13) = Label14.Size.Height : WX1(13) = Label14.Location.X : WY1(13) = Label14.Location.Y

        If 登入人級別 = "00" Then : Me.Text = Me.Text & "  --  " & g_conn_type & "  --  " & gUserName & "  --  系統版本  :" & 版本 & " -- IP : " & 登入人IP
        Else : Me.Text = Me.Text & "  --  " & g_conn_type & "  --  " & gUserName & "  --  系統版本  :" & 版本 : End If : 主頁開啟 = True
    End Sub
    Private Sub YS_ERP_SYS_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
        '-----業務管理---------------------------------------------------------------------------------------------------------------------------------------------------------------------
        業務管理系統_tsm.Visible = CC(5)
        客戶資料表_tsm.Visible = CC(19) : 客戶資料表_bt.Enabled = CC(19) : 洽談日報表_tsm.Visible = CC(42) : 洽談日報表_bt.Enabled = CC(42)
        客戶資料轉移_tsm.Visible = CC(15) : 客戶資料轉移_bt.Enabled = CC(15) : 案場清單_tsm.Visible = CC(69) : 案場清單_bt.Enabled = CC(69)
        '-----案件管理---------------------------------------------------------------------------------------------------------------------------------------------------------------------
        案件管理系統_tsm.Visible = CC(6)
        案件摘要表_tsm.Visible = CC(51) : 案件摘要表_bt.Enabled = CC(51) : 太陽能資訊表_tsm.Visible = CC(71) : 太陽能資訊表_bt.Enabled = CC(71)
        '-----工務管理---------------------------------------------------------------------------------------------------------------------------------------------------------------------
        工務管理系統_tsm.Visible = CC(8)
        '-----文件管理---------------------------------------------------------------------------------------------------------------------------------------------------------------------
        文件管理系統_tsm.Visible = CC(40)
        文件_tsm.Visible = CC(80) : 文件_bt.Enabled = CC(80) : 公函_tsm.Visible = CC(81) : 公函_bt.Enabled = CC(81)
        公函審核_tsm.Visible = CC(82) : 公函審核_bt.Enabled = CC(82)
        '-----人事管理---------------------------------------------------------------------------------------------------------------------------------------------------------------------
        人事管理系統_tsm.Visible = CC(22)
        ID卡配置設定_tsm.Visible = CC(23) : ID卡配置設定_bt.Enabled = CC(23) : 到離職管理_tsm.Visible = CC(16) : 到離職管理_bt.Enabled = CC(16)
        休假核准_tsm.Visible = CC(101) : 休假核准_bt.Enabled = CC(101) : 休假歷史紀錄_tsm.Visible = CC(60) : 休假歷史紀錄_bt.Enabled = CC(60)
        國定假日設定_tsm.Visible = CC(25) : 國定假日設定_bt.Enabled = CC(25) : 加班核准_tsm.Visible = CC(26) : 加班核准_bt.Enabled = CC(26)
        加班申請資料_tsm.Visible = CC(27) : 加班申請資料_bt.Enabled = CC(27)
        '-----系統管理---------------------------------------------------------------------------------------------------------------------------------------------------------------------
        系統設定_tsm.Visible = CC(1)
        系統使用者管理_tsm.Visible = CC(2) : 系統使用者管理_bt.Enabled = CC(2) : 系統權限預設表_tsm.Visible = CC(84) : 系統權限預設表_bt.Enabled = CC(84)
        系統組織架構設定_tsm.Visible = CC(41) : 系統組織架構設定_bt.Enabled = CC(41) : 部門權限設定_tsm.Visible = CC(87) : 部門權限設定_bt.Enabled = CC(87)
        系統組織結構與權限設定_tsm.Visible = CC(89) : 系統組織結構與權限設定_bt.Enabled = CC(89) : 系統通用變數管理_tsm.Visible = CC(43) : 系統通用變數管理_bt.Enabled = CC(43)
        系統對應電腦註冊_tsm.Visible = CC(44) : 系統對應電腦註冊_bt.Enabled = CC(44) : 系統執行檔版本管理_tsm.Visible = CC(4) : 系統執行檔版本管理_bt.Enabled = CC(4)

        系統編碼規則_tsm.Visible = CC(10)

        SQL_系統閒置時間設定讀取() : If dr.Read() Then : timeExit = dr("timeExit") : timeExit2 = dr("timeExit2") : End If : conn.Close() : 重登計時()
        If gUser帳號 = LoginForm1.密碼驗證_tb.Text Then : 個人帳號管理.ShowDialog() : End If
    End Sub
    Private Sub YS_ERP_SYS_Closed(sender As Object, e As EventArgs) Handles MyBase.Closed
        LoginForm1.Close()
    End Sub
    Private Sub GRAMS_SYS_SIZE(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
        Me.BackgroundImage = My.Resources._2024052001 : Me.BackgroundImageLayout = 3
        If ZX1 = 0 Or ZY1 = 0 Or ZX2(0) = 0 Or ZY2(0) = 0 Then : Else : 流程空間_p.BackgroundImage = Nothing
            Dim WX As Double = 流程空間_p.Size.Width : Dim WY As Double = 流程空間_p.Size.Height
            客戶資料表_bt.Size = New Size(WX * ZX2(0) / ZX1, WY * ZY2(0) / ZY1) : 客戶資料表_bt.Location = New Point(WX * SX1(0) / ZX1, WY * SY1(0) / ZY1)
            洽談日報表_bt.Size = New Size(WX * ZX2(1) / ZX1, WY * ZY2(1) / ZY1) : 洽談日報表_bt.Location = New Point(WX * SX1(1) / ZX1, WY * SY1(1) / ZY1)
            案場清單_bt.Size = New Size(WX * ZX2(2) / ZX1, WY * ZY2(2) / ZY1) : 案場清單_bt.Location = New Point(WX * SX1(2) / ZX1, WY * SY1(2) / ZY1)
            客戶資料轉移_bt.Size = New Size(WX * ZX2(3) / ZX1, WY * ZY2(3) / ZY1) : 客戶資料轉移_bt.Location = New Point(WX * SX1(3) / ZX1, WY * SY1(3) / ZY1)
            休假歷史紀錄_bt.Size = New Size(WX * ZX2(4) / ZX1, WY * ZY2(4) / ZY1) : 休假歷史紀錄_bt.Location = New Point(WX * SX1(4) / ZX1, WY * SY1(4) / ZY1)
            加班申請資料_bt.Size = New Size(WX * ZX2(5) / ZX1, WY * ZY2(5) / ZY1) : 加班申請資料_bt.Location = New Point(WX * SX1(5) / ZX1, WY * SY1(5) / ZY1)
            休假核准_bt.Size = New Size(WX * ZX2(6) / ZX1, WY * ZY2(6) / ZY1) : 休假核准_bt.Location = New Point(WX * SX1(6) / ZX1, WY * SY1(6) / ZY1)
            加班核准_bt.Size = New Size(WX * ZX2(7) / ZX1, WY * ZY2(7) / ZY1) : 加班核准_bt.Location = New Point(WX * SX1(7) / ZX1, WY * SY1(7) / ZY1)
            休假申請_bt.Size = New Size(WX * ZX2(8) / ZX1, WY * ZY2(8) / ZY1) : 休假申請_bt.Location = New Point(WX * SX1(8) / ZX1, WY * SY1(8) / ZY1)
            加班申請_bt.Size = New Size(WX * ZX2(9) / ZX1, WY * ZY2(9) / ZY1) : 加班申請_bt.Location = New Point(WX * SX1(9) / ZX1, WY * SY1(9) / ZY1)
            公司組織結構_bt.Size = New Size(WX * ZX2(10) / ZX1, WY * ZY2(10) / ZY1) : 公司組織結構_bt.Location = New Point(WX * SX1(10) / ZX1, WY * SY1(10) / ZY1)
            Button12.Size = New Size(WX * ZX2(11) / ZX1, WY * ZY2(11) / ZY1) : Button12.Location = New Point(WX * SX1(11) / ZX1, WY * SY1(11) / ZY1)
            考勤明細表_bt.Size = New Size(WX * ZX2(12) / ZX1, WY * ZY2(12) / ZY1) : 考勤明細表_bt.Location = New Point(WX * SX1(12) / ZX1, WY * SY1(12) / ZY1)
            行事曆請假_bt.Size = New Size(WX * ZX2(13) / ZX1, WY * ZY2(13) / ZY1) : 行事曆請假_bt.Location = New Point(WX * SX1(13) / ZX1, WY * SY1(13) / ZY1)
            ID卡配置設定_bt.Size = New Size(WX * ZX2(14) / ZX1, WY * ZY2(14) / ZY1) : ID卡配置設定_bt.Location = New Point(WX * SX1(14) / ZX1, WY * SY1(14) / ZY1)
            國定假日設定_bt.Size = New Size(WX * ZX2(15) / ZX1, WY * ZY2(15) / ZY1) : 國定假日設定_bt.Location = New Point(WX * SX1(15) / ZX1, WY * SY1(15) / ZY1)
            到離職管理_bt.Size = New Size(WX * ZX2(16) / ZX1, WY * ZY2(16) / ZY1) : 到離職管理_bt.Location = New Point(WX * SX1(16) / ZX1, WY * SY1(16) / ZY1)
            案件摘要表_bt.Size = New Size(WX * ZX2(17) / ZX1, WY * ZY2(17) / ZY1) : 案件摘要表_bt.Location = New Point(WX * SX1(17) / ZX1, WY * SY1(17) / ZY1)
            太陽能資訊表_bt.Size = New Size(WX * ZX2(18) / ZX1, WY * ZY2(18) / ZY1) : 太陽能資訊表_bt.Location = New Point(WX * SX1(18) / ZX1, WY * SY1(18) / ZY1)
            Button20.Size = New Size(WX * ZX2(19) / ZX1, WY * ZY2(19) / ZY1) : Button20.Location = New Point(WX * SX1(19) / ZX1, WY * SY1(19) / ZY1)
            公函_bt.Size = New Size(WX * ZX2(20) / ZX1, WY * ZY2(20) / ZY1) : 公函_bt.Location = New Point(WX * SX1(20) / ZX1, WY * SY1(20) / ZY1)
            公函審核_bt.Size = New Size(WX * ZX2(21) / ZX1, WY * ZY2(21) / ZY1) : 公函審核_bt.Location = New Point(WX * SX1(21) / ZX1, WY * SY1(21) / ZY1)
            文件_bt.Size = New Size(WX * ZX2(22) / ZX1, WY * ZY2(22) / ZY1) : 文件_bt.Location = New Point(WX * SX1(22) / ZX1, WY * SY1(22) / ZY1)
            系統執行檔版本管理_bt.Size = New Size(WX * ZX2(23) / ZX1, WY * ZY2(23) / ZY1) : 系統執行檔版本管理_bt.Location = New Point(WX * SX1(23) / ZX1, WY * SY1(23) / ZY1)
            系統對應電腦註冊_bt.Size = New Size(WX * ZX2(24) / ZX1, WY * ZY2(24) / ZY1) : 系統對應電腦註冊_bt.Location = New Point(WX * SX1(24) / ZX1, WY * SY1(24) / ZY1)
            個人帳號管理_bt.Size = New Size(WX * ZX2(25) / ZX1, WY * ZY2(25) / ZY1) : 個人帳號管理_bt.Location = New Point(WX * SX1(25) / ZX1, WY * SY1(25) / ZY1)
            系統通用變數管理_bt.Size = New Size(WX * ZX2(26) / ZX1, WY * ZY2(26) / ZY1) : 系統通用變數管理_bt.Location = New Point(WX * SX1(26) / ZX1, WY * SY1(26) / ZY1)
            系統使用者管理_bt.Size = New Size(WX * ZX2(27) / ZX1, WY * ZY2(27) / ZY1) : 系統使用者管理_bt.Location = New Point(WX * SX1(27) / ZX1, WY * SY1(27) / ZY1)
            系統權限預設表_bt.Size = New Size(WX * ZX2(28) / ZX1, WY * ZY2(28) / ZY1) : 系統權限預設表_bt.Location = New Point(WX * SX1(28) / ZX1, WY * SY1(28) / ZY1)
            系統組織結構與權限設定_bt.Size = New Size(WX * ZX2(29) / ZX1, WY * ZY2(29) / ZY1) : 系統組織結構與權限設定_bt.Location = New Point(WX * SX1(29) / ZX1, WY * SY1(29) / ZY1)
            系統組織架構設定_bt.Size = New Size(WX * ZX2(30) / ZX1, WY * ZY2(30) / ZY1) : 系統組織架構設定_bt.Location = New Point(WX * SX1(30) / ZX1, WY * SY1(30) / ZY1)
            部門權限設定_bt.Size = New Size(WX * ZX2(31) / ZX1, WY * ZY2(31) / ZY1) : 部門權限設定_bt.Location = New Point(WX * SX1(31) / ZX1, WY * SY1(31) / ZY1)
            報修單_bt.Size = New Size(WX * ZX2(32) / ZX1, WY * ZY2(32) / ZY1) : 報修單_bt.Location = New Point(WX * SX1(32) / ZX1, WY * SY1(32) / ZY1)

            客戶資料表_pb.Size = New Size(WX * AX2(0) / ZX1, WY * AY2(0) / ZY1) : 客戶資料表_pb.Location = New Point(WX * XX1(0) / ZX1, WY * XY1(0) / ZY1)
            洽談日報表_pb.Size = New Size(WX * AX2(1) / ZX1, WY * AY2(1) / ZY1) : 洽談日報表_pb.Location = New Point(WX * XX1(1) / ZX1, WY * XY1(1) / ZY1)
            案場清單_pb.Size = New Size(WX * AX2(2) / ZX1, WY * AY2(2) / ZY1) : 案場清單_pb.Location = New Point(WX * XX1(2) / ZX1, WY * XY1(2) / ZY1)
            客戶資料轉移_pt.Size = New Size(WX * AX2(3) / ZX1, WY * AY2(3) / ZY1) : 客戶資料轉移_pt.Location = New Point(WX * XX1(3) / ZX1, WY * XY1(3) / ZY1)
            休假歷史紀錄_pb.Size = New Size(WX * AX2(4) / ZX1, WY * AY2(4) / ZY1) : 休假歷史紀錄_pb.Location = New Point(WX * XX1(4) / ZX1, WY * XY1(4) / ZY1)
            加班申請資料_pb.Size = New Size(WX * AX2(5) / ZX1, WY * AY2(5) / ZY1) : 加班申請資料_pb.Location = New Point(WX * XX1(5) / ZX1, WY * XY1(5) / ZY1)
            休假核准_pb.Size = New Size(WX * AX2(6) / ZX1, WY * AY2(6) / ZY1) : 休假核准_pb.Location = New Point(WX * XX1(6) / ZX1, WY * XY1(6) / ZY1)
            加班核准_pb.Size = New Size(WX * AX2(7) / ZX1, WY * AY2(7) / ZY1) : 加班核准_pb.Location = New Point(WX * XX1(7) / ZX1, WY * XY1(7) / ZY1)
            休假申請_pb.Size = New Size(WX * AX2(8) / ZX1, WY * AY2(8) / ZY1) : 休假申請_pb.Location = New Point(WX * XX1(8) / ZX1, WY * XY1(8) / ZY1)
            加班申請_pb.Size = New Size(WX * AX2(9) / ZX1, WY * AY2(9) / ZY1) : 加班申請_pb.Location = New Point(WX * XX1(9) / ZX1, WY * XY1(9) / ZY1)
            公司組織結構_pb.Size = New Size(WX * AX2(10) / ZX1, WY * AY2(10) / ZY1) : 公司組織結構_pb.Location = New Point(WX * XX1(10) / ZX1, WY * XY1(10) / ZY1)
            PictureBox12.Size = New Size(WX * AX2(11) / ZX1, WY * AY2(11) / ZY1) : PictureBox12.Location = New Point(WX * XX1(11) / ZX1, WY * XY1(11) / ZY1)
            考勤明細表_pb.Size = New Size(WX * AX2(12) / ZX1, WY * AY2(12) / ZY1) : 考勤明細表_pb.Location = New Point(WX * XX1(12) / ZX1, WY * XY1(12) / ZY1)
            行事曆請假_pb.Size = New Size(WX * AX2(13) / ZX1, WY * AY2(13) / ZY1) : 行事曆請假_pb.Location = New Point(WX * XX1(13) / ZX1, WY * XY1(13) / ZY1)
            ID卡配置設定_pb.Size = New Size(WX * AX2(14) / ZX1, WY * AY2(14) / ZY1) : ID卡配置設定_pb.Location = New Point(WX * XX1(14) / ZX1, WY * XY1(14) / ZY1)
            國定假日設定_pb.Size = New Size(WX * AX2(15) / ZX1, WY * AY2(15) / ZY1) : 國定假日設定_pb.Location = New Point(WX * XX1(15) / ZX1, WY * XY1(15) / ZY1)
            到離職管理_pb.Size = New Size(WX * AX2(16) / ZX1, WY * AY2(16) / ZY1) : 到離職管理_pb.Location = New Point(WX * XX1(16) / ZX1, WY * XY1(16) / ZY1)
            案件摘要表_pt.Size = New Size(WX * AX2(17) / ZX1, WY * AY2(17) / ZY1) : 案件摘要表_pt.Location = New Point(WX * XX1(17) / ZX1, WY * XY1(17) / ZY1)
            太陽能資訊表_pb.Size = New Size(WX * AX2(18) / ZX1, WY * AY2(18) / ZY1) : 太陽能資訊表_pb.Location = New Point(WX * XX1(18) / ZX1, WY * XY1(18) / ZY1)
            PictureBox20.Size = New Size(WX * AX2(19) / ZX1, WY * AY2(19) / ZY1) : PictureBox20.Location = New Point(WX * XX1(19) / ZX1, WY * XY1(19) / ZY1)
            公函_pb.Size = New Size(WX * AX2(20) / ZX1, WY * AY2(20) / ZY1) : 公函_pb.Location = New Point(WX * XX1(20) / ZX1, WY * XY1(20) / ZY1)
            公函審核_pb.Size = New Size(WX * AX2(21) / ZX1, WY * AY2(21) / ZY1) : 公函審核_pb.Location = New Point(WX * XX1(21) / ZX1, WY * XY1(21) / ZY1)
            文件_pb.Size = New Size(WX * AX2(22) / ZX1, WY * AY2(22) / ZY1) : 文件_pb.Location = New Point(WX * XX1(22) / ZX1, WY * XY1(22) / ZY1)
            系統執行檔版本管理_pb.Size = New Size(WX * AX2(23) / ZX1, WY * AY2(23) / ZY1) : 系統執行檔版本管理_pb.Location = New Point(WX * XX1(23) / ZX1, WY * XY1(23) / ZY1)
            系統對應電腦註冊_pb.Size = New Size(WX * AX2(24) / ZX1, WY * AY2(24) / ZY1) : 系統對應電腦註冊_pb.Location = New Point(WX * XX1(24) / ZX1, WY * XY1(24) / ZY1)
            個人帳號管理_pb.Size = New Size(WX * AX2(25) / ZX1, WY * AY2(25) / ZY1) : 個人帳號管理_pb.Location = New Point(WX * XX1(25) / ZX1, WY * XY1(25) / ZY1)
            系統通用變數管理_pb.Size = New Size(WX * AX2(26) / ZX1, WY * AY2(26) / ZY1) : 系統通用變數管理_pb.Location = New Point(WX * XX1(26) / ZX1, WY * XY1(26) / ZY1)
            系統使用者管理_pb.Size = New Size(WX * AX2(27) / ZX1, WY * AY2(27) / ZY1) : 系統使用者管理_pb.Location = New Point(WX * XX1(27) / ZX1, WY * XY1(27) / ZY1)
            系統權限預設表_pb.Size = New Size(WX * AX2(28) / ZX1, WY * AY2(28) / ZY1) : 系統權限預設表_pb.Location = New Point(WX * XX1(28) / ZX1, WY * XY1(28) / ZY1)
            系統組織結構與權限設定_pb.Size = New Size(WX * AX2(29) / ZX1, WY * AY2(29) / ZY1) : 系統組織結構與權限設定_pb.Location = New Point(WX * XX1(29) / ZX1, WY * XY1(29) / ZY1)
            系統組織架構設定_pb.Size = New Size(WX * AX2(30) / ZX1, WY * AY2(30) / ZY1) : 系統組織架構設定_pb.Location = New Point(WX * XX1(30) / ZX1, WY * XY1(30) / ZY1)
            部門權限設定_pb.Size = New Size(WX * AX2(31) / ZX1, WY * AY2(31) / ZY1) : 部門權限設定_pb.Location = New Point(WX * XX1(31) / ZX1, WY * XY1(31) / ZY1)
            報修單_pb.Size = New Size(WX * AX2(32) / ZX1, WY * AY2(32) / ZY1) : 報修單_pb.Location = New Point(WX * XX1(32) / ZX1, WY * XY1(32) / ZY1)

            Label1.Size = New Size(WX * QX2(0) / ZX1, WY * QY2(0) / ZY1) : Label1.Location = New Point(WX * WX1(0) / ZX1, WY * WY1(0) / ZY1)
            Label2.Size = New Size(WX * QX2(1) / ZX1, WY * QY2(1) / ZY1) : Label2.Location = New Point(WX * WX1(1) / ZX1, WY * WY1(1) / ZY1)
            Label3.Size = New Size(WX * QX2(2) / ZX1, WY * QY2(2) / ZY1) : Label3.Location = New Point(WX * WX1(2) / ZX1, WY * WY1(2) / ZY1)
            Label4.Size = New Size(WX * QX2(3) / ZX1, WY * QY2(3) / ZY1) : Label4.Location = New Point(WX * WX1(3) / ZX1, WY * WY1(3) / ZY1)
            Label5.Size = New Size(WX * QX2(4) / ZX1, WY * QY2(4) / ZY1) : Label5.Location = New Point(WX * WX1(4) / ZX1, WY * WY1(4) / ZY1)
            Label6.Size = New Size(WX * QX2(5) / ZX1, WY * QY2(5) / ZY1) : Label6.Location = New Point(WX * WX1(5) / ZX1, WY * WY1(5) / ZY1)
            Label7.Size = New Size(WX * QX2(6) / ZX1, WY * QY2(6) / ZY1) : Label7.Location = New Point(WX * WX1(6) / ZX1, WY * WY1(6) / ZY1)
            Label8.Size = New Size(WX * QX2(7) / ZX1, WY * QY2(7) / ZY1) : Label8.Location = New Point(WX * WX1(7) / ZX1, WY * WY1(7) / ZY1)
            Label9.Size = New Size(WX * QX2(8) / ZX1, WY * QY2(8) / ZY1) : Label9.Location = New Point(WX * WX1(8) / ZX1, WY * WY1(8) / ZY1)
            Label10.Size = New Size(WX * QX2(9) / ZX1, WY * QY2(9) / ZY1) : Label10.Location = New Point(WX * WX1(9) / ZX1, WY * WY1(9) / ZY1)
            Label11.Size = New Size(WX * QX2(10) / ZX1, WY * QY2(10) / ZY1) : Label11.Location = New Point(WX * WX1(10) / ZX1, WY * WY1(10) / ZY1)
            Label12.Size = New Size(WX * QX2(11) / ZX1, WY * QY2(11) / ZY1) : Label12.Location = New Point(WX * WX1(11) / ZX1, WY * WY1(11) / ZY1)
            Label13.Size = New Size(WX * QX2(12) / ZX1, WY * QY2(12) / ZY1) : Label13.Location = New Point(WX * WX1(12) / ZX1, WY * WY1(12) / ZY1)
            Label14.Size = New Size(WX * QX2(13) / ZX1, WY * QY2(13) / ZY1) : Label14.Location = New Point(WX * WX1(13) / ZX1, WY * WY1(13) / ZY1)
        End If : 流程空間_p.BackgroundImage = My.Resources._1729236891152 : 流程空間_p.BackgroundImageLayout = 3
    End Sub
    Private Sub 重登計時()
        timeNow = 0 : timeNow2 = 0 : Timer1.Enabled = False : Timer2.Enabled = False : Timer1.Enabled = True
    End Sub
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        timeNow += 1
        If (timeNow >= timeExit) Then
            Timer1.Enabled = False : Timer2.Enabled = True : 系統登出.ShowDialog()
            If 重登確認 = True And 主頁開啟 = True Then
                Timer1.Enabled = False : Timer2.Enabled = False
                判斷重登 = True : 重登確認 = False : 主頁開啟 = False : LoginForm1.Close() : Me.Close() : Exit Sub
            ElseIf 重登確認 = True And 主頁開啟 = False Then
                Timer1.Enabled = False : Timer2.Enabled = False
                判斷重登 = True : 重登確認 = False : 主頁開啟 = False : LoginForm1.Close() : Me.Close() : Exit Sub
            ElseIf 重登確認 = False And 主頁開啟 = True Then
                timeNow = 0 : Timer1.Enabled = True : Timer2.Enabled = False : timeNow2 = 0
            ElseIf 重登確認 = False And 主頁開啟 = False Then
                timeNow = 0 : Timer1.Enabled = True : Timer2.Enabled = False : timeNow2 = 0
            End If
        End If
    End Sub
    Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
        Timer1.Enabled = False
        timeNow2 += 1
        If (timeNow2 >= timeExit2) Then
            Timer1.Enabled = False : Timer2.Enabled = False
            判斷重登 = True : 重登確認 = False : 主頁開啟 = False : LoginForm1.Close() : 系統登出.Close() : Me.Close() : Exit Sub
        End If
    End Sub
    Private Sub 虛擬桌面隱藏()
        流程空間_p.Visible = False
    End Sub
    Private Sub 個人帳號管理_tsm_Click(sender As Object, e As EventArgs) Handles 個人帳號管理_tsm.Click
        重置() : 個人帳號管理.ShowDialog() : 個人帳號管理.BringToFront()
    End Sub
    Private Sub 個人帳號管理_bt_Click(sender As Object, e As EventArgs) Handles 個人帳號管理_bt.Click
        個人帳號管理_tsm.PerformClick()
    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
        虛擬桌面隱藏() : 重置() : BL = False : 系統使用者管理.Show() : 系統使用者管理.BringToFront()
    End Sub
    Private Sub 系統使用者管理_bt_Click(sender As Object, e As EventArgs) Handles 系統使用者管理_bt.Click
        系統使用者管理_tsm.PerformClick()
    End Sub
    Private Sub 系統執行檔版本管理_tsm_Click(sender As Object, e As EventArgs) Handles 系統執行檔版本管理_tsm.Click
        重置() : 系統執行檔版本管理.ShowDialog()
    End Sub
    Private Sub 系統執行檔版本管理_bt_Click(sender As Object, e As EventArgs) Handles 系統執行檔版本管理_bt.Click
        系統執行檔版本管理_tsm.PerformClick()
    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 系統組織架構設定_bt_Click(sender As Object, e As EventArgs) Handles 系統組織架構設定_bt.Click
        系統組織架構設定_tsm.PerformClick()
    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 系統權限預設表_bt_Click(sender As Object, e As EventArgs) Handles 系統權限預設表_bt.Click
        系統權限預設表_tsm.PerformClick()
    End Sub
    Private Sub 系統對應電腦註冊_tsm_Click(sender As Object, e As EventArgs) Handles 系統對應電腦註冊_tsm.Click
        虛擬桌面隱藏() : 重置() : 系統綁定電腦資訊.ShowDialog() : 系統綁定電腦資訊.BringToFront()
    End Sub
    Private Sub 系統對應電腦註冊_bt_Click(sender As Object, e As EventArgs) Handles 系統對應電腦註冊_bt.Click
        系統對應電腦註冊_tsm.PerformClick()
    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 公司組織結構_bt_Click(sender As Object, e As EventArgs) Handles 公司組織結構_bt.Click
        公司組織結構_tsm.PerformClick()
    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 系統組織結構與權限設定_bt_Click(sender As Object, e As EventArgs) Handles 系統組織結構與權限設定_bt.Click
        系統組織結構與權限設定_tsm.PerformClick()
    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 部門權限設定_bt_Click(sender As Object, e As EventArgs) Handles 部門權限設定_bt.Click
        部門權限設定_tsm.PerformClick()
    End Sub
    Private Sub 人員ID卡系統配置設定_tsm_Click(sender As Object, e As EventArgs) Handles ID卡配置設定_tsm.Click
        For Each ChildForm As Form In Me.MdiChildren : ChildForm.Close() : Next
        虛擬桌面隱藏() : 重置() : 人員ID卡系統配置設定.Show() : 人員ID卡系統配置設定.BringToFront()
    End Sub
    Private Sub ID卡配置設定_bt_Click(sender As Object, e As EventArgs) Handles ID卡配置設定_bt.Click
        ID卡配置設定_tsm.PerformClick()
    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 系統通用變數管理_bt_Click(sender As Object, e As EventArgs) Handles 系統通用變數管理_bt.Click
        系統通用變數管理_tsm.PerformClick()
    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 客戶資料表_bt_Click(sender As Object, e As EventArgs) Handles 客戶資料表_bt.Click
        客戶資料表_tsm.PerformClick()
    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 案件摘要表_bt_Click(sender As Object, e As EventArgs) Handles 案件摘要表_bt.Click
        案件摘要表_tsm.PerformClick()
    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 洽談日報表_bt_Click(sender As Object, e As EventArgs) Handles 洽談日報表_bt.Click
        洽談日報表_tsm.PerformClick()
    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 案場清單_bt_Click(sender As Object, e As EventArgs) Handles 案場清單_bt.Click
        案場清單_tsm.PerformClick()
    End Sub
    Private Sub 報修單ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 報修單_tsm.Click
        重置() : 報修單.ShowDialog() : 報修單.BringToFront()
    End Sub
    Private Sub 報修單_bt_Click(sender As Object, e As EventArgs) Handles 報修單_bt.Click
        報修單_tsm.PerformClick()
    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 休假申請_bt_Click(sender As Object, e As EventArgs) Handles 休假申請_bt.Click
        休假申請_tsm.PerformClick()
    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 休假核准_bt_Click(sender As Object, e As EventArgs) Handles 休假核准_bt.Click
        休假核准_tsm.PerformClick()
    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 休假歷史紀錄_bt_Click(sender As Object, e As EventArgs) Handles 休假歷史紀錄_bt.Click
        休假歷史紀錄_tsm.PerformClick()
    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 國定假日設定_bt_Click(sender As Object, e As EventArgs) Handles 國定假日設定_bt.Click
        國定假日設定_tsm.PerformClick()
    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 加班申請_bt_Click(sender As Object, e As EventArgs) Handles 加班申請_bt.Click
        加班申請_tsm.PerformClick()
    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 加班核准_bt_Click(sender As Object, e As EventArgs) Handles 加班核准_bt.Click
        加班核准_tsm.PerformClick()
    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 加班申請資料_bt_Click(sender As Object, e As EventArgs) Handles 加班申請資料_bt.Click
        加班申請資料_tsm.PerformClick()
    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 行事曆請假_bt_Click(sender As Object, e As EventArgs) Handles 行事曆請假_bt.Click
        行事曆請假_tsm.PerformClick()
    End Sub
    Private Sub 考勤明細表_tsm_Click(sender As Object, e As EventArgs) Handles 考勤明細表_tsm.Click
        重置() : 考勤明細表.Show() : 考勤明細表.BringToFront()
    End Sub
    Private Sub 考勤明細表_bt_Click(sender As Object, e As EventArgs) Handles 考勤明細表_bt.Click
        考勤明細表_tsm.PerformClick()
    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 文件_bt_Click(sender As Object, e As EventArgs) Handles 文件_bt.Click
        文件_tsm.PerformClick()
    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 公函_bt_Click(sender As Object, e As EventArgs) Handles 公函_bt.Click
        公函_tsm.PerformClick()
    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 公函審核_bt_Click(sender As Object, e As EventArgs) Handles 公函審核_bt.Click
        公函審核_tsm.PerformClick()
    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 到離職管理_bt_Click(sender As Object, e As EventArgs) Handles 到離職管理_bt.Click
        到離職管理_tsm.PerformClick()
    End Sub
    Private Sub 太陽能資訊表_tsm_Click(sender As Object, e As EventArgs) Handles 太陽能資訊表_tsm.Click
        重置() : 太陽能資訊表.Show() : 太陽能資訊表.BringToFront()
    End Sub
    Private Sub 太陽能資訊表_bt_Click(sender As Object, e As EventArgs) Handles 太陽能資訊表_bt.Click
        太陽能資訊表_tsm.PerformClick()
    End Sub
    Private Sub 客戶資料轉移_tsm_Click(sender As Object, e As EventArgs) Handles 客戶資料轉移_tsm.Click
        重置() : 客戶資料轉移.ShowDialog() : 客戶資料轉移.BringToFront()
    End Sub
    Private Sub 客戶資料轉移_bt_Click(sender As Object, e As EventArgs) Handles 客戶資料轉移_bt.Click
        客戶資料轉移_tsm.PerformClick()
    End Sub

    Private Sub TESTToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TESTToolStripMenuItem.Click
        Form1.Show() : Form1.BringToFront()
    End Sub
End Class
