frmDataManage.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:14k
- Public Class frmDataManage
- Inherits System.Windows.Forms.Form
- Public lsweb As New jxcmanage
- #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 GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents Button1 As System.Windows.Forms.Button
- Friend WithEvents Button2 As System.Windows.Forms.Button
- Friend WithEvents Button3 As System.Windows.Forms.Button
- Friend WithEvents Button4 As System.Windows.Forms.Button
- Friend WithEvents Button5 As System.Windows.Forms.Button
- Friend WithEvents Button6 As System.Windows.Forms.Button
- Friend WithEvents Button7 As System.Windows.Forms.Button
- Friend WithEvents Button8 As System.Windows.Forms.Button
- Friend WithEvents Button9 As System.Windows.Forms.Button
- Friend WithEvents Button10 As System.Windows.Forms.Button
- Friend WithEvents Button11 As System.Windows.Forms.Button
- Friend WithEvents Button12 As System.Windows.Forms.Button
- Friend WithEvents Button13 As System.Windows.Forms.Button
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents Button14 As System.Windows.Forms.Button
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.Button13 = New System.Windows.Forms.Button
- Me.Button12 = New System.Windows.Forms.Button
- Me.Button11 = New System.Windows.Forms.Button
- Me.Button10 = New System.Windows.Forms.Button
- Me.Button9 = New System.Windows.Forms.Button
- Me.Button8 = New System.Windows.Forms.Button
- Me.Button7 = New System.Windows.Forms.Button
- Me.Button6 = New System.Windows.Forms.Button
- Me.Button5 = New System.Windows.Forms.Button
- Me.Button4 = New System.Windows.Forms.Button
- Me.Button3 = New System.Windows.Forms.Button
- Me.Button2 = New System.Windows.Forms.Button
- Me.Button1 = New System.Windows.Forms.Button
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.Button14 = New System.Windows.Forms.Button
- Me.GroupBox1.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.Button14)
- Me.GroupBox1.Controls.Add(Me.Button13)
- Me.GroupBox1.Controls.Add(Me.Button12)
- Me.GroupBox1.Controls.Add(Me.Button11)
- Me.GroupBox1.Controls.Add(Me.Button10)
- Me.GroupBox1.Controls.Add(Me.Button9)
- Me.GroupBox1.Controls.Add(Me.Button8)
- Me.GroupBox1.Controls.Add(Me.Button7)
- Me.GroupBox1.Controls.Add(Me.Button6)
- Me.GroupBox1.Controls.Add(Me.Button5)
- Me.GroupBox1.Controls.Add(Me.Button4)
- Me.GroupBox1.Controls.Add(Me.Button3)
- Me.GroupBox1.Controls.Add(Me.Button2)
- Me.GroupBox1.Controls.Add(Me.Button1)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Left
- Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(160, 614)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- '
- 'Button13
- '
- Me.Button13.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button13.Location = New System.Drawing.Point(3, 515)
- Me.Button13.Name = "Button13"
- Me.Button13.Size = New System.Drawing.Size(154, 41)
- Me.Button13.TabIndex = 12
- Me.Button13.Text = "零售价为空"
- '
- 'Button12
- '
- Me.Button12.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button12.Location = New System.Drawing.Point(3, 473)
- Me.Button12.Name = "Button12"
- Me.Button12.Size = New System.Drawing.Size(154, 42)
- Me.Button12.TabIndex = 11
- Me.Button12.Text = "批发价为空"
- '
- 'Button11
- '
- Me.Button11.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button11.Location = New System.Drawing.Point(3, 432)
- Me.Button11.Name = "Button11"
- Me.Button11.Size = New System.Drawing.Size(154, 41)
- Me.Button11.TabIndex = 10
- Me.Button11.Text = "药品编号为空"
- '
- 'Button10
- '
- Me.Button10.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button10.Location = New System.Drawing.Point(3, 391)
- Me.Button10.Name = "Button10"
- Me.Button10.Size = New System.Drawing.Size(154, 41)
- Me.Button10.TabIndex = 9
- Me.Button10.Text = "药品类型为空"
- '
- 'Button9
- '
- Me.Button9.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button9.Location = New System.Drawing.Point(3, 350)
- Me.Button9.Name = "Button9"
- Me.Button9.Size = New System.Drawing.Size(154, 41)
- Me.Button9.TabIndex = 8
- Me.Button9.Text = "药品名称为空"
- '
- 'Button8
- '
- Me.Button8.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button8.Location = New System.Drawing.Point(3, 309)
- Me.Button8.Name = "Button8"
- Me.Button8.Size = New System.Drawing.Size(154, 41)
- Me.Button8.TabIndex = 7
- Me.Button8.Text = "药品规格为空"
- '
- 'Button7
- '
- Me.Button7.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button7.Location = New System.Drawing.Point(3, 268)
- Me.Button7.Name = "Button7"
- Me.Button7.Size = New System.Drawing.Size(154, 41)
- Me.Button7.TabIndex = 6
- Me.Button7.Text = "价格为空"
- '
- 'Button6
- '
- Me.Button6.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button6.Location = New System.Drawing.Point(3, 227)
- Me.Button6.Name = "Button6"
- Me.Button6.Size = New System.Drawing.Size(154, 41)
- Me.Button6.TabIndex = 5
- Me.Button6.Text = "库存货位为空"
- '
- 'Button5
- '
- Me.Button5.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button5.Location = New System.Drawing.Point(3, 185)
- Me.Button5.Name = "Button5"
- Me.Button5.Size = New System.Drawing.Size(154, 42)
- Me.Button5.TabIndex = 4
- Me.Button5.Text = "包装为空"
- '
- 'Button4
- '
- Me.Button4.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button4.Location = New System.Drawing.Point(3, 144)
- Me.Button4.Name = "Button4"
- Me.Button4.Size = New System.Drawing.Size(154, 41)
- Me.Button4.TabIndex = 3
- Me.Button4.Text = "有效期为空"
- '
- 'Button3
- '
- Me.Button3.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button3.Location = New System.Drawing.Point(3, 103)
- Me.Button3.Name = "Button3"
- Me.Button3.Size = New System.Drawing.Size(154, 41)
- Me.Button3.TabIndex = 2
- Me.Button3.Text = "产地为空"
- '
- 'Button2
- '
- Me.Button2.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button2.Location = New System.Drawing.Point(3, 62)
- Me.Button2.Name = "Button2"
- Me.Button2.Size = New System.Drawing.Size(154, 41)
- Me.Button2.TabIndex = 1
- Me.Button2.Text = "库存数量为零"
- '
- 'Button1
- '
- Me.Button1.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button1.Location = New System.Drawing.Point(3, 21)
- Me.Button1.Name = "Button1"
- Me.Button1.Size = New System.Drawing.Size(154, 41)
- Me.Button1.TabIndex = 0
- Me.Button1.Text = "批号为空"
- '
- 'dgview
- '
- Me.dgview.DataMember = ""
- Me.dgview.Dock = System.Windows.Forms.DockStyle.Fill
- Me.dgview.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgview.Location = New System.Drawing.Point(160, 0)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(800, 614)
- Me.dgview.TabIndex = 1
- '
- 'Button14
- '
- Me.Button14.Dock = System.Windows.Forms.DockStyle.Top
- Me.Button14.Location = New System.Drawing.Point(3, 556)
- Me.Button14.Name = "Button14"
- Me.Button14.Size = New System.Drawing.Size(154, 41)
- Me.Button14.TabIndex = 13
- Me.Button14.Text = "初始数据"
- '
- 'frmDataManage
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(960, 614)
- Me.Controls.Add(Me.dgview)
- Me.Controls.Add(Me.GroupBox1)
- Me.Name = "frmDataManage"
- Me.Text = "frmDataManage"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim strquery As String
- strquery = "delete from wz_kc where 批号 is null"
- lsweb.runSql(strquery)
- MessageBox.Show("批号为空的数据已被删除!", "提示:", MessageBoxButtons.OK)
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Dim strquery As String
- strquery = "delete from wz_kc where 数量=0"
- lsweb.runSql(strquery)
- MessageBox.Show("数量为空的数据已被删除!", "提示:", MessageBoxButtons.OK)
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Dim strquery As String
- strquery = "select * from wz_kc where 产地 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_kc")
- dgview.DataSource = ds
- End Sub
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- Dim strquery As String
- strquery = "select * from wz_kc where 有效期 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_kc")
- dgview.DataSource = ds
- End Sub
- Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- Dim strquery As String
- strquery = "select * from wz_kc where 包装 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_kc")
- dgview.DataSource = ds
- End Sub
- Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
- Dim strquery As String
- strquery = "delete from wz_kc where 货位 is null"
- lsweb.runSql(strquery)
- MessageBox.Show("数量为空的数据已被删除!", "提示:", MessageBoxButtons.OK)
- End Sub
- Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
- Dim strquery As String
- strquery = "delete from wz_kc where 进价 is null"
- lsweb.runSql(strquery)
- MessageBox.Show("进价为空的数据已被删除!", "提示:", MessageBoxButtons.OK)
- End Sub
- Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
- Dim strquery As String
- strquery = "select * from wz_cp where 药品规格 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_cp")
- dgview.DataSource = ds
- End Sub
- Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
- Dim strquery As String
- strquery = "select * from wz_cp where 药品名称 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_cp")
- dgview.DataSource = ds
- End Sub
- Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
- Dim strquery As String
- strquery = "select * from wz_cp where 药品类型 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_cp")
- dgview.DataSource = ds
- End Sub
- Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
- Dim strquery As String
- strquery = "select * from wz_cp where 药品编号 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_cp")
- dgview.DataSource = ds
- End Sub
- Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
- Dim strquery As String
- strquery = "select * from wz_cp where 批发价 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_cp")
- dgview.DataSource = ds
- End Sub
- Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
- Dim strquery As String
- strquery = "select * from wz_cp where 零售价 is null"
- Dim ds As DataSet
- ds = lsweb.returndataset(strquery, "wz_cp")
- dgview.DataSource = ds
- End Sub
- Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
- Dim i As Int16
- i = MessageBox.Show("您是否要对数据库进行初始化操作?请慎重!", "警告:", MessageBoxButtons.YesNo)
- If i = 6 Then
- Dim strquery As String
- strquery = "exec sp_clearData"
- lsweb.runSql(strquery)
- MessageBox.Show("数据库已被初始化!", "提示:", MessageBoxButtons.OK)
- End If
-
- End Sub
- End Class