⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.frm

📁 机票销售管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm frmMain 
   BackColor       =   &H8000000C&
   Caption         =   "大唐航空公司信息管理系统"
   ClientHeight    =   6015
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   9420
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  'Windows Default
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   2880
      Top             =   1920
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   8
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":015A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":02B4
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0706
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0860
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":09BA
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1294
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":15AE
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tbToolBar 
      Align           =   1  'Align Top
      Height          =   855
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   9420
      _ExtentX        =   16616
      _ExtentY        =   1508
      ButtonWidth     =   1455
      ButtonHeight    =   1349
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   8
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "添加"
            Key             =   "Add"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "修改"
            Key             =   "Edit"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "删除"
            Key             =   "Delete"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "刷新"
            Key             =   "Refresh"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "查询"
            Key             =   "Find"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "报表预览"
            Key             =   "Preview"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "报表打印"
            Key             =   "Print"
            ImageIndex      =   8
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar sbStatusBar 
      Align           =   2  'Align Bottom
      Height          =   270
      Left            =   0
      TabIndex        =   0
      Top             =   5745
      Width           =   9420
      _ExtentX        =   16616
      _ExtentY        =   476
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   10954
            Text            =   "Status"
            TextSave        =   "Status"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            AutoSize        =   2
            TextSave        =   "2005-12-5"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            TextSave        =   "18:35"
         EndProperty
      EndProperty
   End
   Begin VB.Menu menuSystem 
      Caption         =   "系统"
      Begin VB.Menu menuModifypwd 
         Caption         =   "修改密码"
      End
      Begin VB.Menu menuAdduser 
         Caption         =   "添加用户"
      End
      Begin VB.Menu menuExit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu menuMairline 
      Caption         =   "航线信息管理"
      Visible         =   0   'False
      Begin VB.Menu menuCarbin 
         Caption         =   "舱位信息"
      End
      Begin VB.Menu menuPlane 
         Caption         =   "客机信息"
      End
      Begin VB.Menu menuAirline 
         Caption         =   "航线信息"
      End
   End
   Begin VB.Menu menuCustomerinfo 
      Caption         =   "客户信息管理"
      Visible         =   0   'False
      Begin VB.Menu menuCtype 
         Caption         =   "客户类型"
      End
      Begin VB.Menu menuCustomer 
         Caption         =   "客户信息"
      End
   End
   Begin VB.Menu menuMticket 
      Caption         =   "票务信息管理"
      Visible         =   0   'False
      Begin VB.Menu menuBookticket 
         Caption         =   "订票管理"
      End
   End
   Begin VB.Menu mnuWork 
      Caption         =   "操作(&O)"
      Visible         =   0   'False
      Begin VB.Menu mnuWorkAdd 
         Caption         =   "添加(&A)"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuWorkEdit 
         Caption         =   "修改(&E)"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuWorkDelete 
         Caption         =   "删除(&D)"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuWorkRefresh 
         Caption         =   "刷新(&R)"
      End
      Begin VB.Menu mnuWorkFind 
         Caption         =   "查询(&F)"
      End
      Begin VB.Menu mnuSys1 
         Caption         =   "-"
      End
      Begin VB.Menu mnuWorkGet 
         Caption         =   "收款"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuPreview 
         Caption         =   "报表预览"
      End
      Begin VB.Menu mnuPrint 
         Caption         =   "报表打印"
      End
   End
   Begin VB.Menu mnuWindow 
      Caption         =   "窗口(&W)"
      Begin VB.Menu mnuWindowCascade 
         Caption         =   "层叠(&C)"
      End
      Begin VB.Menu mnuWindowTileHorizontal 
         Caption         =   "横向平铺(&H)"
      End
      Begin VB.Menu mnuWindowTileVertical 
         Caption         =   "纵向平铺(&V)"
      End
      Begin VB.Menu mnuWindowArrangeIcons 
         Caption         =   "排列图标(&A)"
      End
   End
   Begin VB.Menu menuHelp 
      Caption         =   "帮助"
      Begin VB.Menu menuAbout 
         Caption         =   "About"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub MDIForm_Load()
    Dim sSQL As String
    Dim recTest As ADODB.Recordset
    Dim recTemp As ADODB.Recordset
    Dim MsgText As String
    
    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
    
    '进入时间
    sDate = Format(Now, "yyyy-mm-dd hh:mm")
    
    
    '根据权限显示菜单
    sSQL = "select * from permission where id='" & sUserName & "'"
    Set recTest = ExecuteSQL(sSQL, MsgText)
    
    Do While Not recTest.EOF
        Select Case recTest!module
            Case 10
                menuMairline.Visible = True
                '写日志
                sSQL = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',10)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSQL, MsgText)
                'recTemp.Close

            Case 11
                menuCustomerinfo.Visible = True
                '写日志
                sSQL = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',11)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSQL, MsgText)
                'recTemp.Close
                
            Case 12
                menuMticket.Visible = True
                '写日志
                sSQL = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',12)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSQL, MsgText)
                'recTemp.Close
                
        End Select

        
        recTest.MoveNext
    Loop
    
  
End Sub




Private Sub MDIForm_Unload(Cancel As Integer)
    If Me.WindowState <> vbMinimized Then
        SaveSetting App.Title, "Settings", "MainLeft", Me.Left
        SaveSetting App.Title, "Settings", "MainTop", Me.Top
        SaveSetting App.Title, "Settings", "MainWidth", Me.Width
        SaveSetting App.Title, "Settings", "MainHeight", Me.Height
    End If
End Sub


Private Sub menuAirline_Click()
    frmAirline.txtSQL = "select * from airlineInfo"
    frmAirline.Show 0
End Sub

Private Sub menuBookticket_Click()
    frmTicket.txtSQL = "select * from ticketInfo "
    frmTicket.Show 0
End Sub

Private Sub menuCarbin_Click()
    frmService.txtSQL = "select * from serviceInfo"
    frmService.reportSQL = "{serviceinfo.servicename} like '*'"
    frmService.Show 0
End Sub

Private Sub menuCtype_Click()
    frmcType.txtSQL = "select * from customerType"
    frmcType.reportSQL = "{customerType.ctypeName} like '*'"
    frmcType.Show 0
End Sub

Private Sub menuCustomer_Click()
    frmCustomer.txtSQL = "select * from customerInfo"
    frmCustomer.Show 0
End Sub

Private Sub menuPlane_Click()
    frmPlane.txtSQL = "select * from planeInfo"
    frmPlane.Show 0
End Sub
Private Sub mnuPreview_Click()
'
    If Trim(ActiveForm.reportSQL) <> "" Then
        frmPreview.reportSQL = ActiveForm.reportSQL
        frmPreview.reportName = App.Path & "\rpt\" & ActiveForm.reportName
        frmPreview.Show
    Else
        MsgBox "当前模块没有供打印的报表!", vbOKOnly, "报表预览"
    End If
End Sub

Private Sub mnuPrint_Click()
    Dim CRXApplication As New CRAXDRT.Application
    Dim CRXReport As CRAXDRT.Report
    Dim reportName As String
    
    If Trim(ActiveForm.reportSQL) <> "" Then
        reportName = App.Path & "\rpt\" & ActiveForm.reportName
        Set CRXReport = CRXApplication.OpenReport(reportName)
        CRXReport.RecordSelectionFormula = ActiveForm.reportSQL
        CRXReport.PrintOut
    Else
        MsgBox "当前模块没有供打印的报表!", vbOKOnly, "报表打印"
    End If
    


End Sub
Private Sub mnuWindowArrangeIcons_Click()
    Me.Arrange vbArrangeIcons
End Sub


Private Sub mnuWindowCascade_Click()
    Me.Arrange vbCascade
End Sub


Private Sub mnuWindowTileHorizontal_Click()
    Me.Arrange vbTileHorizontal
End Sub


Private Sub mnuWindowTileVertical_Click()
    Me.Arrange vbTileVertical
End Sub

Private Sub mnuWorkAdd_Click()
    ActiveForm.RecordAdd

End Sub
Private Sub mnuWorkDelete_Click()
    ActiveForm.RecordDelete
End Sub

Private Sub mnuWorkEdit_Click()
    ActiveForm.RecordEdit
End Sub

Private Sub mnuWorkFind_Click()
    ActiveForm.RecordFind
End Sub

Private Sub mnuWorkRefresh_Click()
    ActiveForm.RecordRefresh
End Sub

Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
        Case "Add"
            mnuWorkAdd_Click
        Case "Edit"
            mnuWorkEdit_Click
        Case "Delete"
            mnuWorkDelete_Click
        Case "Refresh"
            mnuWorkRefresh_Click
        Case "Find"
            mnuWorkFind_Click
        'Case "Get"
        '    mnuWorkGet_Click
        'Case "Offer"
        '    mnuWorkOffer_Click
        Case "Print"
            mnuPrint_Click
        Case "Preview"
            mnuPreview_Click
        'Case "Out"
        '    mnuWageOut_Click
        'Case "One"
        '    mnuWageOne_Click
        'Case "Two"
        '    mnuWageTwo_Click
    End Select

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -