frmKCQuery.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:12k
- Public Class frmKCQuery
- Inherits System.Windows.Forms.Form
- #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 cboType As System.Windows.Forms.ComboBox
- Friend WithEvents txtQuery As System.Windows.Forms.Button
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents txtQuery1 As System.Windows.Forms.TextBox
- Friend WithEvents Button1 As System.Windows.Forms.Button
- Friend WithEvents aa As System.Windows.Forms.GroupBox
- Friend WithEvents txtQuery2 As System.Windows.Forms.TextBox
- Friend WithEvents Button2 As System.Windows.Forms.Button
- Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
- Friend WithEvents txtPrint As System.Windows.Forms.Button
- Friend WithEvents Button3 As System.Windows.Forms.Button
- Friend WithEvents dgKc As System.Windows.Forms.DataGrid
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.cboType = New System.Windows.Forms.ComboBox
- Me.txtQuery = New System.Windows.Forms.Button
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.Button1 = New System.Windows.Forms.Button
- Me.txtQuery1 = New System.Windows.Forms.TextBox
- Me.aa = New System.Windows.Forms.GroupBox
- Me.Button2 = New System.Windows.Forms.Button
- Me.txtQuery2 = New System.Windows.Forms.TextBox
- Me.GroupBox3 = New System.Windows.Forms.GroupBox
- Me.Button3 = New System.Windows.Forms.Button
- Me.txtPrint = New System.Windows.Forms.Button
- Me.dgKc = New System.Windows.Forms.DataGrid
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.aa.SuspendLayout()
- Me.GroupBox3.SuspendLayout()
- CType(Me.dgKc, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.cboType)
- Me.GroupBox1.Controls.Add(Me.txtQuery)
- Me.GroupBox1.Location = New System.Drawing.Point(6, 12)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(114, 81)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "按类型"
- '
- 'cboType
- '
- Me.cboType.Items.AddRange(New Object() {"P01:抗生素", "P02:其它抗菌药", "P03:维生素,激素,生化类", "P04:解热止痛感冒药", "P05:中枢药", "P06:心血管药", "P07:消化系统药", "P08:其它西药", "P09:中药", "Z01:抗生素", "Z02:其他抗菌素", "Z03:维生素,激素,生化类", "Z04:电解质,大输液", "Z05:麻醉,镇静,抗过敏,解热止痛", "Z06:心血管,血液,利尿药", "Z07:中药制剂", "Z08:其它", "F01:西药粉剂", "F02:中药制剂", "K01:抗菌类", "K02:西药液体", "K03:感冒止咳", "K04:中药治疗类", "K05:营养滋补类", "K06:其它", "W01:眼用药", "W02:五官科药材", "W03:栓剂", "W04:皮肤用", "W05:贴膏", "W06:液体制剂", "W07:外用粉剂", "B01:保健药品", "B02:保健食品", "B03:消字号", "Q01:敷料", "Q02:一次性布料", "Q03:一次性针筒", "Q04:一次性输液器", "Q05:一次性针头", "Q06:一次性其他用品", "Q07:医用材料", "Q08:医用器械"})
- Me.cboType.Location = New System.Drawing.Point(12, 25)
- Me.cboType.Name = "cboType"
- Me.cboType.Size = New System.Drawing.Size(91, 20)
- Me.cboType.TabIndex = 0
- '
- 'txtQuery
- '
- Me.txtQuery.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.txtQuery.Font = New System.Drawing.Font("新宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
- Me.txtQuery.Location = New System.Drawing.Point(12, 50)
- Me.txtQuery.Name = "txtQuery"
- Me.txtQuery.Size = New System.Drawing.Size(90, 25)
- Me.txtQuery.TabIndex = 1
- Me.txtQuery.Text = "查询(&Q)"
- Me.txtQuery.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.Button1)
- Me.GroupBox2.Controls.Add(Me.txtQuery1)
- Me.GroupBox2.Location = New System.Drawing.Point(126, 12)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(102, 81)
- Me.GroupBox2.TabIndex = 1
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "按拼音码"
- '
- 'Button1
- '
- Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.Button1.Font = New System.Drawing.Font("新宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
- Me.Button1.Location = New System.Drawing.Point(12, 50)
- Me.Button1.Name = "Button1"
- Me.Button1.Size = New System.Drawing.Size(78, 25)
- Me.Button1.TabIndex = 1
- Me.Button1.Text = "查询(&Q)"
- Me.Button1.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'txtQuery1
- '
- Me.txtQuery1.Location = New System.Drawing.Point(12, 25)
- Me.txtQuery1.Name = "txtQuery1"
- Me.txtQuery1.Size = New System.Drawing.Size(78, 21)
- Me.txtQuery1.TabIndex = 0
- Me.txtQuery1.Text = ""
- '
- 'aa
- '
- Me.aa.Controls.Add(Me.Button2)
- Me.aa.Controls.Add(Me.txtQuery2)
- Me.aa.Location = New System.Drawing.Point(234, 12)
- Me.aa.Name = "aa"
- Me.aa.Size = New System.Drawing.Size(102, 81)
- Me.aa.TabIndex = 2
- Me.aa.TabStop = False
- Me.aa.Text = "按批号"
- '
- 'Button2
- '
- Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.Button2.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
- Me.Button2.ImageAlign = System.Drawing.ContentAlignment.BottomCenter
- Me.Button2.Location = New System.Drawing.Point(12, 50)
- Me.Button2.Name = "Button2"
- Me.Button2.Size = New System.Drawing.Size(78, 25)
- Me.Button2.TabIndex = 1
- Me.Button2.Text = "查询(&Q)"
- Me.Button2.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'txtQuery2
- '
- Me.txtQuery2.Location = New System.Drawing.Point(12, 25)
- Me.txtQuery2.Name = "txtQuery2"
- Me.txtQuery2.Size = New System.Drawing.Size(78, 21)
- Me.txtQuery2.TabIndex = 0
- Me.txtQuery2.Text = ""
- '
- 'GroupBox3
- '
- Me.GroupBox3.Controls.Add(Me.Button3)
- Me.GroupBox3.Controls.Add(Me.txtPrint)
- Me.GroupBox3.Location = New System.Drawing.Point(342, 12)
- Me.GroupBox3.Name = "GroupBox3"
- Me.GroupBox3.Size = New System.Drawing.Size(84, 81)
- Me.GroupBox3.TabIndex = 3
- Me.GroupBox3.TabStop = False
- Me.GroupBox3.Text = "命令"
- '
- 'Button3
- '
- Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.Button3.ImageAlign = System.Drawing.ContentAlignment.BottomCenter
- Me.Button3.Location = New System.Drawing.Point(12, 50)
- Me.Button3.Name = "Button3"
- Me.Button3.Size = New System.Drawing.Size(60, 25)
- Me.Button3.TabIndex = 1
- Me.Button3.Text = "退出(&E)"
- '
- 'txtPrint
- '
- Me.txtPrint.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.txtPrint.Location = New System.Drawing.Point(12, 19)
- Me.txtPrint.Name = "txtPrint"
- Me.txtPrint.Size = New System.Drawing.Size(60, 25)
- Me.txtPrint.TabIndex = 0
- Me.txtPrint.Text = "打印(&P)"
- Me.txtPrint.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'dgKc
- '
- Me.dgKc.CaptionVisible = False
- Me.dgKc.DataMember = ""
- Me.dgKc.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgKc.Location = New System.Drawing.Point(6, 100)
- Me.dgKc.Name = "dgKc"
- Me.dgKc.RowHeadersVisible = False
- Me.dgKc.Size = New System.Drawing.Size(510, 261)
- Me.dgKc.TabIndex = 4
- '
- 'frmKCQuery
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(520, 371)
- Me.Controls.Add(Me.dgKc)
- Me.Controls.Add(Me.GroupBox3)
- Me.Controls.Add(Me.aa)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- 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.Fixed3D
- Me.Name = "frmKCQuery"
- Me.Text = "库存查询"
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.aa.ResumeLayout(False)
- Me.GroupBox3.ResumeLayout(False)
- CType(Me.dgKc, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Public dslocals As New DataSet
- Private Sub txtQuery_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtQuery.Click
- If cboType.Text = "" Then
- dslocals = lsweb.returndataset("select * from wz_kc", "wz_kc")
- dgKc.DataSource = dslocals.Tables("wz_kc").DefaultView
- Else
- Dim cbotext As String = cboType.Text.Substring(0, 3)
- dslocals = lsweb.returndataset("select * from wz_kc where 药品编号 like '" & cbotext & "%'", "wz_kc")
- dgKc.DataSource = dslocals.Tables("wz_kc").DefaultView
- End If
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- If txtQuery1.Text = "" Then
- dslocals = lsweb.returndataset("select * from wz_kc", "wz_kc")
- dgKc.DataSource = dslocals.Tables("wz_kc").DefaultView
- Else
- dslocals = lsweb.returndataset("select * from wz_kc where 药品编号='" & txtQuery1.Text.Trim & "' or 拼音码 like '%" & txtQuery1.Text.Trim & "%'", "wz_kc")
- dgKc.DataSource = dslocals.Tables("wz_kc").DefaultView
- End If
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- If txtQuery2.Text = "" Then
- dslocals = lsweb.returndataset("select * from wz_kc", "wz_kc")
- dgKc.DataSource = dslocals.Tables("wz_kc").DefaultView
- Else
- dslocals = lsweb.returndataset("select * from wz_kc where 批号='" & txtQuery2.Text.Trim & "'", "wz_kc")
- dgKc.DataSource = dslocals.Tables("wz_kc").DefaultView
- End If
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Me.Close()
- End Sub
- End Class