frmkcmanage.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:8k
- Public Class frmkcmanage
- 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 GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
- Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
- Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
- Friend WithEvents tbrDelete As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbrPrint As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbrExit As System.Windows.Forms.ToolBarButton
- Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
- Friend WithEvents dgkcmanage As System.Windows.Forms.DataGrid
- Friend WithEvents tbrPash As System.Windows.Forms.ToolBarButton
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.ListBox1 = New System.Windows.Forms.ListBox
- Me.TextBox1 = New System.Windows.Forms.TextBox
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.dgkcmanage = New System.Windows.Forms.DataGrid
- Me.StatusBar1 = New System.Windows.Forms.StatusBar
- Me.ToolBar1 = New System.Windows.Forms.ToolBar
- Me.tbrDelete = New System.Windows.Forms.ToolBarButton
- Me.tbrPrint = New System.Windows.Forms.ToolBarButton
- Me.tbrPash = New System.Windows.Forms.ToolBarButton
- Me.tbrExit = New System.Windows.Forms.ToolBarButton
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- CType(Me.dgkcmanage, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.ListBox1)
- Me.GroupBox1.Controls.Add(Me.TextBox1)
- Me.GroupBox1.Location = New System.Drawing.Point(8, 56)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(144, 376)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- '
- 'ListBox1
- '
- Me.ListBox1.ItemHeight = 12
- Me.ListBox1.Location = New System.Drawing.Point(16, 56)
- Me.ListBox1.Name = "ListBox1"
- Me.ListBox1.Size = New System.Drawing.Size(112, 292)
- Me.ListBox1.TabIndex = 4
- '
- 'TextBox1
- '
- Me.TextBox1.Location = New System.Drawing.Point(16, 24)
- Me.TextBox1.Name = "TextBox1"
- Me.TextBox1.Size = New System.Drawing.Size(112, 21)
- Me.TextBox1.TabIndex = 4
- Me.TextBox1.Text = ""
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.dgkcmanage)
- Me.GroupBox2.Location = New System.Drawing.Point(160, 56)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(576, 376)
- Me.GroupBox2.TabIndex = 1
- Me.GroupBox2.TabStop = False
- '
- 'dgkcmanage
- '
- Me.dgkcmanage.DataMember = ""
- Me.dgkcmanage.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgkcmanage.Location = New System.Drawing.Point(16, 24)
- Me.dgkcmanage.Name = "dgkcmanage"
- Me.dgkcmanage.Size = New System.Drawing.Size(544, 336)
- Me.dgkcmanage.TabIndex = 0
- '
- 'StatusBar1
- '
- Me.StatusBar1.Location = New System.Drawing.Point(0, 446)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(744, 22)
- Me.StatusBar1.TabIndex = 2
- '
- 'ToolBar1
- '
- Me.ToolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbrDelete, Me.tbrPrint, Me.tbrPash, Me.tbrExit})
- Me.ToolBar1.DropDownArrows = True
- Me.ToolBar1.Location = New System.Drawing.Point(0, 0)
- Me.ToolBar1.Name = "ToolBar1"
- Me.ToolBar1.ShowToolTips = True
- Me.ToolBar1.Size = New System.Drawing.Size(744, 41)
- Me.ToolBar1.TabIndex = 3
- '
- 'tbrDelete
- '
- Me.tbrDelete.Text = "清除库存为零的药品"
- '
- 'tbrPrint
- '
- Me.tbrPrint.Text = "库存列表打印"
- '
- 'tbrPash
- '
- Me.tbrPash.Text = "刷新"
- '
- 'tbrExit
- '
- Me.tbrExit.Text = "退出"
- '
- 'frmkcmanage
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(744, 468)
- Me.ControlBox = False
- Me.Controls.Add(Me.ToolBar1)
- Me.Controls.Add(Me.StatusBar1)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
- Me.Name = "frmkcmanage"
- Me.Text = "库存管理"
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- CType(Me.dgkcmanage, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Public dslocals As New DataSet
- Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
- If e.KeyCode = Keys.Enter Then
- dslocals = lsweb.returndataset("select 药品名称 from wz_kcview where 拼音码 like '%" & Me.TextBox1.Text.Trim & "%'", "wz_kcview")
- ListBox1.DataSource = dslocals.Tables("wz_kcview")
- ListBox1.DisplayMember = "药品名称"
- ListBox1.ValueMember = "药品名称"
- End If
- End Sub
- Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
- Select Case e.Button.Text
- Case "清除库存为零的药品"
- delete()
- Case "库存列表打印"
- Dim frmviewkcmanager As New frmviewkcmanage
- frmviewkcmanager.Show()
- Case "刷新"
- dslocals = lsweb.returndataset("select * from wz_kc where 药品名称 = '" & Me.ListBox1.SelectedValue & "'", "wz_kc")
- dgkcmanage.DataSource = dslocals.Tables(0).DefaultView
- Case "退出"
- Me.Close()
- End Select
- End Sub
- Private Sub delete()
- Dim strquery As String
- strquery = "delete from wz_kc where 数量 = 0"
- lsweb.kcql(strquery)
- End Sub
- Private Sub ListBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedValueChanged
- ListBox1.DisplayMember = "药品名称"
- ListBox1.ValueMember = "药品名称"
- dslocals = lsweb.returndataset("select * from wz_kc where 药品名称 = '" & Me.ListBox1.SelectedValue & "'", "wz_kc")
- dgkcmanage.DataSource = dslocals.Tables(0).DefaultView
- End Sub
- Private Sub print()
- Dim frmrkmanageprinter As New frmviewkcmanage
- frmrkmanageprinter.Show()
- End Sub
- Public Function getinfo(ByVal strqueryid As String) As String
- Dim strOrderId As String
- strOrderId = strqueryid
- Return strOrderId
- End Function
- Private Sub frmkcmanage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- End Sub
- End Class