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

📄 indexform.vb

📁 本人收集到的流水帐软件!小巧实用,希望对大家有说帮助.
💻 VB
📖 第 1 页 / 共 5 页
字号:
        Me.LabelIOCount.Size = New System.Drawing.Size(160, 24)
        Me.LabelIOCount.TabIndex = 9
        Me.LabelIOCount.Text = "当天收支合计:"
        Me.LabelIOCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Button2
        '
        Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.Button2.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.Button2.Location = New System.Drawing.Point(488, 496)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(64, 23)
        Me.Button2.TabIndex = 8
        Me.Button2.Text = "删除"
        '
        'ButtonEdit
        '
        Me.ButtonEdit.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.ButtonEdit.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.ButtonEdit.Location = New System.Drawing.Point(408, 496)
        Me.ButtonEdit.Name = "ButtonEdit"
        Me.ButtonEdit.Size = New System.Drawing.Size(64, 23)
        Me.ButtonEdit.TabIndex = 7
        Me.ButtonEdit.Text = "修改"
        '
        'ListViewSelectData
        '
        Me.ListViewSelectData.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader3, Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6, Me.ColumnHeader7, Me.ColumnHeader8, Me.ColumnHeader9})
        Me.ListViewSelectData.Font = New System.Drawing.Font("宋体", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.ListViewSelectData.FullRowSelect = True
        Me.ListViewSelectData.GridLines = True
        Me.ListViewSelectData.Location = New System.Drawing.Point(16, 56)
        Me.ListViewSelectData.Name = "ListViewSelectData"
        Me.ListViewSelectData.Scrollable = False
        Me.ListViewSelectData.Size = New System.Drawing.Size(552, 424)
        Me.ListViewSelectData.TabIndex = 6
        Me.ListViewSelectData.View = System.Windows.Forms.View.Details
        '
        'ColumnHeader3
        '
        Me.ColumnHeader3.Text = ""
        Me.ColumnHeader3.Width = 12
        '
        'ColumnHeader4
        '
        Me.ColumnHeader4.Text = "日期"
        Me.ColumnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        Me.ColumnHeader4.Width = 85
        '
        'ColumnHeader5
        '
        Me.ColumnHeader5.Text = "项目"
        Me.ColumnHeader5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'ColumnHeader6
        '
        Me.ColumnHeader6.Text = "类别"
        Me.ColumnHeader6.Width = 120
        '
        'ColumnHeader7
        '
        Me.ColumnHeader7.Text = "金额"
        Me.ColumnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.ColumnHeader7.Width = 70
        '
        'ColumnHeader8
        '
        Me.ColumnHeader8.Text = "备注"
        Me.ColumnHeader8.Width = 196
        '
        'ColumnHeader9
        '
        Me.ColumnHeader9.Text = ""
        Me.ColumnHeader9.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.ColumnHeader9.Width = 20
        '
        'ButtonSearch
        '
        Me.ButtonSearch.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.ButtonSearch.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.ButtonSearch.Location = New System.Drawing.Point(192, 24)
        Me.ButtonSearch.Name = "ButtonSearch"
        Me.ButtonSearch.Size = New System.Drawing.Size(64, 23)
        Me.ButtonSearch.TabIndex = 2
        Me.ButtonSearch.Text = "查询"
        '
        'DateTimePickerSelect
        '
        Me.DateTimePickerSelect.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.DateTimePickerSelect.Format = System.Windows.Forms.DateTimePickerFormat.Short
        Me.DateTimePickerSelect.Location = New System.Drawing.Point(16, 24)
        Me.DateTimePickerSelect.MinDate = New Date(2000, 1, 1, 0, 0, 0, 0)
        Me.DateTimePickerSelect.Name = "DateTimePickerSelect"
        Me.DateTimePickerSelect.Size = New System.Drawing.Size(160, 21)
        Me.DateTimePickerSelect.TabIndex = 1
        Me.DateTimePickerSelect.Value = New Date(2008, 1, 1, 0, 0, 0, 0)
        '
        'IndexForm
        '
        Me.AutoScale = False
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(776, 549)
        Me.Controls.Add(Me.GroupBoxLeft)
        Me.Controls.Add(Me.GroupBoxSearch)
        Me.Controls.Add(Me.GroupBoxSR)
        Me.Controls.Add(Me.GroupBoxZC)
        Me.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.MaximizeBox = False
        Me.MaximumSize = New System.Drawing.Size(784, 575)
        Me.MinimumSize = New System.Drawing.Size(784, 575)
        Me.Name = "IndexForm"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "小鱼流水帐 V1.0—理财管理"
        Me.GroupBoxLeft.ResumeLayout(False)
        Me.GroupBoxSR.ResumeLayout(False)
        Me.GroupBoxZC.ResumeLayout(False)
        Me.GroupBoxSearch.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Dim TypeDataset As New DataSet '建立类别数据对象
    Dim i, j As Integer
    Dim m, n As Double
    Dim temp As Boolean
    Dim IsClose As Integer
    Private Sub IndexForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.GroupBoxLeft.Text = "当前用户:" & AdminName
        Me.GroupBoxSearch.Visible = True
        Me.DateTimePickerSelect.Value = Now
        CountAllMoney()
    End Sub

    '点击相应结点,执行程序
    Public EditPwd As EditPwd
    Private Sub TreeViewLeft_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeViewLeft.AfterSelect
        Me.TreeViewLeft.ExpandAll()
        '选择收入记帐
        If e.Node.Text = "收入记帐" Then
            Me.GroupBoxSR.Visible = True
            Me.GroupBoxZC.Visible = False
            Me.GroupBoxSearch.Visible = False
            Me.DateTimePickerSR.Value = Now
            ListSR()
        End If
        '选择支出记帐
        If e.Node.Text = "支出记帐" Then
            Me.GroupBoxZC.Visible = True
            Me.GroupBoxSR.Visible = False
            Me.GroupBoxSearch.Visible = False
            Me.DateTimePickerZC.Value = Now
            ListZC()
        End If
        '选择收支查询
        If e.Node.Text = "收支查询" Then
            Me.GroupBoxSearch.Visible = True
            Me.GroupBoxSR.Visible = False
            Me.GroupBoxZC.Visible = False
            Me.DateTimePickerSelect.Value = Now
            Me.ListViewSelectData.Items.Clear()
            CountAllMoney()
        End If
        If e.Node.Text = "类别管理" Then
            Dim EditType As New EditType
            EditType.ShowDialog()
            Me.TreeViewLeft.SelectedNode = Me.TreeViewLeft.Nodes(0) '选择类别管理弹出窗口后将节点放置在父目录上
        End If
        '选择修改密码
        If e.Node.Text = "修改密码" Then
            Dim EditPwd As New EditPwd
            EditPwd.ShowDialog()
            Me.TreeViewLeft.SelectedNode = Me.TreeViewLeft.Nodes(1) '选择修改密码弹出窗口后将节点放置在父目录上
        End If
        If e.Node.Text = "关于系统" Then
            Dim About As New About
            About.ShowDialog()
            Me.TreeViewLeft.SelectedNode = Me.TreeViewLeft.Nodes(2) '选择关于系统弹出窗口后将节点放置在父目录上
        End If
        '选择退出系统
        If e.Node.Text = "退出系统" Then
            IsClose = MsgBox("你确认要退出系统?", MsgBoxStyle.OKCancel + MsgBoxStyle.Information + MsgBoxStyle.SystemModal, "小鱼流水帐")
            Me.TreeViewLeft.SelectedNode = Me.TreeViewLeft.Nodes(2) '选择退出系统弹出窗口后将节点放置在父目录上
            If IsClose = MsgBoxResult.OK Then '判断是否退出
                End
            End If
        End If
    End Sub

    '收入记帐—增加一条收入记录
    Private Sub ButtonSRAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSRAdd.Click
        Dim S As New S_InGuestInfo
        S.In_AdminName = AdminName
        S.In_Data = Me.DateTimePickerSR.Value.Date
        S.In_Type = Me.ComboBoxSRType.Text
        S.In_TypeName = "收入"
        S.In_Text = Me.TextBoxSRText.Text
        If Not IsNumeric(Me.TextBoxSRMoney.Text) Or Me.TextBoxSRMoney.Text = Nothing Or Me.TextBoxSRMoney.Text = 0.0 Then
            MsgBox("请输入收入金额!", MsgBoxStyle.Exclamation)
        Else
            S.In_Money = Me.TextBoxSRMoney.Text
            If S.In_Type = Nothing Then
                MsgBox("请选择收入的类别!", MsgBoxStyle.Exclamation)
            ElseIf S.In_Text = Nothing Then
                MsgBox("请选择收入的备注!", MsgBoxStyle.Exclamation)
            Else
                With New D_InGuestInfo
                    temp = .AddInGuestInfo(S, ErrStr)
                    If temp = True Then
                        MsgBox("此次收入添加成功!")
                        Me.DateTimePickerSR.Value = S.In_Data
                        Me.ComboBoxSRType.Text = Nothing
                        Me.TextBoxSRMoney.Text = 0.0
                        Me.TextBoxSRText.Text = Nothing
                        ListSR()
                    Else
                        MsgBox("添加失败! ")
                    End If
                End With
            End If
        End If
    End Sub

    '支出记帐—增加一条支出记录
    Private Sub ButtonZCAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonZCAdd.Click
        Dim S As New S_InGuestInfo
        S.In_AdminName = AdminName
        S.In_Data = Me.DateTimePickerZC.Value.Date
        S.In_Type = Me.ComboBoxZCType.Text
        S.In_Text = Me.TextBoxZCText.Text
        S.In_TypeName = "支出"
        If Not IsNumeric(Me.TextBoxZCMoney.Text) Or Me.TextBoxZCMoney.Text = Nothing Or Me.TextBoxZCMoney.Text = 0.0 Then
            MsgBox("请输入收入金额!", MsgBoxStyle.Exclamation)
        Else
            S.In_Money = CInt(Me.TextBoxZCMoney.Text)
            If S.In_Type = Nothing Then
                MsgBox("请选择支出的类别!", MsgBoxStyle.Exclamation)
            ElseIf S.In_Money = Nothing Or S.In_Money = 0.0 Then
                MsgBox("请选择支出的金额!", MsgBoxStyle.Exclamation)
            ElseIf S.In_Text = Nothing Then
                MsgBox("请选择支出的备注!", MsgBoxStyle.Exclamation)
            Else
                With New D_InGuestInfo
                    temp = .AddInGuestInfo(S, ErrStr)
                    If temp = True Then
                        MsgBox("此次支出添加成功!")
                        Me.DateTimePickerZC.Value = S.In_Data
                        Me.ComboBoxZCType.Text = Nothing
                        Me.TextBoxZCMoney.Text = 0.0
                        Me.TextBoxZCText.Text = Nothing
                        ListZC()
                    Else
                        MsgBox("添加失败! ")
                    End If

⌨️ 快捷键说明

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