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

📄 frmshuru.vb

📁 vb.net+SQL开发工具 是一个很好的管理系统的源码
💻 VB
📖 第 1 页 / 共 3 页
字号:
Public Class frmShuRu    Inherits 财务管理.frmBase    Private bmDetail As BindingManagerBase    Private dtDetail As DataTable    Private iCurrentLine As Integer = 0#Region " Windows 窗体设计器生成的代码 "    Public Sub New()        MyBase.New()        '该调用是 Windows 窗体设计器所必需的。        InitializeComponent()        '在 InitializeComponent() 调用之后添加任何初始化    End Sub    '窗体重写 dispose 以清理组件列表。    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)        If disposing Then            If Not (components Is Nothing) Then                components.Dispose()            End If        End If        MyBase.Dispose(disposing)    End Sub    'Windows 窗体设计器所必需的    Private components As System.ComponentModel.IContainer    '注意: 以下过程是 Windows 窗体设计器所必需的    '可以使用 Windows 窗体设计器修改此过程。    '不要使用代码编辑器修改它。    Friend WithEvents SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
    Friend WithEvents DataSet11 As 财务管理.DataSet1
    Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents grbBottom As System.Windows.Forms.GroupBox
    Friend WithEvents grbAbove As System.Windows.Forms.GroupBox
    Friend WithEvents cbbZiHao As System.Windows.Forms.ComboBox
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents txbState As System.Windows.Forms.TextBox
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents txbPeriod As System.Windows.Forms.TextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents txbPepole As System.Windows.Forms.TextBox
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents txbDate As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents txbCode As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents dgdDetail As System.Windows.Forms.DataGrid
    Friend WithEvents txbLender As System.Windows.Forms.TextBox
    Friend WithEvents txbDebit As System.Windows.Forms.TextBox
    Friend WithEvents txbSubjectName As System.Windows.Forms.TextBox
    Friend WithEvents txbSubjectCode As System.Windows.Forms.TextBox
    Friend WithEvents txbSummary As System.Windows.Forms.TextBox
    Friend WithEvents txbLenderTotal As System.Windows.Forms.TextBox
    Friend WithEvents txbDebitTotal As System.Windows.Forms.TextBox
    Friend WithEvents btnDel As System.Windows.Forms.Button
    Friend WithEvents btnSave As System.Windows.Forms.Button
    Friend WithEvents btnAdd As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()        Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlDeleteCommand1 = New System.Data.SqlClient.SqlCommand
        Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
        Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
        Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
        Me.SqlUpdateCommand1 = New System.Data.SqlClient.SqlCommand
        Me.DataSet11 = New 财务管理.DataSet1
        Me.grbBottom = New System.Windows.Forms.GroupBox
        Me.txbLender = New System.Windows.Forms.TextBox
        Me.Label16 = New System.Windows.Forms.Label
        Me.txbDebit = New System.Windows.Forms.TextBox
        Me.Label15 = New System.Windows.Forms.Label
        Me.txbSubjectName = New System.Windows.Forms.TextBox
        Me.Label14 = New System.Windows.Forms.Label
        Me.txbSubjectCode = New System.Windows.Forms.TextBox
        Me.Label13 = New System.Windows.Forms.Label
        Me.txbSummary = New System.Windows.Forms.TextBox
        Me.Label12 = New System.Windows.Forms.Label
        Me.dgdDetail = New System.Windows.Forms.DataGrid
        Me.btnDel = New System.Windows.Forms.Button
        Me.btnSave = New System.Windows.Forms.Button
        Me.btnAdd = New System.Windows.Forms.Button
        Me.grbAbove = New System.Windows.Forms.GroupBox
        Me.cbbZiHao = New System.Windows.Forms.ComboBox
        Me.txbLenderTotal = New System.Windows.Forms.TextBox
        Me.Label11 = New System.Windows.Forms.Label
        Me.txbDebitTotal = New System.Windows.Forms.TextBox
        Me.Label10 = New System.Windows.Forms.Label
        Me.txbState = New System.Windows.Forms.TextBox
        Me.Label9 = New System.Windows.Forms.Label
        Me.txbPeriod = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        Me.txbPepole = New System.Windows.Forms.TextBox
        Me.Label7 = New System.Windows.Forms.Label
        Me.txbDate = New System.Windows.Forms.TextBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.txbCode = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.grbBottom.SuspendLayout()
        CType(Me.dgdDetail, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.grbAbove.SuspendLayout()
        Me.SuspendLayout()
        '
        'SqlDataAdapter1
        '
        Me.SqlDataAdapter1.DeleteCommand = Me.SqlDeleteCommand1
        Me.SqlDataAdapter1.InsertCommand = Me.SqlInsertCommand1
        Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
        Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "凭证表", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("凭证编号", "凭证编号"), New System.Data.Common.DataColumnMapping("会计期间", "会计期间"), New System.Data.Common.DataColumnMapping("日期", "日期"), New System.Data.Common.DataColumnMapping("凭证字号", "凭证字号"), New System.Data.Common.DataColumnMapping("过账状态", "过账状态"), New System.Data.Common.DataColumnMapping("借方合计", "借方合计"), New System.Data.Common.DataColumnMapping("贷方合计", "贷方合计")})})
        Me.SqlDataAdapter1.UpdateCommand = Me.SqlUpdateCommand1
        '
        'SqlDeleteCommand1
        '
        Me.SqlDeleteCommand1.CommandText = "DELETE FROM 凭证表 WHERE (凭证编号 = @Original_凭证编号) AND (会计期间 = @Original_会计期间 OR @Orig" & _
        "inal_会计期间 IS NULL AND 会计期间 IS NULL) AND (借方合计 = @Original_借方合计 OR @Original_借方合计" & _
        " IS NULL AND 借方合计 IS NULL) AND (凭证字号 = @Original_凭证字号 OR @Original_凭证字号 IS NULL " & _
        "AND 凭证字号 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND 日期 IS NULL)" & _
        " AND (贷方合计 = @Original_贷方合计 OR @Original_贷方合计 IS NULL AND 贷方合计 IS NULL) AND (过账状" & _
        "态 = @Original_过账状态 OR @Original_过账状态 IS NULL AND 过账状态 IS NULL)"
        Me.SqlDeleteCommand1.Connection = Me.SqlConnection1
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_凭证编号", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "凭证编号", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_会计期间", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "会计期间", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_借方合计", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "借方合计", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_凭证字号", System.Data.SqlDbType.VarChar, 2, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "凭证字号", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "日期", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_贷方合计", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "贷方合计", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_过账状态", System.Data.SqlDbType.VarChar, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "过账状态", System.Data.DataRowVersion.Original, Nothing))
        '
        'SqlConnection1
        '
        Me.SqlConnection1.ConnectionString = "workstation id=CS;packet size=4096;integrated security=SSPI;data source=CS;persis" & _
        "t security info=False;initial catalog=caiwubook"
        '
        'SqlInsertCommand1
        '
        Me.SqlInsertCommand1.CommandText = "INSERT INTO 凭证表(凭证编号, 会计期间, 日期, 凭证字号, 过账状态, 借方合计, 贷方合计) VALUES (@凭证编号, @会计期间, @日期" & _
        ", @凭证字号, @过账状态, @借方合计, @贷方合计); SELECT 凭证编号, 会计期间, 日期, 凭证字号, 过账状态, 借方合计, 贷方合计 FRO" & _
        "M 凭证表 WHERE (凭证编号 = @凭证编号)"
        Me.SqlInsertCommand1.Connection = Me.SqlConnection1
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@凭证编号", System.Data.SqlDbType.VarChar, 10, "凭证编号"))
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@会计期间", System.Data.SqlDbType.Int, 4, "会计期间"))
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.DateTime, 8, "日期"))
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@凭证字号", System.Data.SqlDbType.VarChar, 2, "凭证字号"))
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@过账状态", System.Data.SqlDbType.VarChar, 4, "过账状态"))
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@借方合计", System.Data.SqlDbType.Money, 8, "借方合计"))
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@贷方合计", System.Data.SqlDbType.Money, 8, "贷方合计"))
        '
        'SqlSelectCommand1
        '
        Me.SqlSelectCommand1.CommandText = "SELECT 凭证编号, 会计期间, 日期, 凭证字号, 过账状态, 借方合计, 贷方合计 FROM 凭证表"
        Me.SqlSelectCommand1.Connection = Me.SqlConnection1
        '
        'SqlUpdateCommand1
        '
        Me.SqlUpdateCommand1.CommandText = "UPDATE 凭证表 SET 凭证编号 = @凭证编号, 会计期间 = @会计期间, 日期 = @日期, 凭证字号 = @凭证字号, 过账状态 = @过账状态, " & _
        "借方合计 = @借方合计, 贷方合计 = @贷方合计 WHERE (凭证编号 = @Original_凭证编号) AND (会计期间 = @Original_会" & _
        "计期间 OR @Original_会计期间 IS NULL AND 会计期间 IS NULL) AND (借方合计 = @Original_借方合计 OR @O" & _
        "riginal_借方合计 IS NULL AND 借方合计 IS NULL) AND (凭证字号 = @Original_凭证字号 OR @Original_凭" & _
        "证字号 IS NULL AND 凭证字号 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND" & _
        " 日期 IS NULL) AND (贷方合计 = @Original_贷方合计 OR @Original_贷方合计 IS NULL AND 贷方合计 IS NU" & _
        "LL) AND (过账状态 = @Original_过账状态 OR @Original_过账状态 IS NULL AND 过账状态 IS NULL); SELE" & _
        "CT 凭证编号, 会计期间, 日期, 凭证字号, 过账状态, 借方合计, 贷方合计 FROM 凭证表 WHERE (凭证编号 = @凭证编号)"
        Me.SqlUpdateCommand1.Connection = Me.SqlConnection1
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@凭证编号", System.Data.SqlDbType.VarChar, 10, "凭证编号"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@会计期间", System.Data.SqlDbType.Int, 4, "会计期间"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.DateTime, 8, "日期"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@凭证字号", System.Data.SqlDbType.VarChar, 2, "凭证字号"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@过账状态", System.Data.SqlDbType.VarChar, 4, "过账状态"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@借方合计", System.Data.SqlDbType.Money, 8, "借方合计"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@贷方合计", System.Data.SqlDbType.Money, 8, "贷方合计"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_凭证编号", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "凭证编号", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_会计期间", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "会计期间", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_借方合计", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "借方合计", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_凭证字号", System.Data.SqlDbType.VarChar, 2, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "凭证字号", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "日期", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_贷方合计", System.Data.SqlDbType.Money, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "贷方合计", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_过账状态", System.Data.SqlDbType.VarChar, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "过账状态", System.Data.DataRowVersion.Original, Nothing))
        '
        'DataSet11
        '
        Me.DataSet11.DataSetName = "DataSet1"
        Me.DataSet11.Locale = New System.Globalization.CultureInfo("zh-CN")
        '
        'grbBottom
        '
        Me.grbBottom.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.grbBottom.Controls.Add(Me.txbLender)
        Me.grbBottom.Controls.Add(Me.Label16)
        Me.grbBottom.Controls.Add(Me.txbDebit)
        Me.grbBottom.Controls.Add(Me.Label15)
        Me.grbBottom.Controls.Add(Me.txbSubjectName)
        Me.grbBottom.Controls.Add(Me.Label14)
        Me.grbBottom.Controls.Add(Me.txbSubjectCode)
        Me.grbBottom.Controls.Add(Me.Label13)
        Me.grbBottom.Controls.Add(Me.txbSummary)
        Me.grbBottom.Controls.Add(Me.Label12)
        Me.grbBottom.Controls.Add(Me.dgdDetail)
        Me.grbBottom.Controls.Add(Me.btnDel)
        Me.grbBottom.Controls.Add(Me.btnSave)
        Me.grbBottom.Controls.Add(Me.btnAdd)
        Me.grbBottom.Location = New System.Drawing.Point(208, 184)
        Me.grbBottom.Name = "grbBottom"
        Me.grbBottom.Size = New System.Drawing.Size(416, 136)
        Me.grbBottom.TabIndex = 4
        Me.grbBottom.TabStop = False
        Me.grbBottom.Text = "分录表"
        '
        'txbLender
        '
        Me.txbLender.Location = New System.Drawing.Point(328, 32)
        Me.txbLender.Name = "txbLender"
        Me.txbLender.Size = New System.Drawing.Size(72, 21)
        Me.txbLender.TabIndex = 29
        Me.txbLender.Text = "0"
        '
        'Label16
        '
        Me.Label16.Location = New System.Drawing.Point(328, 16)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(56, 16)
        Me.Label16.TabIndex = 28
        Me.Label16.Text = "贷方"
        '
        'txbDebit
        '
        Me.txbDebit.Location = New System.Drawing.Point(248, 32)
        Me.txbDebit.Name = "txbDebit"
        Me.txbDebit.Size = New System.Drawing.Size(72, 21)
        Me.txbDebit.TabIndex = 27
        Me.txbDebit.Text = "0"
        '
        'Label15
        '
        Me.Label15.Location = New System.Drawing.Point(248, 16)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(56, 16)
        Me.Label15.TabIndex = 26
        Me.Label15.Text = "借方"
        '
        'txbSubjectName
        '
        Me.txbSubjectName.Location = New System.Drawing.Point(168, 32)
        Me.txbSubjectName.Name = "txbSubjectName"
        Me.txbSubjectName.Size = New System.Drawing.Size(72, 21)
        Me.txbSubjectName.TabIndex = 25
        Me.txbSubjectName.Text = ""
        '
        'Label14
        '
        Me.Label14.Location = New System.Drawing.Point(168, 16)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(56, 16)
        Me.Label14.TabIndex = 24
        Me.Label14.Text = "科目名称"
        '
        'txbSubjectCode
        '
        Me.txbSubjectCode.Location = New System.Drawing.Point(88, 32)
        Me.txbSubjectCode.Name = "txbSubjectCode"
        Me.txbSubjectCode.Size = New System.Drawing.Size(72, 21)
        Me.txbSubjectCode.TabIndex = 23
        Me.txbSubjectCode.Text = ""
        '
        'Label13
        '
        Me.Label13.Location = New System.Drawing.Point(88, 16)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(56, 16)
        Me.Label13.TabIndex = 22
        Me.Label13.Text = "科目代码"
        '
        'txbSummary
        '
        Me.txbSummary.Location = New System.Drawing.Point(8, 32)
        Me.txbSummary.Name = "txbSummary"
        Me.txbSummary.Size = New System.Drawing.Size(72, 21)
        Me.txbSummary.TabIndex = 21
        Me.txbSummary.Text = ""
        '
        'Label12
        '
        Me.Label12.Location = New System.Drawing.Point(8, 16)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(56, 16)
        Me.Label12.TabIndex = 20
        Me.Label12.Text = "摘要"
        '
        'dgdDetail
        '
        Me.dgdDetail.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.dgdDetail.CaptionVisible = False
        Me.dgdDetail.DataMember = ""

⌨️ 快捷键说明

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