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

📄 main_fzgj_yhgl.frm

📁 商品进销存管理系统 采用VB和SQL2000开发 具有很强的实用性
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   6
         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
         BeginProperty Column02 
            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 Column03 
            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 Column04 
            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 Column05 
            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 
            Size            =   225
            BeginProperty Column00 
               ColumnWidth     =   1184.882
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   989.858
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   1620.284
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   854.929
            EndProperty
            BeginProperty Column04 
               ColumnWidth     =   675.213
            EndProperty
            BeginProperty Column05 
               ColumnWidth     =   1080
            EndProperty
         EndProperty
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   -1125
      Top             =   3165
      Visible         =   0   'False
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   $"main_fzgj_yhgl.frx":59EF
      OLEDBString     =   $"main_fzgj_yhgl.frx":5A86
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "tb_bank"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "main_fzgj_yhgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 块 名:main_fzgj_yhgl
'**版权说明:吉林省明日科技有限公司享有本软件的所有版权,如果本软件用于商
'**          业用途,必须经过吉林省明日科技有限公司授权。如果提供网上免费
'**          下载,必须经过吉林省明日科技有限公司授权,并保证程序的完整,
'**          不得修改代码、注释和相关内容,否则,我公司将追究其法律责任
'**网    址:www.mingrisoft.com  价值无限,服务无限
'**电    话:(0431)84978981,84978982
'**创 建 人:明日科技
'**日    期:2007-10-31
'**修 改 人:MRLBB
'**日    期:2007-10-31
'**描    述:
'*************************************************************************

Dim i As Integer     '定义整型变量
Dim blnAdd As Boolean
Dim rs1 As New ADODB.Recordset
Sub view_data()     '定义显示数据的过程
    If Adodc1.Recordset.RecordCount > 0 Then
        For i = 0 To 5
            Text1(i).text = DataGrid1.Columns(i)
        Next i
    End If
End Sub
Private Sub cmdAdd_Click()
    blnAdd = True
    For i = 0 To 5
        Text1(i).Enabled = True
        Text1(i).text = ""
    Next i
    cmdSave.Enabled = True
    Text1(0).SetFocus
End Sub
Private Sub cmdDelete_Click()
    myval = MsgBox("是否要删除该记录?", vbYesNo)
    If myval = vbYes Then
        If Adodc1.Recordset.RecordCount > 0 Then
            Adodc1.Recordset.Delete
            Adodc1.Recordset.Update
            view_data
        End If
    End If
End Sub

Private Sub CmdMD_Click(Index As Integer)
    Select Case Index
    Case Is = 0     '移到第一条记录
        If Not Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
    Case Is = 1     '移到上一条记录
        If Adodc1.Recordset.RecordCount <> 0 Then
            If Adodc1.Recordset.BOF = False Then Adodc1.Recordset.MovePrevious
            If Adodc1.Recordset.BOF = True Then Adodc1.Recordset.MoveFirst
        End If
    Case Is = 2     '移到下一条记录
        If Adodc1.Recordset.RecordCount <> 0 Then
            If Adodc1.Recordset.EOF = False Then Adodc1.Recordset.MoveNext
            If Adodc1.Recordset.EOF = True Then Adodc1.Recordset.MoveLast
        End If
    Case Is = 3     '移到最后一条记录
        If Adodc1.Recordset.EOF = False Then Adodc1.Recordset.MoveLast
    End Select
    view_data     '调用显示数据的过程
End Sub
Private Sub cmdSave_Click()
    If Text1(0) = "" Then
        MsgBox "系统不允许银行名称为空!", , "提示窗口"
        Exit Sub
    End If
    If Text1(1) = "" Then
        MsgBox "系统不允许银行账号为空!", , "提示窗口"
        Exit Sub
    End If
    If blnAdd = True Then
        rs1.Open "tb_bank where 银行名称='" + Text1(0) + "'and 银行账号='" + Text1(1) + "'", Cnn, adOpenStatic
        If rs1.RecordCount > 0 Then
            MsgBox "此银行已存在!"
        Else
            Cnn.Execute ("insert into tb_bank(银行名称,银行账号,地址,电话,联系人,备注) values('" + Text1(0) + "','" + Text1(1) + "','" + Text1(2) + "','" + Text1(3) + "','" + Text1(4) + "','" + Text1(5) + "')")
            Adodc1.Refresh
            For i = 0 To 5
                Text1(i).Enabled = False
            Next i
            cmdSave.Enabled = False
        End If
        rs1.Close
    Else
        Cnn.Execute ("delete from tb_bank where 银行名称='" + DataGrid1.Columns(0) + "'and 银行账号='" + DataGrid1.Columns(1) + "'")
        rs1.Open "tb_bank where 银行名称='" + Text1(0) + "'and 银行账号='" + Text1(1) + "'", Cnn, adOpenStatic
        If rs1.RecordCount > 0 Then
            MsgBox "此银行已存在!"
        Else
            Cnn.Execute ("insert into tb_bank(银行名称,银行账号,地址,电话,联系人,备注) values('" + Text1(0) + "','" + Text1(1) + "','" + Text1(2) + "','" + Text1(3) + "','" + Text1(4) + "','" + Text1(5) + "')")
            Adodc1.Refresh
            For i = 0 To 5
                Text1(i).Enabled = False
            Next i
            cmdSave.Enabled = False
        End If
        rs1.Close
    End If
End Sub

Private Sub cmdModify_Click()
    If Adodc1.Recordset.RecordCount > 0 Then
        blnAdd = False
        For i = 0 To 5
            Text1(i).Enabled = True
        Next i
        cmdSave.Enabled = True
        view_data
    End If
End Sub
Private Sub Form_Load()
    Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_JXC;Data Source=."
    Set DataGrid1.DataSource = Adodc1
    If Adodc1.Recordset.RecordCount > 0 Then view_data   '调用显示数据的过程
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn And Index < 5 Then Text1(Index + 1).SetFocus
    If KeyCode = vbKeyReturn And Index = 5 Then cmdSave.SetFocus
End Sub
Private Sub text1_GotFocus(Index As Integer)
    Text1(Index).BackColor = &HFFFF80
    Text1(Index).SelStart = 0
    Text1(Index).SelLength = Len(Text1(Index))
End Sub
Private Sub text1_LostFocus(Index As Integer)
    Text1(Index).BackColor = &HFFFFFF
End Sub

⌨️ 快捷键说明

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