frmPsPf.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:25k
- Public Class frmPsPf
- 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 StatusBar1 As System.Windows.Forms.StatusBar
- Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Button3 As System.Windows.Forms.Button
- Friend WithEvents 票据信息 As System.Windows.Forms.GroupBox
- Friend WithEvents Label21 As System.Windows.Forms.Label
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents txtShy As System.Windows.Forms.TextBox
- Friend WithEvents txtBhy As System.Windows.Forms.TextBox
- Friend WithEvents txtBhType As System.Windows.Forms.TextBox
- Friend WithEvents txtPsCenter As System.Windows.Forms.TextBox
- Friend WithEvents txtPsMedName As System.Windows.Forms.TextBox
- Friend WithEvents txtBillNumber As System.Windows.Forms.TextBox
- Friend WithEvents txtsum As System.Windows.Forms.TextBox
- Friend WithEvents tbnSh As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnPrint As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnExit As System.Windows.Forms.ToolBarButton
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents lblsh As System.Windows.Forms.Label
- Friend WithEvents txtBhDate As System.Windows.Forms.TextBox
- Friend WithEvents txtDhDate As System.Windows.Forms.TextBox
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents Button2 As System.Windows.Forms.Button
- Friend WithEvents Button1 As System.Windows.Forms.Button
- Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmPsPf))
- Me.StatusBar1 = New System.Windows.Forms.StatusBar
- Me.ToolBar1 = New System.Windows.Forms.ToolBar
- Me.tbnSh = New System.Windows.Forms.ToolBarButton
- Me.tbnPrint = New System.Windows.Forms.ToolBarButton
- Me.tbnExit = New System.Windows.Forms.ToolBarButton
- Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.Button3 = New System.Windows.Forms.Button
- Me.Label2 = New System.Windows.Forms.Label
- Me.ListBox1 = New System.Windows.Forms.ListBox
- Me.票据信息 = New System.Windows.Forms.GroupBox
- Me.txtDhDate = New System.Windows.Forms.TextBox
- Me.txtBhDate = New System.Windows.Forms.TextBox
- Me.lblsh = New System.Windows.Forms.Label
- Me.Label11 = New System.Windows.Forms.Label
- Me.txtsum = New System.Windows.Forms.TextBox
- Me.Label21 = New System.Windows.Forms.Label
- Me.Label8 = New System.Windows.Forms.Label
- Me.Label7 = New System.Windows.Forms.Label
- Me.Label6 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label9 = New System.Windows.Forms.Label
- Me.Label10 = New System.Windows.Forms.Label
- Me.txtShy = New System.Windows.Forms.TextBox
- Me.txtBhy = New System.Windows.Forms.TextBox
- Me.txtBhType = New System.Windows.Forms.TextBox
- Me.txtPsCenter = New System.Windows.Forms.TextBox
- Me.txtPsMedName = New System.Windows.Forms.TextBox
- Me.txtBillNumber = New System.Windows.Forms.TextBox
- Me.Panel1 = New System.Windows.Forms.Panel
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.Button2 = New System.Windows.Forms.Button
- Me.Button1 = New System.Windows.Forms.Button
- Me.ComboBox1 = New System.Windows.Forms.ComboBox
- Me.Label1 = New System.Windows.Forms.Label
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.GroupBox1.SuspendLayout()
- Me.票据信息.SuspendLayout()
- Me.Panel1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'StatusBar1
- '
- Me.StatusBar1.Location = New System.Drawing.Point(0, 428)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(741, 17)
- Me.StatusBar1.TabIndex = 0
- Me.StatusBar1.Text = "StatusBar1"
- '
- 'ToolBar1
- '
- Me.ToolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnSh, Me.tbnPrint, Me.tbnExit})
- Me.ToolBar1.DropDownArrows = True
- Me.ToolBar1.ImageList = Me.ImageList2
- Me.ToolBar1.Location = New System.Drawing.Point(0, 0)
- Me.ToolBar1.Name = "ToolBar1"
- Me.ToolBar1.ShowToolTips = True
- Me.ToolBar1.Size = New System.Drawing.Size(741, 41)
- Me.ToolBar1.TabIndex = 1
- '
- 'tbnSh
- '
- Me.tbnSh.ImageIndex = 2
- Me.tbnSh.Text = "审核"
- '
- 'tbnPrint
- '
- Me.tbnPrint.ImageIndex = 12
- Me.tbnPrint.Text = "打印"
- '
- 'tbnExit
- '
- Me.tbnExit.ImageIndex = 11
- Me.tbnExit.Text = "退出"
- '
- 'ImageList2
- '
- Me.ImageList2.ImageSize = New System.Drawing.Size(16, 16)
- Me.ImageList2.ImageStream = CType(resources.GetObject("ImageList2.ImageStream"), System.Windows.Forms.ImageListStreamer)
- Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.Button3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.ListBox1)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Left
- Me.GroupBox1.Location = New System.Drawing.Point(0, 41)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(222, 387)
- Me.GroupBox1.TabIndex = 2
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "待处理的补货单"
- '
- 'Button3
- '
- Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.Button3.Location = New System.Drawing.Point(66, 12)
- Me.Button3.Name = "Button3"
- Me.Button3.Size = New System.Drawing.Size(56, 19)
- Me.Button3.TabIndex = 2
- Me.Button3.Text = "刷新"
- Me.Button3.TextAlign = System.Drawing.ContentAlignment.TopCenter
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(12, 19)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(60, 17)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "选择票号:"
- '
- 'ListBox1
- '
- Me.ListBox1.ItemHeight = 12
- Me.ListBox1.Location = New System.Drawing.Point(6, 37)
- Me.ListBox1.Name = "ListBox1"
- Me.ListBox1.Size = New System.Drawing.Size(210, 304)
- Me.ListBox1.TabIndex = 0
- '
- '票据信息
- '
- Me.票据信息.Controls.Add(Me.txtDhDate)
- Me.票据信息.Controls.Add(Me.txtBhDate)
- Me.票据信息.Controls.Add(Me.lblsh)
- Me.票据信息.Controls.Add(Me.Label11)
- Me.票据信息.Controls.Add(Me.txtsum)
- Me.票据信息.Controls.Add(Me.Label21)
- Me.票据信息.Controls.Add(Me.Label8)
- Me.票据信息.Controls.Add(Me.Label7)
- Me.票据信息.Controls.Add(Me.Label6)
- Me.票据信息.Controls.Add(Me.Label5)
- Me.票据信息.Controls.Add(Me.Label4)
- Me.票据信息.Controls.Add(Me.Label3)
- Me.票据信息.Controls.Add(Me.Label9)
- Me.票据信息.Controls.Add(Me.Label10)
- Me.票据信息.Controls.Add(Me.txtShy)
- Me.票据信息.Controls.Add(Me.txtBhy)
- Me.票据信息.Controls.Add(Me.txtBhType)
- Me.票据信息.Controls.Add(Me.txtPsCenter)
- Me.票据信息.Controls.Add(Me.txtPsMedName)
- Me.票据信息.Controls.Add(Me.txtBillNumber)
- Me.票据信息.Dock = System.Windows.Forms.DockStyle.Top
- Me.票据信息.Location = New System.Drawing.Point(222, 41)
- Me.票据信息.Name = "票据信息"
- Me.票据信息.Size = New System.Drawing.Size(519, 124)
- Me.票据信息.TabIndex = 4
- Me.票据信息.TabStop = False
- Me.票据信息.Text = "票据信息"
- '
- 'txtDhDate
- '
- Me.txtDhDate.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtDhDate.Location = New System.Drawing.Point(414, 19)
- Me.txtDhDate.Name = "txtDhDate"
- Me.txtDhDate.ReadOnly = True
- Me.txtDhDate.Size = New System.Drawing.Size(84, 14)
- Me.txtDhDate.TabIndex = 41
- Me.txtDhDate.Text = ""
- '
- 'txtBhDate
- '
- Me.txtBhDate.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtBhDate.Location = New System.Drawing.Point(240, 19)
- Me.txtBhDate.Name = "txtBhDate"
- Me.txtBhDate.ReadOnly = True
- Me.txtBhDate.Size = New System.Drawing.Size(102, 14)
- Me.txtBhDate.TabIndex = 40
- Me.txtBhDate.Text = ""
- '
- 'lblsh
- '
- Me.lblsh.AutoSize = True
- Me.lblsh.Location = New System.Drawing.Point(72, 93)
- Me.lblsh.Name = "lblsh"
- Me.lblsh.Size = New System.Drawing.Size(42, 17)
- Me.lblsh.TabIndex = 39
- Me.lblsh.Text = "未审核"
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.ForeColor = System.Drawing.Color.Red
- Me.Label11.Location = New System.Drawing.Point(6, 93)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(60, 17)
- Me.Label11.TabIndex = 38
- Me.Label11.Text = "审核状态:"
- '
- 'txtsum
- '
- Me.txtsum.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtsum.Location = New System.Drawing.Point(414, 68)
- Me.txtsum.Name = "txtsum"
- Me.txtsum.ReadOnly = True
- Me.txtsum.Size = New System.Drawing.Size(84, 14)
- Me.txtsum.TabIndex = 35
- Me.txtsum.Text = ""
- '
- 'Label21
- '
- Me.Label21.AutoSize = True
- Me.Label21.ForeColor = System.Drawing.Color.Red
- Me.Label21.Location = New System.Drawing.Point(348, 68)
- Me.Label21.Name = "Label21"
- Me.Label21.Size = New System.Drawing.Size(60, 17)
- Me.Label21.TabIndex = 34
- Me.Label21.Text = "合计金额:"
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(360, 44)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(54, 17)
- Me.Label8.TabIndex = 33
- Me.Label8.Text = "审核员:"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(174, 68)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(54, 17)
- Me.Label7.TabIndex = 32
- Me.Label7.Text = "补货员:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(174, 44)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(66, 17)
- Me.Label6.TabIndex = 31
- Me.Label6.Text = "补货类型:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(6, 68)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(66, 17)
- Me.Label5.TabIndex = 30
- Me.Label5.Text = "配送中心:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(6, 44)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(66, 17)
- Me.Label4.TabIndex = 29
- Me.Label4.Text = "配送对象:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(348, 19)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(66, 17)
- Me.Label3.TabIndex = 28
- Me.Label3.Text = "到货日期:"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(174, 19)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(66, 17)
- Me.Label9.TabIndex = 27
- Me.Label9.Text = "补货日期:"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(6, 19)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(42, 17)
- Me.Label10.TabIndex = 26
- Me.Label10.Text = "票号:"
- '
- 'txtShy
- '
- Me.txtShy.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtShy.Location = New System.Drawing.Point(414, 44)
- Me.txtShy.Name = "txtShy"
- Me.txtShy.ReadOnly = True
- Me.txtShy.Size = New System.Drawing.Size(84, 14)
- Me.txtShy.TabIndex = 25
- Me.txtShy.Text = ""
- '
- 'txtBhy
- '
- Me.txtBhy.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtBhy.Location = New System.Drawing.Point(240, 68)
- Me.txtBhy.Name = "txtBhy"
- Me.txtBhy.ReadOnly = True
- Me.txtBhy.Size = New System.Drawing.Size(102, 14)
- Me.txtBhy.TabIndex = 24
- Me.txtBhy.Text = ""
- '
- 'txtBhType
- '
- Me.txtBhType.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtBhType.Location = New System.Drawing.Point(240, 44)
- Me.txtBhType.Name = "txtBhType"
- Me.txtBhType.ReadOnly = True
- Me.txtBhType.Size = New System.Drawing.Size(102, 14)
- Me.txtBhType.TabIndex = 23
- Me.txtBhType.Text = ""
- '
- 'txtPsCenter
- '
- Me.txtPsCenter.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtPsCenter.Location = New System.Drawing.Point(72, 68)
- Me.txtPsCenter.Name = "txtPsCenter"
- Me.txtPsCenter.ReadOnly = True
- Me.txtPsCenter.Size = New System.Drawing.Size(90, 14)
- Me.txtPsCenter.TabIndex = 22
- Me.txtPsCenter.Text = ""
- '
- 'txtPsMedName
- '
- Me.txtPsMedName.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtPsMedName.Location = New System.Drawing.Point(72, 44)
- Me.txtPsMedName.Name = "txtPsMedName"
- Me.txtPsMedName.ReadOnly = True
- Me.txtPsMedName.Size = New System.Drawing.Size(90, 14)
- Me.txtPsMedName.TabIndex = 21
- Me.txtPsMedName.Text = ""
- '
- 'txtBillNumber
- '
- Me.txtBillNumber.BorderStyle = System.Windows.Forms.BorderStyle.None
- Me.txtBillNumber.Location = New System.Drawing.Point(48, 19)
- Me.txtBillNumber.Name = "txtBillNumber"
- Me.txtBillNumber.ReadOnly = True
- Me.txtBillNumber.Size = New System.Drawing.Size(114, 14)
- Me.txtBillNumber.TabIndex = 20
- Me.txtBillNumber.Text = ""
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.GroupBox2)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel1.Location = New System.Drawing.Point(222, 165)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(519, 263)
- Me.Panel1.TabIndex = 5
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.Button2)
- Me.GroupBox2.Controls.Add(Me.Button1)
- Me.GroupBox2.Controls.Add(Me.ComboBox1)
- Me.GroupBox2.Controls.Add(Me.Label1)
- Me.GroupBox2.Controls.Add(Me.dgview)
- Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill
- Me.GroupBox2.Location = New System.Drawing.Point(0, 0)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(519, 263)
- Me.GroupBox2.TabIndex = 4
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "批复补货单"
- '
- 'Button2
- '
- Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.Button2.Location = New System.Drawing.Point(336, 19)
- Me.Button2.Name = "Button2"
- Me.Button2.Size = New System.Drawing.Size(64, 21)
- Me.Button2.TabIndex = 4
- Me.Button2.Text = "发货"
- Me.Button2.TextAlign = System.Drawing.ContentAlignment.TopCenter
- '
- 'Button1
- '
- Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.Button1.Location = New System.Drawing.Point(270, 19)
- Me.Button1.Name = "Button1"
- Me.Button1.Size = New System.Drawing.Size(66, 21)
- Me.Button1.TabIndex = 3
- Me.Button1.Text = "自动批复"
- Me.Button1.TextAlign = System.Drawing.ContentAlignment.TopCenter
- '
- 'ComboBox1
- '
- Me.ComboBox1.Location = New System.Drawing.Point(144, 19)
- Me.ComboBox1.Name = "ComboBox1"
- Me.ComboBox1.Size = New System.Drawing.Size(120, 20)
- Me.ComboBox1.TabIndex = 2
- '
- 'Label1
- '
- Me.Label1.Location = New System.Drawing.Point(12, 19)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(140, 18)
- Me.Label1.TabIndex = 1
- Me.Label1.Text = "库存不足药品分配模式:"
- '
- 'dgview
- '
- Me.dgview.DataMember = ""
- Me.dgview.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgview.Location = New System.Drawing.Point(6, 44)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(492, 199)
- Me.dgview.TabIndex = 0
- '
- 'frmPsPf
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(741, 445)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.票据信息)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.ToolBar1)
- Me.Controls.Add(Me.StatusBar1)
- Me.Name = "frmPsPf"
- Me.Text = "批复补货申请"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.票据信息.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Public dslocals As DataSet
- Public strquery As String
- Private Sub frmPsPf_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- 'dslocals = lsweb.returndataset("select psmedname+billnumber+CAST(money AS char(10)) as 未审批复 from psbhpf where PfBit = '0'", "psbhpf")
- 'If ListBox1.DataSource = "" Then
- 'MessageBox.Show("没有要批复的票据!", "提示:", MessageBoxButtons.OK)
- 'Else
- ' ListBox1.DataSource = dslocals.Tables("psbhpf")
- ' ListBox1.DisplayMember = "未审批复"
- ' ListBox1.ValueMember = "未审批复"
- ' dslocals.Clear()
- ' End If
- 'tbnSh.Enabled = False
-
- End Sub
- Private Sub ListBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedValueChanged
- Dim drlocals As System.Data.SqlClient.SqlDataReader
- ListBox1.DisplayMember = "未审批复"
- ListBox1.ValueMember = "未审批复"
- strquery = Me.ListBox1.SelectedValue
- drlocals = lsweb.returnDataReader("select * from psbhpf where billnumber = '" & strquery.Substring(4, 16) & "'")
- Do While drlocals.Read()
- txtBillNumber.Text = drlocals("billnumber")
- txtBhDate.Text = drlocals("Cdate")
- txtDhDate.Text = drlocals("Ddate")
- txtPsMedName.Text = drlocals("PsMedName")
- 'txtBhType.Text = drlocals("billnumber")
- txtShy.Text = drlocals("Shy")
- txtPsCenter.Text = drlocals("PsCenter")
- txtBhy.Text = drlocals("Bhy")
- txtsum.Text = drlocals("money")
- Loop
- dslocals = lsweb.returndataset("select billnumber as 票号,medNumber as 药品编号,medname as 药品名称,medrule as 药品规格,unit as 单位,lcount as 申请数量,pfcount as 批复数量,pfbit as 审核,price as 单价,money as 金额,batch as 批号,avaid as 有效期,package as 包装,demo as 备注 from psbhpfmx where billnumber = '" & strquery.Substring(4, 16) & "' and pfbit='0'", "psbhpfmx")
- dgview.DataSource = dslocals.Tables(0).DefaultView
- 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 "审核"
- If lsweb.updatedataset("select billnumber as 票号,medNumber as 药品编号,medname as 药品名称,medrule as 药品规格,unit as 单位,lcount as 申请数量,pfcount as 批复数量,pfbit as 审核,price as 单价,money as 金额,batch as 批号,avaid as 有效期,package as 包装,demo as 备注 from psbhpfmx where billnumber = '" & strquery.Substring(4, 16) & "' and pfbit='0'", "psbhpfmx", dslocals, DataRowState.Modified) = True Then
- lsweb.runSql("update psbhpf set pfbit='1' where billnumber='" & strquery.Substring(4, 16) & "'")
- lblsh.Text = "已审核"
- MessageBox.Show("药品信息成功保存!", "提示", MessageBoxButtons.OK)
- Else
- MessageBox.Show("药品信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
- End If
-
- Case "退出"
- Me.Close()
- End Select
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
- Dim frmpster As New frmPsPst
- strquery = Me.ListBox1.SelectedValue
- frmpster.strSql = strquery
- frmpster.Show()
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- dslocals = lsweb.returndataset("select psmedname+billnumber+CAST(money AS char(10)) as 未审批复 from psbhpf where PfBit = '0'", "psbhpf")
- ' If ListBox1.DataSource Is String.Empty Then
- ' tbnSh.Enabled = False
- ' End If
- ListBox1.DataSource = dslocals.Tables("psbhpf")
- ListBox1.DisplayMember = "未审批复"
- ListBox1.ValueMember = "未审批复"
- dslocals.Clear()
-
- End Sub
- Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Dim frmpster As New frmPsPst
- strquery = Me.ListBox1.SelectedValue
- frmpster.strSql = strquery
- frmpster.Show()
- End Sub
- Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
- End Sub
- End Class