VB+SQLServer2000物流管理系统 第6页

VB+SQLServer2000物流管理系统 第6页

第五章 代码实现

5.1 系统各文件功能的介绍和详解

如图5.2所示  本界面管理了各个界面,其他界面都从此界面中直接或间接调出。

系统主界面如下

5.1系统主界面

代码如下:若图片无法显示请联系站长QQ3249114

Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long

Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long

Private Const MF_REMOVE = &H1000&

Private Const SC_MAXIMIZE = &HF030

Private Sub BMZLSZ_Click()    '部门信息设置

  Frm_Bmzl.Show 1

End Sub

Private Sub CKRZ_Click()

  frm_rz.Show 1

End Sub

Private Sub CLDDAP_Click()

   Frm_Cldd.Show 1              '车辆调度

End Sub

Private Sub CLDDXXCX_Click()

   StrCx = 2

   Frm_Xxcx.Show 1

End Sub

Private Sub CLXXSZ_Click()

  Frm_Clxx.Show 1

End Sub

Private Sub CXDL_Click()

  Unload Me

  frm_xtdl.Show

End Sub

Private Sub END_Click()

  End

End Sub

Private Sub Form_Activate()

  StatusBar1.Panels.Item(3).Text = Format(Now, "yyyymmdd")

  AdoRs.Open "select * from tb_user where user_Name='" + Name1 + "'", Cnn, adOpenKeyset

  If AdoRs.RecordCount > 0 Then

      If AdoRs.Fields("1") = 1 Then

         BMZLSZ.Enabled = True

      ElseIf AdoRs.Fields("1") = 0 Then

         BMZLSZ.Enabled = False

      End If

      If AdoRs.Fields("2") = 1 Then

         zwxxsz.Enabled = True

      ElseIf AdoRs.Fields("2") = 0 Then

         zwxxsz.Enabled = False

      End If

      If AdoRs.Fields("3") = 1 Then

         GSZLSZ.Enabled = True

      ElseIf AdoRs.Fields("3") = 0 Then

         GSZLSZ.Enabled = False

      End If

      If AdoRs.Fields("4") = 1 Then

         YGZLSZ.Enabled = True

      ElseIf AdoRs.Fields("4") = 0 Then

         YGZLSZ.Enabled = False

      End If

      If AdoRs.Fields("5") = 1 Then

         KHZLSZ.Enabled = True

      ElseIf AdoRs.Fields("5") = 0 Then

         KHZLSZ.Enabled = False

      End If

      If AdoRs.Fields("6") = 1 Then

         SJZLSZ.Enabled = True

      ElseIf AdoRs.Fields("6") = 0 Then

         SJZLSZ.Enabled = False

      End If

      If AdoRs.Fields("7") = 1 Then

         CLXXSZ.Enabled = True

      ElseIf AdoRs.Fields("7") = 0 Then

         CLXXSZ.Enabled = False

      End If

      If AdoRs.Fields("8") = 1 Then

         CLDDAP.Enabled = True

         Toolbar1.Buttons(4).Enabled = True

      ElseIf AdoRs.Fields("8") = 0 Then

         CLDDAP.Enabled = False

         Toolbar1.Buttons(4).Enabled = False

      End If

      If AdoRs.Fields("9") = 1 Then

         SQDGL.Enabled = True

         Toolbar1.Buttons(1).Enabled = True

      ElseIf AdoRs.Fields("9") = 0 Then

         SQDGL.Enabled = False

         Toolbar1.Buttons(1).Enabled = False

      End If

      If AdoRs.Fields("10") = 1 Then

         HWTYDGL.Enabled = True

         Toolbar1.Buttons(6).Enabled = True

      ElseIf AdoRs.Fields("10") = 0 Then

         HWTYDGL.Enabled = False

         Toolbar1.Buttons(6).Enabled = False

      End If

      If AdoRs.Fields("11") = 1 Then

         HWYSDGL.Enabled = True

         Toolbar1.Buttons(12).Enabled = True

      ElseIf AdoRs.Fields("11") = 0 Then

         HWYSDGL.Enabled = False

         Toolbar1.Buttons(12).Enabled = False

      End If

      If AdoRs.Fields("12") = 1 Then

         PSJLDGL.Enabled = True

         Toolbar1.Buttons(9).Enabled = True

      ElseIf AdoRs.Fields("12") = 0 Then

         PSJLDGL.Enabled = False

         Toolbar1.Buttons(9).Enabled = False

      End If

      If AdoRs.Fields("13") = 1 Then

         HWSQDCX.Enabled = True

      ElseIf AdoRs.Fields("13") = 0 Then

         HWSQDCX.Enabled = False

      End If

      If AdoRs.Fields("14") = 1 Then

         CLDDXXCX.Enabled = True

      ElseIf AdoRs.Fields("14") = 0 Then

         CLDDXXCX.Enabled = False

      End If

      If AdoRs.Fields("15") = 1 Then

         HWTYXXCX.Enabled = True

         Toolbar1.Buttons(14).Enabled = True

      ElseIf AdoRs.Fields("15") = 0 Then

         HWTYXXCX.Enabled = False

         Toolbar1.Buttons(14).Enabled = False

      End If

      If AdoRs.Fields("16") = 1 Then

         HWTYYSCX.Enabled = True

      ElseIf AdoRs.Fields("16") = 0 Then

         HWTYYSCX.Enabled = False

      End If

      If AdoRs.Fields("17") = 1 Then

         PSHWBGCX.Enabled = True

      ElseIf AdoRs.Fields("17") = 0 Then

         PSHWBGCX.Enabled = False

      End If

      If AdoRs.Fields("18") = 1 Then

         HWSQDBB.Enabled = True

      ElseIf AdoRs.Fields("18") = 0 Then

         HWSQDBB.Enabled = False

      End If

      If AdoRs.Fields("19") = 1 Then

         HWTYDBB.Enabled = True

         Toolbar1.Buttons(16).Enabled = True

      ElseIf AdoRs.Fields("19") = 0 Then

         HWTYDBB.Enabled = False

         Toolbar1.Buttons(16).Enabled = False

      End If

      If AdoRs.Fields("20") = 1 Then

         HWYSDBB.Enabled = True

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有