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

📄 frm_main.frm

📁 用VB实现连接oracle817数据月报数输入并统计
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   465
         Index           =   0
         Left            =   150
         TabIndex        =   6
         Top             =   390
         Width           =   2055
      End
   End
   Begin VB.Frame Frame1 
      Height          =   855
      Left            =   30
      TabIndex        =   0
      Top             =   0
      Width           =   9435
      Begin VB.Label Label1 
         Caption         =   "全省2003年9月费用登记"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   465
         Left            =   3630
         TabIndex        =   1
         Top             =   300
         Width           =   5445
      End
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   540
      Left            =   0
      TabIndex        =   22
      Top             =   2655
      Width           =   4680
      _ExtentX        =   8255
      _ExtentY        =   953
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   4075
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   1
            Object.Width           =   4075
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
End
Attribute VB_Name = "frm_main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private nZdxh As Long

Private Sub Command1_Click(Index As Integer)
Dim i As Long
Dim tmpSql As String
Dim tmpArr() As Variant
Dim HaveRs As Boolean
Dim tmpSql(30) As String

Select Case Index
       Case 0
             gYbmx(nZdxh).HZXH = gYbhz.HZXH
             gYbmx(nZdxh).BMDH = gBmdm(nZdxh).BMDH
             gYbmx(nZdxh).BGSBGZF = gNumVal(Text1(0).Text)
             gYbmx(nZdxh).ZYSBGZF = gNumVal(Text1(1).Text)
             gYbmx(nZdxh).JTGJGZF = gNumVal(Text1(2).Text)
             gYbmx(nZdxh).CLGLCBF = gNumVal(Text1(3).Text)
             gYbmx(nZdxh).ZXKJJSF = gNumVal(Text1(4).Text)
             gYbmx(nZdxh).BZGZF = gNumVal(Text1(5).Text)
             gYbmx(nZdxh).QCGZF = gNumVal(Text1(6).Text)
             gYbmx(nZdxh).QT = gNumVal(Text1(7).Text)
             gYbmx(nZdxh).GGFYFT = gNumVal(Text1(8).Text)
             gYbmx(nZdxh).ZJBC = gNumVal(Text1(9).Text)
             gYbmx(nZdxh).BCFT = gNumVal(Text1(10).Text)
             gYbmx(nZdxh).SGJFXB = gNumVal(Text1(11).Text)
             gYbmx(nZdxh).ZFK = gNumVal(Text1(12).Text)
             
             nZdxh = nZdxh + 1
          If nZdxh > nZdsl Then
             Label3.Caption = "正在保存数据.......请稍候"
             
             For i = 0 To nZdsl
             tmpSql(i) = "insert into B_YBMX(VHZXH,VBMDH,NBGSBGZF,NZYSBGZF,NJTGJGZF,NCLGLCBF,NZXKJJSF," & _
                                          "NBZGZF,NQCGZF,NQT,NGGFYFT,NZJBC,NBCFT,NSGJFXB,NZFK) VALUES " & _
                                          "('" & gYbmx(i).HZXH & "','" & gYbmx(i).BMDH & "'," & _
                                            gYbmx(i).BGSBGZF & "," & gYbmx(i).ZYSBGZF & "," & _
                                            gYbmx(i).JTGJGZF & "," & gYbmx(i).CLGLCBF & "," & _
                                            gYbmx(i).ZXKJJSF & "," & gYbmx(i).BZGZF & "," & _
                                            gYbmx(i).QCGZF & gYbmx(i).QT & gYbmx(i).GGFYFT & _
                                            gYbmx(i).ZJBC & "," & gYbmx(i).BCFT & _
                                            gYbmx(i).SGJFXB & "," & gYbmx(i).ZFK & ")"
    
             Next i
             If Not fExecMidSql(tmpSql, nZdsl) Then Exit Sub
                
             SM "该月数据保存成功!"
             
          Else
             Label3.Caption = "当前登记单位:" & gBmdm(nZdxh).BMMC
             For i = 0 To 12
                                   
                 Text1(i).Text = ""
             Next i
             
          End If
            
       Case 1
          If nZdxh > 0 Then
             nZdxh = nZdxh - 1
             Label3.Caption = "当前登记单位:" & gBmdm(nZdxh).BMMC
             For i = 0 To 12
                 Text1(0).Text = gYbmx(nZdxh).BGSBGZF
                 Text1(1).Text = gYbmx(nZdxh).ZYSBGZF
                 Text1(2).Text = gYbmx(nZdxh).JTGJGZF
                 Text1(3).Text = gYbmx(nZdxh).CLGLCBF
                 Text1(4).Text = gYbmx(nZdxh).ZXKJJSF
                 Text1(5).Text = gYbmx(nZdxh).BZGZF
                 Text1(6).Text = gYbmx(nZdxh).QCGZF
                 Text1(7).Text = gYbmx(nZdxh).QT
                 Text1(8).Text = gYbmx(nZdxh).GGFYFT
                 Text1(9).Text = gYbmx(nZdxh).ZJBC
                 Text1(10).Text = gYbmx(nZdxh).BCFT
                 Text1(11).Text = gYbmx(nZdxh).SGJFXB
                 Text1(12).Text = gYbmx(nZdxh).ZFK
             Next i
          End If
       
       Case 2
          If nZdxh < nZdsl Then
             nZdxh = nZdxh + 1
             Label3.Caption = "当前登记单位:" & gBmdm(nZdxh).BMMC
             For i = 0 To 12
                 Text1(0).Text = gYbmx(nZdxh).BGSBGZF
                 Text1(1).Text = gYbmx(nZdxh).ZYSBGZF
                 Text1(2).Text = gYbmx(nZdxh).JTGJGZF
                 Text1(3).Text = gYbmx(nZdxh).CLGLCBF
                 Text1(4).Text = gYbmx(nZdxh).ZXKJJSF
                 Text1(5).Text = gYbmx(nZdxh).BZGZF
                 Text1(6).Text = gYbmx(nZdxh).QCGZF
                 Text1(7).Text = gYbmx(nZdxh).QT
                 Text1(8).Text = gYbmx(nZdxh).GGFYFT
                 Text1(9).Text = gYbmx(nZdxh).ZJBC
                 Text1(10).Text = gYbmx(nZdxh).BCFT
                 Text1(11).Text = gYbmx(nZdxh).SGJFXB
                 Text1(12).Text = gYbmx(nZdxh).ZFK
             Next i
          End If
          
          
End Select
End Function

Private Sub Form_Initialize()
If Not GetZdxx Then End

End Sub

Private Sub Form_Load()

nZdxh = 0
Label1.Caption = "全省" & gYbhz.YBND & "年" & gYbhz.YBYF & "月费用登记"
Label3.Caption = "当前登记单位:" & gBmdm(0).BMMC
StatusBar1.Panels(1).Text = "人员:" & gOper.CZYMC
StatusBar1.Panels(2).Text = "时间:" & Time

End Sub

Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
Select Case Index
       Case 0
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(0).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(0).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
       
       Case 1
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(1).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(1).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
       Case 2
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(2).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(2).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
       End If
       
       Case 3
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(3).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(3).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
          
       Case 4
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(4).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(4).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
       
       Case 5
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(5).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(5).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
       
       Case 6
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(6).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(6).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
       
       Case 7
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(7).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(7).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
       Case 8
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(8).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(8).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
        
      Case 9
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(9).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(9).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
      Case 10
         If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(10).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(10).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
      Case 11
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(11).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(11).SetFocus
               Else
                  Text1(Index + 1).SetFocus
               End If
            End If
     Case 12
            If KeyCode = vbKeyReturn Then
               If gNumVal(Text1(12).Text) < 0 Then
                  SM "输入数据有误!"
                  Text1(12).SetFocus
               End If
            End If
          
End Select
End Sub

Private Sub Timer1_Timer()
StatusBar1.Panels(2).Text = "时间:" & Time
End Sub

⌨️ 快捷键说明

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