frmMdcf.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:37k
- Public Class frmMdcf
- 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 GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label16 As System.Windows.Forms.Label
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents txtProduct As System.Windows.Forms.TextBox
- Friend WithEvents txtAvaid As System.Windows.Forms.TextBox
- Friend WithEvents txtBatch As System.Windows.Forms.TextBox
- Friend WithEvents txtMoney As System.Windows.Forms.TextBox
- Friend WithEvents txtPrice As System.Windows.Forms.TextBox
- Friend WithEvents txtCount As System.Windows.Forms.TextBox
- Friend WithEvents txtMedRule As System.Windows.Forms.TextBox
- Friend WithEvents txtmedName As System.Windows.Forms.TextBox
- Friend WithEvents txtMedNumber As System.Windows.Forms.TextBox
- Friend WithEvents Label19 As System.Windows.Forms.Label
- Friend WithEvents Label18 As System.Windows.Forms.Label
- Friend WithEvents Label17 As System.Windows.Forms.Label
- Friend WithEvents Label15 As System.Windows.Forms.Label
- Friend WithEvents Label14 As System.Windows.Forms.Label
- Friend WithEvents Label13 As System.Windows.Forms.Label
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtdemo As System.Windows.Forms.TextBox
- Friend WithEvents txtdoctor As System.Windows.Forms.TextBox
- Friend WithEvents txtbillnumber As System.Windows.Forms.TextBox
- Friend WithEvents txtdate As System.Windows.Forms.DateTimePicker
- Friend WithEvents txtshy As System.Windows.Forms.ComboBox
- Friend WithEvents tbnAdd As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnsave As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnPrint As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnExit As System.Windows.Forms.ToolBarButton
- Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
- Friend WithEvents txtunit As System.Windows.Forms.TextBox
- Friend WithEvents txtpackage As System.Windows.Forms.TextBox
- Friend WithEvents txtno As System.Windows.Forms.TextBox
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents tbncf As System.Windows.Forms.ToolBar
- Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents txthw As System.Windows.Forms.TextBox
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMdcf))
- Me.StatusBar1 = New System.Windows.Forms.StatusBar
- Me.tbncf = New System.Windows.Forms.ToolBar
- Me.tbnAdd = New System.Windows.Forms.ToolBarButton
- Me.tbnsave = 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.txthw = New System.Windows.Forms.TextBox
- Me.Label8 = New System.Windows.Forms.Label
- Me.txtshy = New System.Windows.Forms.ComboBox
- Me.txtdate = New System.Windows.Forms.DateTimePicker
- Me.txtName = New System.Windows.Forms.TextBox
- Me.txtdemo = New System.Windows.Forms.TextBox
- Me.txtdoctor = New System.Windows.Forms.TextBox
- Me.txtbillnumber = New System.Windows.Forms.TextBox
- 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.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.txtno = New System.Windows.Forms.TextBox
- Me.txtpackage = New System.Windows.Forms.TextBox
- Me.txtunit = New System.Windows.Forms.TextBox
- Me.Label7 = New System.Windows.Forms.Label
- Me.Label16 = New System.Windows.Forms.Label
- Me.Label12 = New System.Windows.Forms.Label
- Me.txtProduct = New System.Windows.Forms.TextBox
- Me.txtAvaid = New System.Windows.Forms.TextBox
- Me.txtBatch = New System.Windows.Forms.TextBox
- Me.txtMoney = New System.Windows.Forms.TextBox
- Me.txtPrice = New System.Windows.Forms.TextBox
- Me.txtCount = New System.Windows.Forms.TextBox
- Me.txtMedRule = New System.Windows.Forms.TextBox
- Me.txtmedName = New System.Windows.Forms.TextBox
- Me.txtMedNumber = New System.Windows.Forms.TextBox
- Me.Label19 = New System.Windows.Forms.Label
- Me.Label18 = New System.Windows.Forms.Label
- Me.Label17 = New System.Windows.Forms.Label
- Me.Label15 = New System.Windows.Forms.Label
- Me.Label14 = New System.Windows.Forms.Label
- Me.Label13 = New System.Windows.Forms.Label
- Me.Label11 = New System.Windows.Forms.Label
- Me.Label10 = New System.Windows.Forms.Label
- Me.Label9 = New System.Windows.Forms.Label
- Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
- Me.Panel1 = New System.Windows.Forms.Panel
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.Panel1.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'StatusBar1
- '
- Me.StatusBar1.Location = New System.Drawing.Point(0, 574)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(718, 22)
- Me.StatusBar1.TabIndex = 0
- Me.StatusBar1.Text = "StatusBar1"
- '
- 'tbncf
- '
- Me.tbncf.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.tbncf.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnAdd, Me.tbnsave, Me.tbnPrint, Me.tbnExit})
- Me.tbncf.DropDownArrows = True
- Me.tbncf.ImageList = Me.ImageList2
- Me.tbncf.Location = New System.Drawing.Point(0, 0)
- Me.tbncf.Name = "tbncf"
- Me.tbncf.ShowToolTips = True
- Me.tbncf.Size = New System.Drawing.Size(718, 44)
- Me.tbncf.TabIndex = 1
- '
- 'tbnAdd
- '
- Me.tbnAdd.ImageIndex = 7
- Me.tbnAdd.Text = "添加"
- '
- 'tbnsave
- '
- Me.tbnsave.ImageIndex = 4
- Me.tbnsave.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.txthw)
- Me.GroupBox1.Controls.Add(Me.Label8)
- Me.GroupBox1.Controls.Add(Me.txtshy)
- Me.GroupBox1.Controls.Add(Me.txtdate)
- Me.GroupBox1.Controls.Add(Me.txtName)
- Me.GroupBox1.Controls.Add(Me.txtdemo)
- Me.GroupBox1.Controls.Add(Me.txtdoctor)
- Me.GroupBox1.Controls.Add(Me.txtbillnumber)
- Me.GroupBox1.Controls.Add(Me.Label6)
- Me.GroupBox1.Controls.Add(Me.Label5)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox1.Location = New System.Drawing.Point(0, 44)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(718, 149)
- Me.GroupBox1.TabIndex = 2
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "处方信息"
- '
- 'txthw
- '
- Me.txthw.Location = New System.Drawing.Point(312, 64)
- Me.txthw.Name = "txthw"
- Me.txthw.ReadOnly = True
- Me.txthw.Size = New System.Drawing.Size(128, 25)
- Me.txthw.TabIndex = 13
- Me.txthw.Text = ""
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(272, 72)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(44, 21)
- Me.Label8.TabIndex = 12
- Me.Label8.Text = "货位:"
- '
- 'txtshy
- '
- Me.txtshy.Location = New System.Drawing.Point(520, 62)
- Me.txtshy.Name = "txtshy"
- Me.txtshy.Size = New System.Drawing.Size(136, 23)
- Me.txtshy.TabIndex = 11
- '
- 'txtdate
- '
- Me.txtdate.Location = New System.Drawing.Point(520, 24)
- Me.txtdate.Name = "txtdate"
- Me.txtdate.Size = New System.Drawing.Size(136, 25)
- Me.txtdate.TabIndex = 10
- Me.txtdate.Value = New Date(2006, 4, 5, 0, 0, 0, 0)
- '
- 'txtName
- '
- Me.txtName.Location = New System.Drawing.Point(312, 24)
- Me.txtName.Name = "txtName"
- Me.txtName.Size = New System.Drawing.Size(160, 25)
- Me.txtName.TabIndex = 9
- Me.txtName.Text = ""
- '
- 'txtdemo
- '
- Me.txtdemo.Location = New System.Drawing.Point(88, 104)
- Me.txtdemo.Name = "txtdemo"
- Me.txtdemo.Size = New System.Drawing.Size(568, 25)
- Me.txtdemo.TabIndex = 8
- Me.txtdemo.Text = ""
- '
- 'txtdoctor
- '
- Me.txtdoctor.Location = New System.Drawing.Point(88, 62)
- Me.txtdoctor.Name = "txtdoctor"
- Me.txtdoctor.Size = New System.Drawing.Size(144, 25)
- Me.txtdoctor.TabIndex = 7
- Me.txtdoctor.Text = ""
- '
- 'txtbillnumber
- '
- Me.txtbillnumber.Location = New System.Drawing.Point(88, 24)
- Me.txtbillnumber.Name = "txtbillnumber"
- Me.txtbillnumber.ReadOnly = True
- Me.txtbillnumber.Size = New System.Drawing.Size(144, 25)
- Me.txtbillnumber.TabIndex = 6
- Me.txtbillnumber.Text = ""
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(464, 72)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(60, 21)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "审核员:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(480, 31)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(44, 21)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "日期:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(8, 113)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(83, 21)
- Me.Label4.TabIndex = 3
- Me.Label4.Text = "备注/功用:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(240, 32)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(75, 21)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "处方名称:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(32, 72)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(60, 21)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "药剂师:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(16, 31)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(75, 21)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "处方编号:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.txtno)
- Me.GroupBox2.Controls.Add(Me.txtpackage)
- Me.GroupBox2.Controls.Add(Me.txtunit)
- Me.GroupBox2.Controls.Add(Me.Label7)
- Me.GroupBox2.Controls.Add(Me.Label16)
- Me.GroupBox2.Controls.Add(Me.Label12)
- Me.GroupBox2.Controls.Add(Me.txtProduct)
- Me.GroupBox2.Controls.Add(Me.txtAvaid)
- Me.GroupBox2.Controls.Add(Me.txtBatch)
- Me.GroupBox2.Controls.Add(Me.txtMoney)
- Me.GroupBox2.Controls.Add(Me.txtPrice)
- Me.GroupBox2.Controls.Add(Me.txtCount)
- Me.GroupBox2.Controls.Add(Me.txtMedRule)
- Me.GroupBox2.Controls.Add(Me.txtmedName)
- Me.GroupBox2.Controls.Add(Me.txtMedNumber)
- Me.GroupBox2.Controls.Add(Me.Label19)
- Me.GroupBox2.Controls.Add(Me.Label18)
- Me.GroupBox2.Controls.Add(Me.Label17)
- Me.GroupBox2.Controls.Add(Me.Label15)
- Me.GroupBox2.Controls.Add(Me.Label14)
- Me.GroupBox2.Controls.Add(Me.Label13)
- Me.GroupBox2.Controls.Add(Me.Label11)
- Me.GroupBox2.Controls.Add(Me.Label10)
- Me.GroupBox2.Controls.Add(Me.Label9)
- Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox2.Location = New System.Drawing.Point(0, 193)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(718, 144)
- Me.GroupBox2.TabIndex = 3
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "药品信息"
- '
- 'txtno
- '
- Me.txtno.Location = New System.Drawing.Point(96, 62)
- Me.txtno.Name = "txtno"
- Me.txtno.ReadOnly = True
- Me.txtno.Size = New System.Drawing.Size(32, 25)
- Me.txtno.TabIndex = 118
- Me.txtno.Text = ""
- '
- 'txtpackage
- '
- Me.txtpackage.Location = New System.Drawing.Point(616, 103)
- Me.txtpackage.Name = "txtpackage"
- Me.txtpackage.ReadOnly = True
- Me.txtpackage.Size = New System.Drawing.Size(88, 25)
- Me.txtpackage.TabIndex = 117
- Me.txtpackage.Text = ""
- '
- 'txtunit
- '
- Me.txtunit.Location = New System.Drawing.Point(616, 64)
- Me.txtunit.Name = "txtunit"
- Me.txtunit.ReadOnly = True
- Me.txtunit.Size = New System.Drawing.Size(88, 25)
- Me.txtunit.TabIndex = 116
- Me.txtunit.Text = ""
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(53, 72)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(52, 21)
- Me.Label7.TabIndex = 115
- Me.Label7.Text = "序号:"
- '
- 'Label16
- '
- Me.Label16.AutoSize = True
- Me.Label16.Location = New System.Drawing.Point(576, 113)
- Me.Label16.Name = "Label16"
- Me.Label16.Size = New System.Drawing.Size(52, 21)
- Me.Label16.TabIndex = 113
- Me.Label16.Text = "包装:"
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(576, 72)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(52, 21)
- Me.Label12.TabIndex = 112
- Me.Label12.Text = "单位:"
- '
- 'txtProduct
- '
- Me.txtProduct.Location = New System.Drawing.Point(312, 103)
- Me.txtProduct.Name = "txtProduct"
- Me.txtProduct.ReadOnly = True
- Me.txtProduct.Size = New System.Drawing.Size(96, 25)
- Me.txtProduct.TabIndex = 111
- Me.txtProduct.Text = ""
- '
- 'txtAvaid
- '
- Me.txtAvaid.Location = New System.Drawing.Point(472, 104)
- Me.txtAvaid.Name = "txtAvaid"
- Me.txtAvaid.ReadOnly = True
- Me.txtAvaid.Size = New System.Drawing.Size(88, 25)
- Me.txtAvaid.TabIndex = 110
- Me.txtAvaid.Text = ""
- '
- 'txtBatch
- '
- Me.txtBatch.Location = New System.Drawing.Point(96, 103)
- Me.txtBatch.Name = "txtBatch"
- Me.txtBatch.ReadOnly = True
- Me.txtBatch.Size = New System.Drawing.Size(128, 25)
- Me.txtBatch.TabIndex = 109
- Me.txtBatch.Text = ""
- '
- 'txtMoney
- '
- Me.txtMoney.Location = New System.Drawing.Point(472, 64)
- Me.txtMoney.Name = "txtMoney"
- Me.txtMoney.ReadOnly = True
- Me.txtMoney.Size = New System.Drawing.Size(88, 25)
- Me.txtMoney.TabIndex = 107
- Me.txtMoney.Text = "0.00"
- '
- 'txtPrice
- '
- Me.txtPrice.Location = New System.Drawing.Point(312, 64)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(96, 25)
- Me.txtPrice.TabIndex = 106
- Me.txtPrice.Text = "0.00"
- '
- 'txtCount
- '
- Me.txtCount.Location = New System.Drawing.Point(176, 64)
- Me.txtCount.Name = "txtCount"
- Me.txtCount.Size = New System.Drawing.Size(48, 25)
- Me.txtCount.TabIndex = 105
- Me.txtCount.Text = ""
- '
- 'txtMedRule
- '
- Me.txtMedRule.Location = New System.Drawing.Point(568, 24)
- Me.txtMedRule.Name = "txtMedRule"
- Me.txtMedRule.ReadOnly = True
- Me.txtMedRule.Size = New System.Drawing.Size(136, 25)
- Me.txtMedRule.TabIndex = 103
- Me.txtMedRule.Text = ""
- '
- 'txtmedName
- '
- Me.txtmedName.Location = New System.Drawing.Point(312, 24)
- Me.txtmedName.Name = "txtmedName"
- Me.txtmedName.ReadOnly = True
- Me.txtmedName.Size = New System.Drawing.Size(168, 25)
- Me.txtmedName.TabIndex = 102
- Me.txtmedName.Text = ""
- '
- 'txtMedNumber
- '
- Me.txtMedNumber.Location = New System.Drawing.Point(96, 21)
- Me.txtMedNumber.Name = "txtMedNumber"
- Me.txtMedNumber.Size = New System.Drawing.Size(128, 25)
- Me.txtMedNumber.TabIndex = 101
- Me.txtMedNumber.Text = ""
- '
- 'Label19
- '
- Me.Label19.AutoSize = True
- Me.Label19.Location = New System.Drawing.Point(272, 112)
- Me.Label19.Name = "Label19"
- Me.Label19.Size = New System.Drawing.Size(52, 21)
- Me.Label19.TabIndex = 100
- Me.Label19.Text = "产地:"
- '
- 'Label18
- '
- Me.Label18.AutoSize = True
- Me.Label18.Location = New System.Drawing.Point(416, 113)
- Me.Label18.Name = "Label18"
- Me.Label18.Size = New System.Drawing.Size(67, 21)
- Me.Label18.TabIndex = 99
- Me.Label18.Text = "有效期:"
- '
- 'Label17
- '
- Me.Label17.AutoSize = True
- Me.Label17.Location = New System.Drawing.Point(53, 113)
- Me.Label17.Name = "Label17"
- Me.Label17.Size = New System.Drawing.Size(52, 21)
- Me.Label17.TabIndex = 98
- Me.Label17.Text = "批号:"
- '
- 'Label15
- '
- Me.Label15.AutoSize = True
- Me.Label15.ForeColor = System.Drawing.Color.Red
- Me.Label15.Location = New System.Drawing.Point(432, 72)
- Me.Label15.Name = "Label15"
- Me.Label15.Size = New System.Drawing.Size(52, 21)
- Me.Label15.TabIndex = 97
- Me.Label15.Text = "金额:"
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(272, 72)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(52, 21)
- Me.Label14.TabIndex = 96
- Me.Label14.Text = "单价:"
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(136, 72)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(52, 21)
- Me.Label13.TabIndex = 95
- Me.Label13.Text = "数量:"
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(496, 32)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(83, 21)
- Me.Label11.TabIndex = 94
- Me.Label11.Text = "药品规格:"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(240, 31)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(83, 21)
- Me.Label10.TabIndex = 93
- Me.Label10.Text = "药品名称:"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(21, 31)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(83, 21)
- Me.Label9.TabIndex = 92
- Me.Label9.Text = "药品编号:"
- '
- 'ErrorProvider1
- '
- Me.ErrorProvider1.ContainerControl = Me
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.dgview)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel1.Location = New System.Drawing.Point(0, 337)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(718, 237)
- Me.Panel1.TabIndex = 4
- '
- '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(0, 0)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(718, 237)
- Me.dgview.TabIndex = 5
- '
- 'frmMdcf
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(718, 596)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.tbncf)
- Me.Controls.Add(Me.StatusBar1)
- Me.Name = "frmMdcf"
- Me.Text = "零售处方管理"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public bool As Boolean
- Public lsweb As New jxcmanage
- Public dslocals As DataSet = lsweb.returndataset("select Number as 序号,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Lcount as 数量,Price 单价,Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期,Package as 包装,CDate as 日期,Yjs as 药剂师,BillNumber as 票号,CfName as 处方名称,Shy as 审核员,Demo as 货位 from mdcf", "mdcf")
-
- Private Sub txtName_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtName.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtdoctor.Focus()
- End If
- End Sub
-
- Private Sub txtdoctor_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtdoctor.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtshy.Focus()
- End If
- End Sub
-
- Private Sub txtshy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtshy.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtdemo.Focus()
- End If
- End Sub
-
- Private Sub txtdemo_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtdemo.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtMedNumber.Focus()
- End If
- End Sub
- Public Function getinfo(ByVal strqueryid As String) As String
- Dim strOrderId As String
- strOrderId = strqueryid
- Return strOrderId
- End Function
- Private Sub CalMxMoney()
- Dim price As Double = CType(txtPrice.Text.Trim, Double)
- Dim count As Int16 = CInt(txtCount.Text.Trim)
- Me.txtMoney.Text = (price * count).ToString
- End Sub
- Private Sub txtMedNumber_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMedNumber.KeyDown
- If e.KeyCode = Keys.Enter Then
- Dim dlg As frmMedKcQuery = New frmMedKcQuery
- dlg.PYMs = Me.getinfo(txtMedNumber.Text)
- If dlg.PYMs = "" Then
- ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!")
- Else
- dlg.ShowDialog()
- ErrorProvider1.SetError(txtMedNumber, "")
- End If
- Dim medIdvalue, medbatch, product, avaid, hw, package As String
- medIdvalue = dlg.GetInfo("药品编号")
- medbatch = dlg.GetInfo("批号")
- product = dlg.GetInfo("产地")
- avaid = dlg.GetInfo("有效期")
- hw = dlg.GetInfo("货位")
- package = dlg.GetInfo("包装")
- If medIdvalue Is Nothing Then
- ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!或没有查到记录,请重新开始!")
- Else
- Dim runSqlQuery As String
- runSqlQuery = "select * from wz_kc where 药品编号='" & medIdvalue & "' and 批号 ='" & medbatch & "' and 产地='" & product & "' and 有效期='" & avaid & "' and 货位='" & hw & "' and 包装='" & package & "'"
- Dim dv As DataView
- ' Dim mOrderId As New managers
- '调用mCustomId对象的SPcustomersID函数
- Dim dtOrder As DataTable = lsweb.runSql(runSqlQuery).Tables(0)
- 'bb为一随意表名
- dtOrder.TableName = "bb"
- dv = dtOrder.DefaultView
- txtMedNumber.Text = dv(0)("药品编号")
- txtmedName.Text = dv(0)("药品名称")
- txtMedRule.Text = dv(0)("药品规格")
- txtUnit.Text = dv(0)("单位")
- txtPrice.Text = dv(0)("进价")
- txtCount.Text = dv(0)("数量")
- txtAvaid.Text = dv(0)("有效期")
- txtPackage.Text = dv(0)("包装")
- txtProduct.Text = dv(0)("产地")
- txtBatch.Text = dv(0)("批号")
- txthw.Text = dv(0)("货位")
- ErrorProvider1.SetError(txtMedNumber, "")
- End If
- txtCount.Focus()
- End If
- End Sub
- Private Sub save()
- If lsweb.updatedataset("select Number as 序号,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Lcount as 数量,Price 单价,Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期,Package as 包装,CDate as 日期,Yjs as 药剂师,BillNumber as 票号,CfName as 处方名称,Shy as 审核员,Demo as 货位 from mdcf", "mdcf", dslocals, DataRowState.Added) = True Then
- MessageBox.Show("销售信息成功保存!", "提示", MessageBoxButtons.OK)
- Else
- MessageBox.Show("销售信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
- End If
- End Sub
-
- Private Sub txtCount_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtCount.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtPrice.Focus()
- CalMxMoney()
- End If
- End Sub
- Private Sub frmMdcf_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- dslocals.Clear()
- dgview.DataSource = dslocals.Tables("Mdcf").DefaultView
- txtdate.Value = Today().ToString()
- Dim hwdr As System.Data.SqlClient.SqlDataReader
- hwdr = lsweb.returnDataReader("select 操作员 from wz_mm")
- Do While hwdr.Read()
- txtshy.Items.Add(hwdr("操作员"))
- Loop
- txtdate.Value = Today.ToString
- End Sub
- Public Sub tbnEnable(ByVal strboolean As String, ByVal tbr As ToolBar)
- If strboolean = "tbnAdd.Enabled = True" Then
- tbnSave.Enabled = False
- tbnPrint.Enabled = False
- tbnExit.Enabled = True
- ElseIf strboolean = "tbnAdd.Enabled = False" Then
- tbnAdd.Enabled = False
- tbnSave.Enabled = True
- tbnPrint.Enabled = True
- tbnExit.Enabled = True
- ElseIf strboolean = "tbnSave.Enabled = True" Then
- tbnAdd.Enabled = False
- tbnPrint.Enabled = True
- tbnExit.Enabled = True
- ElseIf strboolean = "tbnSave.Enabled = False" Then
- tbnSave.Enabled = False
- tbnAdd.Enabled = True
- tbnPrint.Enabled = True
- tbnExit.Enabled = True
- End If
- End Sub
- Private Sub txtName_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtName.Validating
- If txtName.Text = String.Empty Then
- ErrorProvider1.SetError(txtName, "不能为空。")
- txtName.Focus()
- Else
- ErrorProvider1.SetError(txtName, "")
- End If
- End Sub
- Private Sub txtdoctor_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtdoctor.Validating
- If txtdoctor.Text = String.Empty Then
- ErrorProvider1.SetError(txtdoctor, "不能为空。")
- txtdoctor.Focus()
- Else
- ErrorProvider1.SetError(txtdoctor, "")
- End If
- End Sub
- Private Sub txtshy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtshy.Validating
- If txtshy.Text = String.Empty Then
- ErrorProvider1.SetError(txtshy, "不能为空。")
- txtshy.Focus()
- Else
- ErrorProvider1.SetError(txtshy, "")
- End If
- End Sub
- Private Sub txtdemo_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtdemo.Validating
- If txtdemo.Text = String.Empty Then
- ErrorProvider1.SetError(txtdemo, "不能为空。")
- txtdemo.Focus()
- Else
- ErrorProvider1.SetError(txtdemo, "")
- End If
- End Sub
- Private Sub txtCount_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtCount.Validating
- If txtCount.Text = String.Empty Then
- ErrorProvider1.SetError(txtCount, "不是数值类型且不能为空。")
- txtCount.Focus()
- Else
- ErrorProvider1.SetError(txtCount, "")
- End If
- End Sub
- Private Sub txtPrice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPrice.Validating
- If Not IsNumeric(txtPrice.Text) Or txtPrice.Text = String.Empty Then
- ErrorProvider1.SetError(txtPrice, "不是数值类型且不能为空。")
- txtPrice.Focus()
- Else
- ErrorProvider1.SetError(txtPrice, "")
- End If
- End Sub
- Public Sub add()
- dslocals.Clear()
- txtName.Focus()
- txtName.Text() = ""
- txtbillnumber.Text = lsweb.selectbill("CF").ToString
- txtno.Text = 1
- txtdate.Value = Today().ToString()
-
- txtdoctor.Text = ""
- txtdemo.Text = ""
- txtMedNumber.Text = ""
- txtmedName.Text() = ""
- txtMedRule.Text() = ""
- txtunit.Text() = ""
- txtPrice.Text() = 0.0
- txtCount.Text() = 0
- txtMoney.Text() = 0.0
- txtpackage.Text() = ""
- txtBatch.Text() = ""
- txtAvaid.Text() = ""
- txtProduct.Text() = ""
- End Sub
- Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbncf.ButtonClick
- Select Case e.Button.Text
- Case "添加"
- add()
- tbnEnable("tbnAdd.Enabled = False", tbncf)
- Case "保存"
- If txtbillnumber.Text = String.Empty Then
- MessageBox.Show("请点击添加按钮!", "提示:", MessageBoxButtons.OK)
- Else
- save()
- tbnEnable("tbnSave.Enabled = False", tbncf)
- End If
- Case "退出"
- Me.Close()
- End Select
- End Sub
- Private Sub clear()
- txtMedNumber.Text = ""
- txtmedName.Text = ""
- txtMedRule.Text = ""
- txtunit.Text = ""
- txtPrice.Text = 0.0
- txtCount.Text = 0
- txtMoney.Text = 0.0
- txtAvaid.Text = ""
- txtpackage.Text = ""
- txtProduct.Text = ""
- txtBatch.Text = ""
- End Sub
- Private Sub txtPrice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPrice.KeyDown
- If e.KeyCode = Keys.Enter Then
- If txtPrice.Text = String.Empty Then
- txtPrice_Validating(Nothing, Nothing)
- Else
- Static i As Int16
- If dslocals.Tables("mdcf").Rows.Count < 1 Then
- i = 1
- Else
- i = i + 1
- End If
- txtno.Text = CStr(i)
- Dim dr As DataRow = dslocals.Tables("mdcf").NewRow()
- dr("序号") = CStr(i)
- dr("药品编号") = Me.txtMedNumber.Text.Trim
- dr("药品名称") = Me.txtmedName.Text.Trim
- dr("药品规格") = Me.txtMedRule.Text.Trim
- dr("单位") = Me.txtunit.Text.Trim
- dr("数量") = Me.txtCount.Text.Trim
- dr("单价") = CDec(Me.txtPrice.Text.Trim)
- dr("金额") = CDec(Me.txtPrice.Text.Trim) * CInt(Me.txtCount.Text.Trim)
- dr("批号") = Me.txtBatch.Text.Trim
- dr("有效期") = Me.txtAvaid.Text.Trim
- dr("产地") = Me.txtProduct.Text.Trim
- dr("货位") = Me.txthw.Text.Trim
- dr("包装") = Me.txtpackage.Text.Trim
- dr("票号") = Me.txtbillnumber.Text.Trim
- dr("货位") = Me.txthw.Text.Trim
- dr("日期") = Me.txtdate.Value
- dr("药剂师") = Me.txtdoctor.Text.Trim
- dr("审核员") = Me.txtshy.Text.Trim
- dr("处方名称") = Me.txtName.Text.Trim
- dslocals.Tables("mdcf").Rows.Add(dr)
- txtMedNumber.Text = ""
- txtMedNumber.Focus()
- 'CalTotalMoney()
- clear()
- End If
- End If
- dgview.DataSource = dslocals.Tables("mdcf").DefaultView
- End Sub
- Private Sub frmMdcf_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
- If txtbillnumber.Text <> String.Empty And tbnsave.Enabled = True Then
- lsweb.cancelbill(txtbillnumber.Text.Trim)
- End If
- End Sub
- Private Sub txtMedNumber_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMedNumber.TextChanged
- End Sub
- Private Sub txtPrice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPrice.TextChanged
- End Sub
- End Class