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

📄 money.frm

📁 为个人用户开发的车险秘书系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Top             =   240
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin MSComctlLib.ListView Lvyj 
         Height          =   4095
         Left            =   120
         TabIndex        =   12
         Top             =   720
         Width           =   3975
         _ExtentX        =   7011
         _ExtentY        =   7223
         View            =   3
         LabelWrap       =   -1  'True
         HideSelection   =   -1  'True
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         _Version        =   393217
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   11.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   3
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Object.Width           =   0
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Alignment       =   2
            SubItemIndex    =   1
            Text            =   "月份"
            Object.Width           =   1482
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Alignment       =   2
            SubItemIndex    =   2
            Text            =   "佣金"
            Object.Width           =   2540
         EndProperty
      End
      Begin VB.Label alltotal 
         BackStyle       =   0  'Transparent
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   720
         TabIndex        =   21
         Top             =   4920
         Width           =   2805
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "选择查看的年:"
         Height          =   195
         Left            =   120
         TabIndex        =   13
         Top             =   360
         Width           =   1260
      End
   End
End
Attribute VB_Name = "money"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub CommandButton1_Click()
    Dim sql As String
    Dim vdb As Boolean
    Dim i As Integer
    
    If Trim$(fee.Text) = "" Then
        MsgBox "请填写佣金"
        Exit Sub
    End If
    vdb = ExcSql
    If vdb = True Then
    sql = "select count(vye) from mymoney where vye='" & Oyear.Text & "' and vmon='" & Omonth.Text & "'"
    i = conn.Execute(sql)(0)
    If i > 0 Then
        MsgBox "记录已经存在"
        Exit Sub
    End If
    sql = "insert into mymoney(vye,vmon,fee) values('" & Oyear.Text & "','" & Omonth.Text & "','" & fee.Text & "')"
    conn.Execute (sql)
    Call ssqlshow
    End If
End Sub

Private Sub CommandButton2_Click()
    Dim sql As String
    Dim vdb As Boolean
    Dim i As Integer
    
    If Trim$(fee.Text) = "" Then
        MsgBox "请填写佣金"
        Exit Sub
    End If
    vdb = ExcSql
    If vdb = True Then
    sql = "select count(vye) from mymoney where vye='" & Oyear.Text & "' and vmon='" & Omonth.Text & "'"
    i = conn.Execute(sql)(0)
    If i = 0 Then
        MsgBox "记录不存在"
        Exit Sub
    End If
    sql = "update mymoney set fee='" & fee.Text & "' where vye='" & Oyear.Text & "' and vmon='" & Omonth.Text & "'"
    conn.Execute (sql)
    Call ssqlshow
    End If
End Sub

Private Sub CommandButton3_Click()
    Dim sql As String
    Dim vdb As Boolean
    vdb = ExcSql
    If vdb = True Then
    sql = "delete from mymoney where vye='" & Oyear.Text & "' and vmon='" & Omonth.Text & "'"
    conn.Execute (sql)
    Call ssqlshow
    End If
End Sub

Private Sub fsize()
    
    If Frame2.Visible = False Then
        'Me.ScaleWidth = Frame3.Width
        'Me.ScaleHeight = Frame3.Height
    Else
        Frame3.Visible = False
        'Me.ScaleWidth = Frame2.Width
        'Me.ScaleHeight = Frame2.Height
        Call ssqlshow
    End If
End Sub

Private Sub CommandButton4_Click()
    Dim sql, vn, vpws As String
    Dim vdb As Boolean
    Dim vnum As Integer
    
    vn = Trim$(Tname.Text)
    vpws = Trim$(Tpws.Text)
    
    If vn = "" Or vpws = "" Then
        MsgBox "登录用户名或密码错误"
        Exit Sub
    End If
    
    sql = "select count(*) from moneyuser where name='" & vn & "' and pws='" & vpws & "'"
    vdb = ExcSql
    If vdb = True Then
        vnum = conn.Execute(sql)(0)
        If vnum > 0 Then
            Frame2.Visible = True
            Frame3.Visible = False
            Call fsize
        End If
    End If
End Sub

Private Sub CommandButton5_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Dim i As Integer
    
    Frame2.Visible = False
    Call fsize
    With Oyear
        For i = 2003 To 2020
        .AddItem i
        Next i
        .ListIndex = 0
    End With
    
    With Osyear
        For i = 2003 To 2020
        .AddItem i
        Next i
        .ListIndex = 0
    End With
    
    With Omonth
        For i = 1 To 12
        .AddItem i
        Next i
        .ListIndex = 0
    End With
    
End Sub

Private Sub Osyear_Change()
    Call ssqlshow
End Sub

Private Sub ssqlshow()
    Dim sql As String
    Dim vdb As Boolean
    Dim rs As Recordset
    Dim c As ListItem
    Dim vdate As String
    Dim i As Integer
    Dim allfee As Long
    
    allfee = 0
    Lvyj.ListItems.Clear
    sql = "select * from mymoney where vye='" & Osyear.Text & "' order by vmon asc"
   ' MsgBox sql
    vdb = ExcSql
    If vdb = True Then
        Set rs = conn.Execute(sql)
        If Not rs.EOF Then
            Do While Not rs.EOF
                Set c = Lvyj.ListItems.Add(, , rs("vye"))
                c.SubItems(1) = rs("vmon") & ""
                c.SubItems(2) = rs("fee") & ""
                allfee = CLng(allfee) + CLng(rs("fee"))
            rs.MoveNext
            Loop
            alltotal.Caption = Osyear.Text & "年 合计:" & allfee & "元"
        End If
        rs.Close
        Set rs = Nothing
    End If
End Sub

⌨️ 快捷键说明

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