main_kfgl_wlzh.frm

来自「星级酒店客房管理系统一套很不错的系统」· FRM 代码 · 共 840 行 · 第 1/3 页

FRM
840
字号
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin ComctlLib.ImageList ImageList2 
      Left            =   5400
      Top             =   3240
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   16777215
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   11
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":B43F
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":C091
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":CCE3
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":D935
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":E587
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":F1D9
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":FE2B
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":10A7D
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":116CF
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":12321
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":12F73
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin ComctlLib.ImageList ImageList1 
      Left            =   10080
      Top             =   240
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   12
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":13BC5
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":13EDF
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":141F9
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":14513
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":146ED
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":14A07
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":14D21
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":1503B
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":15355
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":1566F
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":15989
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_wlzh.frx":15CA3
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "main_kfgl_wlzh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim ZHAccount_id As String
Private Sub Command1_Click()
Dim lx As String
    If Combo1.Text = "内部" And Left(Text1(0).Text, 2) <> "NB" Then lx = "NB" + Text1(0).Text
    If Combo1.Text = "外部" And Left(Text1(0).Text, 2) <> "WB" Then lx = "WB" + Text1(0).Text
    Adodc1.Recordset.AddNew
    Adodc1.Recordset.Fields("帐号") = lx
    Adodc1.Recordset.Fields("帐户名称") = Me.Text1(1).Text
    Adodc1.Recordset.Fields("类别") = Me.Combo1.Text
    Adodc1.Recordset.Fields("负责人") = Me.Text1(3).Text
    Adodc1.Recordset.Fields("联系电话") = Me.Text1(4).Text
    Adodc1.Recordset.Fields("开户银行") = Me.Text1(5).Text
    Adodc1.Recordset.Fields("银行帐号") = Me.Text1(2).Text
    Adodc1.Recordset.Fields("备注") = Me.Text1(6).Text
    Me.Frame1.Visible = False
End Sub
Private Sub Command2_Click()
    Me.Frame1.Visible = False
End Sub

Private Sub Command3_Click()
    Me.Picture1.Visible = False
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
    ZHAccount_id = IIf(IsNull(Adodc1.Recordset.Fields("帐号")), "", Adodc1.Recordset.Fields("帐号"))
End Sub

Private Sub Form_Activate()

StatusBar1.Panels(2).Text = "共有 {" & CStr(Adodc1.Recordset.RecordCount) & "} 条数据"
End Sub

Private Sub Form_Load()
'往来帐户
    Adodc1.ConnectionString = My_PROVIDER
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "select * from 项目编码 where 编码 like 'WL%' order by 名称"
    Adodc1.Refresh
    Adodc2.ConnectionString = My_PROVIDER
    Adodc2.CommandType = adCmdText
    Adodc2.RecordSource = "select * from 往来帐户 where 类别 like '" & Query_Type2 & "'"
    Adodc2.Refresh
    While Not Adodc1.Recordset.EOF
        Me.Combo1.AddItem Adodc1.Recordset.Fields("名称")
        Adodc1.Recordset.MoveNext
    Wend
    Adodc1.Recordset.Close

    Adodc1.ConnectionString = My_PROVIDER
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "select * from 往来帐户 where 类别 like '" & Query_Type2 & "'"
    Adodc1.Refresh
    If Adodc2.Recordset.RecordCount > 0 Then
        If Query_Type2 = "外部" Then
        Text1(0).Text = "WB" & Format(Adodc2.Recordset.RecordCount + 1, "0000")
        Combo1.Text = "外部"
        StatusBar1.Panels(1).Text = "当前操作: " & Me.Caption & "->外部帐户"
        ElseIf Query_Type2 = "内部" Then
        Text1(0).Text = "NB" & Format(Adodc2.Recordset.RecordCount + 1, "0000")
        Combo1.Text = " 内部"
           StatusBar1.Panels(1).Text = "当前操作: " & Me.Caption & "->内部帐户"
        End If
    Else
        If Query_Type2 = "外部" Then
        Text1(0).Text = "WB0001"
        Combo1.Text = "外部"
          StatusBar1.Panels(1).Text = "当前操作: " & Me.Caption & "->外部帐户"
        ElseIf Query_Type2 = "内部" Then
        Text1(0).Text = "NB0001"
        Combo1.Text = " 内部"
        StatusBar1.Panels(1).Text = "当前操作: " & Me.Caption & "->内部帐户"
        End If
    End If
    Set DataGrid1.DataSource = Adodc1
    DataGrid1.ReBind
    DataGrid1.Refresh
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
    Select Case Button.key
        Case "返回"
            Unload Me
        Case "全部"
            Adodc1.RecordSource = "select * from 往来帐户 where 类别 like '" & Query_Type2 & "'"
            Adodc1.Refresh
        Case "增加"
            Me.Frame1.Visible = True
        Case "删除"
            Adodc1.Recordset.Delete
            If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
        Case "打印"
            Set rtpRS = Adodc2.Recordset
            rtpTitle = Query_Type2 & " 往来帐户"
        Case "帐务"
            Me.Picture1.Visible = True
            Adodc2.ConnectionString = My_PROVIDER
            Adodc2.CommandType = adCmdText
            Adodc2.RecordSource = "select * from 往来帐户挂帐记录 where 帐号 like '" & ZHAccount_id & "'"
            Adodc2.Refresh
            Set DataGrid2.DataSource = Adodc2
            DataGrid2.ReBind
            DataGrid2.Refresh
    End Select
End Sub

⌨️ 快捷键说明

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