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

📄 frmmanmodify.vb

📁 应急系统(Emergency System, ES)主要是针对自然灾害,安全事故
💻 VB
📖 第 1 页 / 共 2 页
字号:
        Me.Txtapplycompany.Text = ""
        '
        'Txtapplycompanyphone
        '
        Me.Txtapplycompanyphone.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet51, "应急人员信息表.申报单位电话"))
        Me.Txtapplycompanyphone.Enabled = False
        Me.Txtapplycompanyphone.Location = New System.Drawing.Point(416, 56)
        Me.Txtapplycompanyphone.Name = "Txtapplycompanyphone"
        Me.Txtapplycompanyphone.Size = New System.Drawing.Size(144, 21)
        Me.Txtapplycompanyphone.TabIndex = 18
        Me.Txtapplycompanyphone.Text = ""
        '
        'Txtmodifytime
        '
        Me.Txtmodifytime.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet51, "应急人员信息表.修改时间"))
        Me.Txtmodifytime.Enabled = False
        Me.Txtmodifytime.Location = New System.Drawing.Point(416, 96)
        Me.Txtmodifytime.Name = "Txtmodifytime"
        Me.Txtmodifytime.Size = New System.Drawing.Size(144, 21)
        Me.Txtmodifytime.TabIndex = 19
        Me.Txtmodifytime.Text = ""
        '
        'Txtmodifycompany
        '
        Me.Txtmodifycompany.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet51, "应急人员信息表.修改单位"))
        Me.Txtmodifycompany.Enabled = False
        Me.Txtmodifycompany.Location = New System.Drawing.Point(416, 136)
        Me.Txtmodifycompany.Name = "Txtmodifycompany"
        Me.Txtmodifycompany.Size = New System.Drawing.Size(144, 21)
        Me.Txtmodifycompany.TabIndex = 20
        Me.Txtmodifycompany.Text = ""
        '
        'Txtmodifycompanyphone
        '
        Me.Txtmodifycompanyphone.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet51, "应急人员信息表.修改单位电话"))
        Me.Txtmodifycompanyphone.Enabled = False
        Me.Txtmodifycompanyphone.Location = New System.Drawing.Point(416, 176)
        Me.Txtmodifycompanyphone.Name = "Txtmodifycompanyphone"
        Me.Txtmodifycompanyphone.Size = New System.Drawing.Size(144, 21)
        Me.Txtmodifycompanyphone.TabIndex = 21
        Me.Txtmodifycompanyphone.Text = ""
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Btseeall, Me.Btlastrecord, Me.Btnextrecord, Me.Btfrontrecord, Me.Btfirstrecord})
        Me.GroupBox1.Location = New System.Drawing.Point(24, 256)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(536, 96)
        Me.GroupBox1.TabIndex = 22
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "查看应急人员信息"
        '
        'Btseeall
        '
        Me.Btseeall.Location = New System.Drawing.Point(440, 40)
        Me.Btseeall.Name = "Btseeall"
        Me.Btseeall.Size = New System.Drawing.Size(88, 32)
        Me.Btseeall.TabIndex = 4
        Me.Btseeall.Text = "浏览数据"
        '
        'Btlastrecord
        '
        Me.Btlastrecord.Location = New System.Drawing.Point(328, 40)
        Me.Btlastrecord.Name = "Btlastrecord"
        Me.Btlastrecord.Size = New System.Drawing.Size(96, 32)
        Me.Btlastrecord.TabIndex = 3
        Me.Btlastrecord.Text = "最后一个记录"
        '
        'Btnextrecord
        '
        Me.Btnextrecord.Location = New System.Drawing.Point(224, 40)
        Me.Btnextrecord.Name = "Btnextrecord"
        Me.Btnextrecord.Size = New System.Drawing.Size(96, 32)
        Me.Btnextrecord.TabIndex = 2
        Me.Btnextrecord.Text = "下一个记录"
        '
        'Btfrontrecord
        '
        Me.Btfrontrecord.Location = New System.Drawing.Point(120, 40)
        Me.Btfrontrecord.Name = "Btfrontrecord"
        Me.Btfrontrecord.Size = New System.Drawing.Size(96, 32)
        Me.Btfrontrecord.TabIndex = 1
        Me.Btfrontrecord.Text = "前一个记录"
        '
        'Btfirstrecord
        '
        Me.Btfirstrecord.Location = New System.Drawing.Point(16, 40)
        Me.Btfirstrecord.Name = "Btfirstrecord"
        Me.Btfirstrecord.Size = New System.Drawing.Size(96, 32)
        Me.Btfirstrecord.TabIndex = 0
        Me.Btfirstrecord.Text = "第一个记录"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.AddRange(New System.Windows.Forms.Control() {Me.Bexitmanmodify, Me.Btdeleterecord, Me.Btreturn, Me.Btmodifyrecord})
        Me.GroupBox2.Location = New System.Drawing.Point(24, 376)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(536, 100)
        Me.GroupBox2.TabIndex = 23
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "修改应急人员信息"
        '
        'Bexitmanmodify
        '
        Me.Bexitmanmodify.Location = New System.Drawing.Point(408, 40)
        Me.Bexitmanmodify.Name = "Bexitmanmodify"
        Me.Bexitmanmodify.Size = New System.Drawing.Size(96, 32)
        Me.Bexitmanmodify.TabIndex = 4
        Me.Bexitmanmodify.Text = "退出"
        '
        'Btdeleterecord
        '
        Me.Btdeleterecord.Location = New System.Drawing.Point(136, 40)
        Me.Btdeleterecord.Name = "Btdeleterecord"
        Me.Btdeleterecord.Size = New System.Drawing.Size(96, 32)
        Me.Btdeleterecord.TabIndex = 3
        Me.Btdeleterecord.Text = "删除记录"
        '
        'Btreturn
        '
        Me.Btreturn.Location = New System.Drawing.Point(280, 40)
        Me.Btreturn.Name = "Btreturn"
        Me.Btreturn.Size = New System.Drawing.Size(96, 32)
        Me.Btreturn.TabIndex = 1
        Me.Btreturn.Text = "返回原始数据"
        '
        'Btmodifyrecord
        '
        Me.Btmodifyrecord.Location = New System.Drawing.Point(16, 40)
        Me.Btmodifyrecord.Name = "Btmodifyrecord"
        Me.Btmodifyrecord.Size = New System.Drawing.Size(88, 32)
        Me.Btmodifyrecord.TabIndex = 0
        Me.Btmodifyrecord.Text = "修改记录"
        '
        'Lbposition
        '
        Me.Lbposition.Location = New System.Drawing.Point(272, 216)
        Me.Lbposition.Name = "Lbposition"
        Me.Lbposition.Size = New System.Drawing.Size(288, 23)
        Me.Lbposition.TabIndex = 24
        '
        'OleDbDataAdapter1
        '
        Me.OleDbDataAdapter1.InsertCommand = Me.OleDbInsertCommand1
        Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
        Me.OleDbDataAdapter1.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("申报单位电话", "申报单位电话"), New System.Data.Common.DataColumnMapping("修改时间", "修改时间"), New System.Data.Common.DataColumnMapping("修改单位", "修改单位"), New System.Data.Common.DataColumnMapping("修改单位电话", "修改单位电话")})})
        '
        'OleDbInsertCommand1
        '
        Me.OleDbInsertCommand1.CommandText = "INSERT INTO 应急人员信息表(编号, 职业名称, 人数, 隶属部门, 申报时间, 申报单位, 申报单位电话, 修改时间, 修改单位, 修改单位电话) V" & _
        "ALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
        Me.OleDbInsertCommand1.Connection = Me.OleDbConnection1
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("编号", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "编号", System.Data.DataRowVersion.Current, Nothing))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("职业名称", System.Data.OleDb.OleDbType.VarWChar, 20, "职业名称"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("人数", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, False, CType(5, Byte), CType(0, Byte), "人数", System.Data.DataRowVersion.Current, Nothing))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("隶属部门", System.Data.OleDb.OleDbType.VarWChar, 50, "隶属部门"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("申报时间", System.Data.OleDb.OleDbType.DBDate, 0, "申报时间"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("申报单位", System.Data.OleDb.OleDbType.VarWChar, 40, "申报单位"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("申报单位电话", System.Data.OleDb.OleDbType.VarWChar, 20, "申报单位电话"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("修改时间", System.Data.OleDb.OleDbType.DBDate, 0, "修改时间"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("修改单位", System.Data.OleDb.OleDbType.VarWChar, 40, "修改单位"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("修改单位电话", System.Data.OleDb.OleDbType.VarWChar, 20, "修改单位电话"))
        '
        'OleDbConnection1
        '
        Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=D:\曹乃勇毕业设计" & _
        "\数据库\应急信息系统数据库.mdb;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System " & _
        "database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:" & _
        "Engine Type=5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Op" & _
        "s=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet " & _
        "OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Do" & _
        "n't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;" & _
        "Jet OLEDB:SFP=False"
        '
        'OleDbSelectCommand1
        '
        Me.OleDbSelectCommand1.CommandText = "SELECT 编号, 职业名称, 人数, 隶属部门, 申报时间, 申报单位, 申报单位电话, 修改时间, 修改单位, 修改单位电话 FROM 应急人员信息表"
        Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
        '
        'Frmmanmodify
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(584, 485)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Lbposition, Me.GroupBox2, Me.GroupBox1, Me.Txtmodifycompanyphone, Me.Txtmodifycompany, Me.Txtmodifytime, Me.Txtapplycompanyphone, Me.Txtapplycompany, Me.Txtapplytime, Me.Cbbumen, Me.Txtrenshu, Me.Cbjobname, Me.Txtbianhao, Me.Label11, Me.Label10, Me.Label9, Me.Label8, Me.Label7, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Label1})
        Me.Name = "Frmmanmodify"
        Me.Text = "修改应急人员信息"
        CType(Me.DataSet51, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox2.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Bexitmanmodify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bexitmanmodify.Click
        Dim newFrmmain As New Frmmain()
        newFrmmain.Show()
        Me.Hide()
    End Sub

    Private Sub Frmmanmodify_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DataSet51.Clear()
        OleDbDataAdapter1.Fill(DataSet51)
    End Sub

    Private Sub Btfirstrecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btfirstrecord.Click
        Me.BindingContext(DataSet51, "应急人员信息表").Position = 0
        showposition()
    End Sub

    Private Sub Btfrontrecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btfrontrecord.Click
        If Me.BindingContext(DataSet51, "应急人员信息表").Position >= 1 Then
            Me.BindingContext(DataSet51, "应急人员信息表").Position -= 1
        Else
            Me.BindingContext(DataSet51, "应急人员信息表").Position = 0
        End If
        showposition()
    End Sub

    Private Sub Btnextrecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnextrecord.Click
        If Me.BindingContext(DataSet51, "应急人员信息表").Position < Me.BindingContext(DataSet51, "应急人员信息表").Count - 1 Then
            Me.BindingContext(DataSet51, "应急人员信息表").Position += 1
        Else
            Me.BindingContext(DataSet51, "应急人员信息表").Position = Me.BindingContext(DataSet51, "应急人员信息表").Count - 1
        End If
        showposition()
    End Sub

    Private Sub Btlastrecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btlastrecord.Click
        Me.BindingContext(DataSet51, "应急人员信息表").Position = Me.BindingContext(DataSet51, "应急人员信息表").Count - 1
        showposition()
        showposition()
    End Sub

    Private Sub Btseeall_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btseeall.Click
        If Me.BindingContext(DataSet51, "应急人员信息表").Position < Me.BindingContext(DataSet51, "应急人员信息表").Count - 1 Then
            Me.BindingContext(DataSet51, "应急人员信息表").Position += 1
        ElseIf Me.BindingContext(DataSet51, "应急人员信息表").Position = Me.BindingContext(DataSet51, "应急人员信息表").Count - 1 Then
            Me.BindingContext(DataSet51, "应急人员信息表").Position = 0
        End If
        showposition()
    End Sub

    Private Sub Btdeleterecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btdeleterecord.Click
        Dim currentpos As Integer = Me.BindingContext(DataSet51, "应急人员信息表").Position
        If MessageBox.Show("确定删除吗?", "应急物资人员表中-确认", MessageBoxButtons.OKCancel) = DialogResult.OK Then
            Dim delstr As String = "delete * from 应急人员信息表 where 编号=" & Txtbianhao.Text

            OleDbConnection1.Open()
            OleDbDataAdapter1.DeleteCommand.CommandText = delstr
            OleDbDataAdapter1.DeleteCommand.ExecuteNonQuery()

            DataSet51.Clear()
            OleDbDataAdapter1.Fill(DataSet51)

            If currentpos >= Me.BindingContext(DataSet51, "应急人员信息表").Count Then
                currentpos = Me.BindingContext(DataSet51, "应急人员信息表").Count
            End If
            Me.BindingContext(DataSet51, "应急人员信息表").Position = currentpos
            showposition()
            OleDbConnection1.Close()
        End If
    End Sub

    Private Sub Btreturn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btreturn.Click
        Dim selstr As String = "select * from 应急人员信息表"
        OleDbConnection1.Open()
        OleDbDataAdapter1.SelectCommand.CommandText = selstr
        OleDbDataAdapter1.SelectCommand.ExecuteNonQuery()

        DataSet51.Clear()
        OleDbDataAdapter1.Fill(DataSet51, "应急人员信息表")
        OleDbConnection1.Close()

        showposition()
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
        DataSet51.Clear()
        OleDbDataAdapter1.Fill(DataSet51)
    End Sub
End Class

⌨️ 快捷键说明

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