frmKcth.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:34k
- Public Class frmKcth
- 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 Label1 As System.Windows.Forms.Label
- Friend WithEvents txtdate As System.Windows.Forms.DateTimePicker
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents txtdc As System.Windows.Forms.ComboBox
- Friend WithEvents txtdr As System.Windows.Forms.ComboBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents txtBillnumber As System.Windows.Forms.TextBox
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents Label13 As System.Windows.Forms.Label
- Friend WithEvents Label14 As System.Windows.Forms.Label
- Friend WithEvents Label15 As System.Windows.Forms.Label
- Friend WithEvents Label16 As System.Windows.Forms.Label
- Friend WithEvents Label17 As System.Windows.Forms.Label
- Friend WithEvents Label18 As System.Windows.Forms.Label
- Friend WithEvents Label19 As System.Windows.Forms.Label
- Friend WithEvents Label20 As System.Windows.Forms.Label
- Friend WithEvents txtmednumber As System.Windows.Forms.TextBox
- Friend WithEvents txtmedName As System.Windows.Forms.TextBox
- Friend WithEvents txtmedrule As System.Windows.Forms.TextBox
- Friend WithEvents txtcount As System.Windows.Forms.TextBox
- Friend WithEvents txtjj As System.Windows.Forms.TextBox
- Friend WithEvents txtmoney As System.Windows.Forms.TextBox
- Friend WithEvents txtlprice As System.Windows.Forms.TextBox
- Friend WithEvents txtpackage As System.Windows.Forms.TextBox
- Friend WithEvents txtaddress As System.Windows.Forms.TextBox
- Friend WithEvents txtbatch As System.Windows.Forms.TextBox
- Friend WithEvents txtavaid As System.Windows.Forms.TextBox
- Friend WithEvents txthy As System.Windows.Forms.TextBox
- Friend WithEvents txtzy As System.Windows.Forms.TextBox
- Friend WithEvents txtjsr As System.Windows.Forms.TextBox
- Friend WithEvents txtno As System.Windows.Forms.TextBox
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- 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 txtunit As System.Windows.Forms.TextBox
- Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
- Friend WithEvents tbnDh As System.Windows.Forms.ToolBar
- Friend WithEvents tbnAdd As System.Windows.Forms.ToolBarButton
- 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(frmKcth))
- Me.tbnDh = 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.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtno = New System.Windows.Forms.TextBox
- Me.txtjsr = New System.Windows.Forms.TextBox
- Me.txtzy = New System.Windows.Forms.TextBox
- Me.txthy = New System.Windows.Forms.TextBox
- Me.txtavaid = New System.Windows.Forms.TextBox
- Me.Label20 = New System.Windows.Forms.Label
- Me.txtbatch = New System.Windows.Forms.TextBox
- Me.txtaddress = New System.Windows.Forms.TextBox
- Me.txtpackage = 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.Label16 = 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.txtlprice = New System.Windows.Forms.TextBox
- Me.Label12 = New System.Windows.Forms.Label
- Me.txtmoney = New System.Windows.Forms.TextBox
- Me.Label11 = New System.Windows.Forms.Label
- Me.txtjj = New System.Windows.Forms.TextBox
- Me.Label10 = New System.Windows.Forms.Label
- Me.txtcount = New System.Windows.Forms.TextBox
- Me.Label9 = New System.Windows.Forms.Label
- Me.txtunit = New System.Windows.Forms.TextBox
- Me.Label8 = New System.Windows.Forms.Label
- Me.txtmedrule = New System.Windows.Forms.TextBox
- Me.Label7 = New System.Windows.Forms.Label
- Me.txtmedName = New System.Windows.Forms.TextBox
- Me.Label6 = New System.Windows.Forms.Label
- Me.txtmednumber = New System.Windows.Forms.TextBox
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtBillnumber = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.txtdr = New System.Windows.Forms.ComboBox
- Me.txtdc = New System.Windows.Forms.ComboBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.txtdate = New System.Windows.Forms.DateTimePicker
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
- Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
- Me.GroupBox1.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'tbnDh
- '
- Me.tbnDh.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.tbnDh.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnAdd, Me.tbnsave, Me.tbnPrint, Me.tbnExit})
- Me.tbnDh.DropDownArrows = True
- Me.tbnDh.ImageList = Me.ImageList2
- Me.tbnDh.Location = New System.Drawing.Point(0, 0)
- Me.tbnDh.Name = "tbnDh"
- Me.tbnDh.ShowToolTips = True
- Me.tbnDh.Size = New System.Drawing.Size(917, 44)
- Me.tbnDh.TabIndex = 0
- '
- '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 = "退出"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtno)
- Me.GroupBox1.Controls.Add(Me.txtjsr)
- Me.GroupBox1.Controls.Add(Me.txtzy)
- Me.GroupBox1.Controls.Add(Me.txthy)
- Me.GroupBox1.Controls.Add(Me.txtavaid)
- Me.GroupBox1.Controls.Add(Me.Label20)
- Me.GroupBox1.Controls.Add(Me.txtbatch)
- Me.GroupBox1.Controls.Add(Me.txtaddress)
- Me.GroupBox1.Controls.Add(Me.txtpackage)
- Me.GroupBox1.Controls.Add(Me.Label19)
- Me.GroupBox1.Controls.Add(Me.Label18)
- Me.GroupBox1.Controls.Add(Me.Label17)
- Me.GroupBox1.Controls.Add(Me.Label16)
- Me.GroupBox1.Controls.Add(Me.Label15)
- Me.GroupBox1.Controls.Add(Me.Label14)
- Me.GroupBox1.Controls.Add(Me.Label13)
- Me.GroupBox1.Controls.Add(Me.txtlprice)
- Me.GroupBox1.Controls.Add(Me.Label12)
- Me.GroupBox1.Controls.Add(Me.txtmoney)
- Me.GroupBox1.Controls.Add(Me.Label11)
- Me.GroupBox1.Controls.Add(Me.txtjj)
- Me.GroupBox1.Controls.Add(Me.Label10)
- Me.GroupBox1.Controls.Add(Me.txtcount)
- Me.GroupBox1.Controls.Add(Me.Label9)
- Me.GroupBox1.Controls.Add(Me.txtunit)
- Me.GroupBox1.Controls.Add(Me.Label8)
- Me.GroupBox1.Controls.Add(Me.txtmedrule)
- Me.GroupBox1.Controls.Add(Me.Label7)
- Me.GroupBox1.Controls.Add(Me.txtmedName)
- Me.GroupBox1.Controls.Add(Me.Label6)
- Me.GroupBox1.Controls.Add(Me.txtmednumber)
- Me.GroupBox1.Controls.Add(Me.Label5)
- Me.GroupBox1.Controls.Add(Me.txtBillnumber)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.txtdr)
- Me.GroupBox1.Controls.Add(Me.txtdc)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.txtdate)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Controls.Add(Me.GroupBox2)
- 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(917, 231)
- Me.GroupBox1.TabIndex = 1
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "调拨信息"
- '
- 'txtno
- '
- Me.txtno.Location = New System.Drawing.Point(96, 152)
- Me.txtno.Name = "txtno"
- Me.txtno.ReadOnly = True
- Me.txtno.TabIndex = 42
- Me.txtno.Text = ""
- '
- 'txtjsr
- '
- Me.txtjsr.Location = New System.Drawing.Point(768, 192)
- Me.txtjsr.Name = "txtjsr"
- Me.txtjsr.ReadOnly = True
- Me.txtjsr.Size = New System.Drawing.Size(128, 25)
- Me.txtjsr.TabIndex = 41
- Me.txtjsr.Text = ""
- '
- 'txtzy
- '
- Me.txtzy.Location = New System.Drawing.Point(533, 192)
- Me.txtzy.Name = "txtzy"
- Me.txtzy.ReadOnly = True
- Me.txtzy.Size = New System.Drawing.Size(152, 25)
- Me.txtzy.TabIndex = 40
- Me.txtzy.Text = ""
- '
- 'txthy
- '
- Me.txthy.Location = New System.Drawing.Point(288, 192)
- Me.txthy.Name = "txthy"
- Me.txthy.ReadOnly = True
- Me.txthy.Size = New System.Drawing.Size(144, 25)
- Me.txthy.TabIndex = 39
- Me.txthy.Text = ""
- '
- 'txtavaid
- '
- Me.txtavaid.Location = New System.Drawing.Point(768, 152)
- Me.txtavaid.Name = "txtavaid"
- Me.txtavaid.ReadOnly = True
- Me.txtavaid.Size = New System.Drawing.Size(128, 25)
- Me.txtavaid.TabIndex = 37
- Me.txtavaid.Text = ""
- '
- 'Label20
- '
- Me.Label20.AutoSize = True
- Me.Label20.Location = New System.Drawing.Point(704, 159)
- Me.Label20.Name = "Label20"
- Me.Label20.Size = New System.Drawing.Size(67, 21)
- Me.Label20.TabIndex = 36
- Me.Label20.Text = "有效期:"
- '
- 'txtbatch
- '
- Me.txtbatch.Location = New System.Drawing.Point(533, 152)
- Me.txtbatch.Name = "txtbatch"
- Me.txtbatch.ReadOnly = True
- Me.txtbatch.Size = New System.Drawing.Size(152, 25)
- Me.txtbatch.TabIndex = 35
- Me.txtbatch.Text = ""
- '
- 'txtaddress
- '
- Me.txtaddress.Location = New System.Drawing.Point(288, 152)
- Me.txtaddress.Name = "txtaddress"
- Me.txtaddress.ReadOnly = True
- Me.txtaddress.Size = New System.Drawing.Size(144, 25)
- Me.txtaddress.TabIndex = 34
- Me.txtaddress.Text = ""
- '
- 'txtpackage
- '
- Me.txtpackage.Location = New System.Drawing.Point(96, 192)
- Me.txtpackage.Name = "txtpackage"
- Me.txtpackage.ReadOnly = True
- Me.txtpackage.TabIndex = 33
- Me.txtpackage.Text = ""
- '
- 'Label19
- '
- Me.Label19.AutoSize = True
- Me.Label19.Location = New System.Drawing.Point(480, 201)
- Me.Label19.Name = "Label19"
- Me.Label19.Size = New System.Drawing.Size(52, 21)
- Me.Label19.TabIndex = 32
- Me.Label19.Text = "摘要:"
- '
- 'Label18
- '
- Me.Label18.AutoSize = True
- Me.Label18.Location = New System.Drawing.Point(704, 201)
- Me.Label18.Name = "Label18"
- Me.Label18.Size = New System.Drawing.Size(67, 21)
- Me.Label18.TabIndex = 31
- Me.Label18.Text = "经手人:"
- '
- 'Label17
- '
- Me.Label17.AutoSize = True
- Me.Label17.Location = New System.Drawing.Point(235, 201)
- Me.Label17.Name = "Label17"
- Me.Label17.Size = New System.Drawing.Size(52, 21)
- Me.Label17.TabIndex = 30
- Me.Label17.Text = "货源:"
- '
- 'Label16
- '
- Me.Label16.AutoSize = True
- Me.Label16.Location = New System.Drawing.Point(480, 159)
- Me.Label16.Name = "Label16"
- Me.Label16.Size = New System.Drawing.Size(52, 21)
- Me.Label16.TabIndex = 29
- Me.Label16.Text = "批号:"
- '
- 'Label15
- '
- Me.Label15.AutoSize = True
- Me.Label15.Location = New System.Drawing.Point(235, 159)
- Me.Label15.Name = "Label15"
- Me.Label15.Size = New System.Drawing.Size(52, 21)
- Me.Label15.TabIndex = 28
- Me.Label15.Text = "产地:"
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(43, 201)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(52, 21)
- Me.Label14.TabIndex = 27
- Me.Label14.Text = "包装:"
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(43, 159)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(52, 21)
- Me.Label13.TabIndex = 25
- Me.Label13.Text = "序号:"
- '
- 'txtlprice
- '
- Me.txtlprice.Location = New System.Drawing.Point(768, 112)
- Me.txtlprice.Name = "txtlprice"
- Me.txtlprice.ReadOnly = True
- Me.txtlprice.Size = New System.Drawing.Size(128, 25)
- Me.txtlprice.TabIndex = 24
- Me.txtlprice.Text = ""
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(704, 120)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(67, 21)
- Me.Label12.TabIndex = 23
- Me.Label12.Text = "零售价:"
- '
- 'txtmoney
- '
- Me.txtmoney.Location = New System.Drawing.Point(533, 112)
- Me.txtmoney.Name = "txtmoney"
- Me.txtmoney.ReadOnly = True
- Me.txtmoney.Size = New System.Drawing.Size(152, 25)
- Me.txtmoney.TabIndex = 22
- Me.txtmoney.Text = ""
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(480, 120)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(52, 21)
- Me.Label11.TabIndex = 21
- Me.Label11.Text = "金额:"
- '
- 'txtjj
- '
- Me.txtjj.Location = New System.Drawing.Point(288, 112)
- Me.txtjj.Name = "txtjj"
- Me.txtjj.Size = New System.Drawing.Size(144, 25)
- Me.txtjj.TabIndex = 20
- Me.txtjj.Text = ""
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(235, 120)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(52, 21)
- Me.Label10.TabIndex = 19
- Me.Label10.Text = "进价:"
- '
- 'txtcount
- '
- Me.txtcount.Location = New System.Drawing.Point(96, 112)
- Me.txtcount.Name = "txtcount"
- Me.txtcount.TabIndex = 18
- Me.txtcount.Text = ""
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(43, 120)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(52, 21)
- Me.Label9.TabIndex = 17
- Me.Label9.Text = "数量:"
- '
- 'txtunit
- '
- Me.txtunit.Location = New System.Drawing.Point(768, 72)
- Me.txtunit.Name = "txtunit"
- Me.txtunit.ReadOnly = True
- Me.txtunit.Size = New System.Drawing.Size(128, 25)
- Me.txtunit.TabIndex = 16
- Me.txtunit.Text = ""
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(715, 80)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(52, 21)
- Me.Label8.TabIndex = 15
- Me.Label8.Text = "单位:"
- '
- 'txtmedrule
- '
- Me.txtmedrule.Location = New System.Drawing.Point(533, 72)
- Me.txtmedrule.Name = "txtmedrule"
- Me.txtmedrule.ReadOnly = True
- Me.txtmedrule.Size = New System.Drawing.Size(152, 25)
- Me.txtmedrule.TabIndex = 14
- Me.txtmedrule.Text = ""
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(448, 82)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(83, 21)
- Me.Label7.TabIndex = 13
- Me.Label7.Text = "药品规格:"
- '
- 'txtmedName
- '
- Me.txtmedName.Location = New System.Drawing.Point(288, 72)
- Me.txtmedName.Name = "txtmedName"
- Me.txtmedName.ReadOnly = True
- Me.txtmedName.Size = New System.Drawing.Size(144, 25)
- Me.txtmedName.TabIndex = 12
- Me.txtmedName.Text = ""
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(203, 80)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(83, 21)
- Me.Label6.TabIndex = 11
- Me.Label6.Text = "药品名称:"
- '
- 'txtmednumber
- '
- Me.txtmednumber.Location = New System.Drawing.Point(96, 72)
- Me.txtmednumber.Name = "txtmednumber"
- Me.txtmednumber.TabIndex = 10
- Me.txtmednumber.Text = ""
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(11, 80)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(83, 21)
- Me.Label5.TabIndex = 9
- Me.Label5.Text = "药品编号:"
- '
- 'txtBillnumber
- '
- Me.txtBillnumber.Location = New System.Drawing.Point(704, 24)
- Me.txtBillnumber.Name = "txtBillnumber"
- Me.txtBillnumber.ReadOnly = True
- Me.txtBillnumber.Size = New System.Drawing.Size(192, 25)
- Me.txtBillnumber.TabIndex = 8
- Me.txtBillnumber.Text = ""
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(651, 32)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(52, 21)
- Me.Label4.TabIndex = 7
- Me.Label4.Text = "票号:"
- '
- 'txtdr
- '
- Me.txtdr.Location = New System.Drawing.Point(533, 24)
- Me.txtdr.Name = "txtdr"
- Me.txtdr.Size = New System.Drawing.Size(96, 23)
- Me.txtdr.TabIndex = 6
- '
- 'txtdc
- '
- Me.txtdc.Location = New System.Drawing.Point(336, 24)
- Me.txtdc.Name = "txtdc"
- Me.txtdc.Size = New System.Drawing.Size(96, 23)
- Me.txtdc.TabIndex = 5
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(448, 32)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(83, 21)
- Me.Label3.TabIndex = 4
- Me.Label3.Text = "调入货位:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(256, 32)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(83, 21)
- Me.Label2.TabIndex = 3
- Me.Label2.Text = "调出货位:"
- '
- 'txtdate
- '
- Me.txtdate.Location = New System.Drawing.Point(64, 24)
- Me.txtdate.Name = "txtdate"
- Me.txtdate.Size = New System.Drawing.Size(136, 25)
- Me.txtdate.TabIndex = 2
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(11, 32)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(52, 21)
- Me.Label1.TabIndex = 1
- Me.Label1.Text = "日期:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Location = New System.Drawing.Point(8, 57)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(899, 7)
- Me.GroupBox2.TabIndex = 0
- Me.GroupBox2.TabStop = False
- '
- '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, 275)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(917, 322)
- Me.dgview.TabIndex = 2
- '
- 'ErrorProvider1
- '
- Me.ErrorProvider1.ContainerControl = Me
- '
- '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
- '
- 'frmKcth
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(917, 597)
- Me.Controls.Add(Me.dgview)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.tbnDh)
- Me.Name = "frmKcth"
- Me.Text = "frmKcth"
- 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
- Public lsweb As New jxcmanage
- Public dslocals As DataSet = lsweb.returndataset("select 调出地点,调入地点,序号,药品编号,药品名称,药品规格,单位,进价,数量,金额,批号,有效期,包装,产地,零售价,客户名称 as 货源,票号,摘要,经手人,库存ID from wz_th", "wz_th")
-
- Private Sub frmKcth_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- dslocals.Clear()
- dgview.DataSource = dslocals.Tables("wz_th").DefaultView
- txtdate.Value = Today.ToString
- End Sub
- Public Sub add()
- dslocals.Clear()
- txtmednumber.Text() = ""
- txtdc.Focus()
- txtDate.Value().Today().ToString()
- txtNo.Text = 1
- Dim hwdr As System.Data.SqlClient.SqlDataReader
- hwdr = lsweb.returnDataReader("select 货位 from wz_hw")
- Do While hwdr.Read()
- txtdc.Items.Add(hwdr("货位"))
- txtdr.Items.Add(hwdr("货位"))
- Loop
- txtBillnumber.Text = lsweb.selectbill("KTH").ToString
- txtmednumber.Text = ""
-
- txtUnit.Text() = ""
- txtJJ.Text() = ""
- txtCount.Text() = ""
-
-
- End Sub
- Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbnDh.ButtonClick
- Select Case e.Button.Text
- Case "添加"
- add()
- tbnEnable("tbnAdd.Enabled = False", tbnDh)
- Case "保存"
- save()
- tbnEnable("tbnSave.Enabled = False", tbnDh)
- Case "退出"
- Me.Close()
- End Select
- End Sub
- Private Sub txtmednumber_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtmednumber.TextChanged
- End Sub
- Public Function getinfo(ByVal strqueryid As String) As String
- Dim strOrderId As String
- strOrderId = strqueryid
- Return strOrderId
- End Function
- 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 dlgs As frmMedKcQuery = New frmMedKcQuery
- dlgs.PYMs = Me.getinfo(txtmednumber.Text)
- If dlgs.PYMs = String.Empty Then
- ErrorProvider1.SetError(txtmednumber, "不能为空,请输入查询码!")
- Else
- dlgs.ShowDialog()
- ErrorProvider1.SetError(txtmednumber, "")
- End If
- Dim medIdvalue, medbatch, product, package, avaid, hw As String
- medIdvalue = dlgs.GetInfo("药品编号")
- medbatch = dlgs.GetInfo("批号")
- hw = dlgs.GetInfo("货位")
- If medIdvalue Is Nothing Then
- ErrorProvider1.SetError(txtmednumber, "不能为空,请输入查询码!或没有查到记录,请重新开始!")
- Else
- Dim runSqlQuery As String
- runSqlQuery = "select * from wz_kc where 药品编号='" & medIdvalue & "'and 批号 ='" & medbatch & "' and 货位='" & hw & "'"
- 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)("单位")
- txtjj.Text = dv(0)("进价")
- txtlprice.Text = dv(0)("零售价")
- txtaddress.Text = dv(0)("产地")
- txtbatch.Text = dv(0)("批号")
- txthy.Text = dv(0)("客户名称")
- txtpackage.Text = dv(0)("包装")
- txtavaid.Text = dv(0)("有效期")
- txtzy.Text = dv(0)("库存ID")
- ErrorProvider1.SetError(txtmednumber, "")
- txtcount.Focus()
- End If
- End If
- End Sub
- Private Sub txtcount_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtcount.TextChanged
- End Sub
- Private Sub CalMxMoney()
- Dim price As Double = CType(txtjj.Text, Double)
- Dim count As Int16 = CInt(txtcount.Text)
- Me.txtmoney.Text = (price * count).ToString
- 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
- If txtcount.Text = String.Empty Then
- txtcount_Validating(Nothing, Nothing)
- Else
- CalMxMoney()
- End If
- Me.txtjj.Focus()
- End If
- End Sub
- Private Sub txtdc_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtdc.SelectedIndexChanged
- End Sub
- Private Sub txtdc_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtdc.Validating
- If txtdc.Text = String.Empty Then
- ErrorProvider1.SetError(txtdc, "不能为空。")
- txtdc.Focus()
- Else
- ErrorProvider1.SetError(txtdc, "")
- End If
- End Sub
- Private Sub txtdr_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtdr.Validating
- If txtdr.Text = String.Empty Then
- ErrorProvider1.SetError(txtdr, "不能为空。")
- txtdr.Focus()
- Else
- ErrorProvider1.SetError(txtdr, "")
- End If
- End Sub
- Private Sub txtdc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtdc.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtdr.Focus()
- End If
- End Sub
- Private Sub txtdr_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtdr.SelectedIndexChanged
- End Sub
- Private Sub txtdr_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtdr.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtmednumber.Focus()
- End If
- End Sub
- Private Sub save()
- If lsweb.updatedataset("select 调出地点,调入地点,序号,药品编号,药品名称,药品规格,单位,进价,数量,金额,批号,有效期,包装,产地,零售价,客户名称 as 货源,票号,摘要,经手人,库存ID from wz_th", "wz_th", dslocals, DataRowState.Added) = True Then
- MessageBox.Show("信息成功保存!", "提示", MessageBoxButtons.OK)
- Else
- MessageBox.Show("信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
- 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
- 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 txtjj_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtjj.Validating
- If Not IsNumeric(txtjj.Text) Or txtjj.Text = String.Empty Then
- ErrorProvider1.SetError(txtjj, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtjj, "")
- End If
- End Sub
- Private Sub txtjj_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtjj.KeyDown
- If Not IsNumeric(txtjj.Text) Or txtjj.Text = String.Empty Then
- ErrorProvider1.SetError(txtjj, "不是数值类型且不能为空。")
- txtjj.Focus()
- Else
- If e.KeyCode = Keys.Enter Then
- Static i As Int16
- i = i + 1
- txtno.Text = CStr(i)
- Dim dr As DataRow = dslocals.Tables("wz_th").NewRow()
- dr("序号") = CInt(Me.txtno.Text.Trim)
- dr("药品编号") = Me.txtmednumber.Text.Trim
- dr("药品名称") = Me.txtmedName.Text.Trim
- dr("药品规格") = Me.txtmedrule.Text.Trim
- dr("单位") = Me.txtunit.Text.Trim
- dr("进价") = CDec(Me.txtjj.Text.Trim)
- dr("数量") = Me.txtcount.Text.Trim
- dr("金额") = CDec(Me.txtjj.Text.Trim) * CInt(Me.txtcount.Text.Trim)
- dr("批号") = Me.txtbatch.Text.Trim
- dr("有效期") = Me.txtavaid.Text.Trim
- dr("包装") = Me.txtpackage.Text.Trim
- dr("产地") = Me.txtaddress.Text.Trim
- dr("零售价") = Me.txtlprice.Text.Trim
- dr("货源") = Me.txthy.Text.Trim
- dr("调出地点") = Me.txtdc.Text.Trim
- dr("调入地点") = Me.txtdr.Text.Trim
- dr("票号") = Me.txtBillnumber.Text.Trim
- dr("经手人") = Me.txtjsr.Text.Trim
- dr("库存ID") = Me.txtzy.Text.Trim
- dslocals.Tables("wz_th").Rows.Add(dr)
- txtmednumber.Focus()
- 'clear()
- End If
- ErrorProvider1.SetError(txtjj, "")
- End If
- dgview.DataSource = dslocals.Tables("wz_th").DefaultView
- End Sub
- End Class