frmPsth.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:38k
- Public Class frmPsth
- 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 Label7 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 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 Label6 As System.Windows.Forms.Label
- Friend WithEvents txtno As System.Windows.Forms.TextBox
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents txtpsmedname As System.Windows.Forms.ComboBox
- Friend WithEvents txtywy As System.Windows.Forms.ComboBox
- Friend WithEvents tbnAdd As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnSave As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnExit As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnPrint As System.Windows.Forms.ToolBarButton
- Friend WithEvents lblsum As System.Windows.Forms.Label
- Friend WithEvents txtsum As System.Windows.Forms.TextBox
- Friend WithEvents txtthdate As System.Windows.Forms.DateTimePicker
- 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 tbnth As System.Windows.Forms.ToolBar
- Friend WithEvents txtpscenter As System.Windows.Forms.ComboBox
- Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents txthw As System.Windows.Forms.TextBox
- Friend WithEvents txtbillnumber 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(frmPsth))
- Me.tbnth = 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.StatusBar1 = New System.Windows.Forms.StatusBar
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txthw = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.txtpscenter = New System.Windows.Forms.ComboBox
- Me.txtthdate = New System.Windows.Forms.DateTimePicker
- Me.txtsum = New System.Windows.Forms.TextBox
- Me.lblsum = New System.Windows.Forms.Label
- Me.txtywy = New System.Windows.Forms.ComboBox
- Me.txtpsmedname = New System.Windows.Forms.ComboBox
- Me.Label7 = New System.Windows.Forms.Label
- Me.Label5 = New System.Windows.Forms.Label
- Me.Label4 = 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.txtPackage = New System.Windows.Forms.TextBox
- Me.txtUnit = New System.Windows.Forms.TextBox
- Me.txtno = New System.Windows.Forms.TextBox
- Me.Label6 = 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.dgview = New System.Windows.Forms.DataGrid
- Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
- Me.txtbillnumber = New System.Windows.Forms.TextBox
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'tbnth
- '
- Me.tbnth.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.tbnth.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnAdd, Me.tbnSave, Me.tbnPrint, Me.tbnExit})
- Me.tbnth.DropDownArrows = True
- Me.tbnth.ImageList = Me.ImageList2
- Me.tbnth.Location = New System.Drawing.Point(0, 0)
- Me.tbnth.Name = "tbnth"
- Me.tbnth.ShowToolTips = True
- Me.tbnth.Size = New System.Drawing.Size(604, 41)
- Me.tbnth.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 = "退出"
- '
- '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
- '
- 'StatusBar1
- '
- Me.StatusBar1.Location = New System.Drawing.Point(0, 472)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(604, 17)
- Me.StatusBar1.TabIndex = 1
- Me.StatusBar1.Text = "StatusBar1"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtbillnumber)
- Me.GroupBox1.Controls.Add(Me.txthw)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.txtpscenter)
- Me.GroupBox1.Controls.Add(Me.txtthdate)
- Me.GroupBox1.Controls.Add(Me.txtsum)
- Me.GroupBox1.Controls.Add(Me.lblsum)
- Me.GroupBox1.Controls.Add(Me.txtywy)
- Me.GroupBox1.Controls.Add(Me.txtpsmedname)
- Me.GroupBox1.Controls.Add(Me.Label7)
- Me.GroupBox1.Controls.Add(Me.Label5)
- Me.GroupBox1.Controls.Add(Me.Label4)
- 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, 41)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(604, 79)
- Me.GroupBox1.TabIndex = 2
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "门店退货信息"
- '
- 'txthw
- '
- Me.txthw.Location = New System.Drawing.Point(408, 50)
- Me.txthw.Name = "txthw"
- Me.txthw.ReadOnly = True
- Me.txthw.Size = New System.Drawing.Size(54, 21)
- Me.txthw.TabIndex = 56
- Me.txthw.Text = ""
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(378, 56)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(42, 17)
- Me.Label3.TabIndex = 55
- Me.Label3.Text = "货位:"
- '
- 'txtpscenter
- '
- Me.txtpscenter.Location = New System.Drawing.Point(240, 50)
- Me.txtpscenter.Name = "txtpscenter"
- Me.txtpscenter.Size = New System.Drawing.Size(108, 20)
- Me.txtpscenter.TabIndex = 54
- '
- 'txtthdate
- '
- Me.txtthdate.Location = New System.Drawing.Point(240, 19)
- Me.txtthdate.Name = "txtthdate"
- Me.txtthdate.Size = New System.Drawing.Size(108, 21)
- Me.txtthdate.TabIndex = 52
- '
- 'txtsum
- '
- Me.txtsum.Location = New System.Drawing.Point(522, 50)
- Me.txtsum.Name = "txtsum"
- Me.txtsum.ReadOnly = True
- Me.txtsum.Size = New System.Drawing.Size(72, 21)
- Me.txtsum.TabIndex = 51
- Me.txtsum.Text = ""
- '
- 'lblsum
- '
- Me.lblsum.AutoSize = True
- Me.lblsum.Location = New System.Drawing.Point(468, 56)
- Me.lblsum.Name = "lblsum"
- Me.lblsum.Size = New System.Drawing.Size(66, 17)
- Me.lblsum.TabIndex = 50
- Me.lblsum.Text = "合计金额:"
- '
- 'txtywy
- '
- Me.txtywy.Location = New System.Drawing.Point(408, 19)
- Me.txtywy.Name = "txtywy"
- Me.txtywy.Size = New System.Drawing.Size(72, 20)
- Me.txtywy.TabIndex = 48
- '
- 'txtpsmedname
- '
- Me.txtpsmedname.Location = New System.Drawing.Point(60, 48)
- Me.txtpsmedname.Name = "txtpsmedname"
- Me.txtpsmedname.Size = New System.Drawing.Size(114, 20)
- Me.txtpsmedname.TabIndex = 47
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(366, 24)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(54, 17)
- Me.Label7.TabIndex = 46
- Me.Label7.Text = "业务员:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(186, 56)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(66, 17)
- Me.Label5.TabIndex = 44
- Me.Label5.Text = "配送中心:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(8, 56)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(66, 17)
- Me.Label4.TabIndex = 43
- Me.Label4.Text = "配送对象:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(186, 24)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(66, 17)
- Me.Label2.TabIndex = 41
- Me.Label2.Text = "退货日期:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(8, 24)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(42, 17)
- Me.Label1.TabIndex = 40
- Me.Label1.Text = "票号:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.txtPackage)
- Me.GroupBox2.Controls.Add(Me.txtUnit)
- Me.GroupBox2.Controls.Add(Me.txtno)
- Me.GroupBox2.Controls.Add(Me.Label6)
- 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, 120)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(604, 112)
- Me.GroupBox2.TabIndex = 3
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "药品信息"
- '
- 'txtPackage
- '
- Me.txtPackage.Location = New System.Drawing.Point(486, 81)
- Me.txtPackage.Name = "txtPackage"
- Me.txtPackage.ReadOnly = True
- Me.txtPackage.Size = New System.Drawing.Size(60, 21)
- Me.txtPackage.TabIndex = 95
- Me.txtPackage.Text = ""
- '
- 'txtUnit
- '
- Me.txtUnit.Location = New System.Drawing.Point(486, 48)
- Me.txtUnit.Name = "txtUnit"
- Me.txtUnit.ReadOnly = True
- Me.txtUnit.Size = New System.Drawing.Size(60, 21)
- Me.txtUnit.TabIndex = 94
- Me.txtUnit.Text = ""
- '
- 'txtno
- '
- Me.txtno.Location = New System.Drawing.Point(60, 48)
- Me.txtno.Name = "txtno"
- Me.txtno.ReadOnly = True
- Me.txtno.Size = New System.Drawing.Size(30, 21)
- Me.txtno.TabIndex = 93
- Me.txtno.Text = ""
- '
- 'Label6
- '
- Me.Label6.Location = New System.Drawing.Point(30, 56)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(42, 17)
- Me.Label6.TabIndex = 92
- Me.Label6.Text = "序号:"
- '
- 'Label16
- '
- Me.Label16.AutoSize = True
- Me.Label16.Location = New System.Drawing.Point(456, 88)
- Me.Label16.Name = "Label16"
- Me.Label16.Size = New System.Drawing.Size(42, 17)
- Me.Label16.TabIndex = 91
- Me.Label16.Text = "包装:"
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(456, 56)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(42, 17)
- Me.Label12.TabIndex = 90
- Me.Label12.Text = "单位:"
- '
- 'txtProduct
- '
- Me.txtProduct.Location = New System.Drawing.Point(240, 81)
- Me.txtProduct.Name = "txtProduct"
- Me.txtProduct.ReadOnly = True
- Me.txtProduct.Size = New System.Drawing.Size(88, 21)
- Me.txtProduct.TabIndex = 89
- Me.txtProduct.Text = ""
- '
- 'txtAvaid
- '
- Me.txtAvaid.Location = New System.Drawing.Point(378, 81)
- Me.txtAvaid.Name = "txtAvaid"
- Me.txtAvaid.ReadOnly = True
- Me.txtAvaid.Size = New System.Drawing.Size(66, 21)
- Me.txtAvaid.TabIndex = 88
- Me.txtAvaid.Text = ""
- '
- 'txtBatch
- '
- Me.txtBatch.Location = New System.Drawing.Point(60, 80)
- Me.txtBatch.Name = "txtBatch"
- Me.txtBatch.ReadOnly = True
- Me.txtBatch.Size = New System.Drawing.Size(114, 21)
- Me.txtBatch.TabIndex = 87
- Me.txtBatch.Text = ""
- '
- 'txtMoney
- '
- Me.txtMoney.Location = New System.Drawing.Point(378, 48)
- Me.txtMoney.Name = "txtMoney"
- Me.txtMoney.ReadOnly = True
- Me.txtMoney.Size = New System.Drawing.Size(66, 21)
- Me.txtMoney.TabIndex = 85
- Me.txtMoney.Text = "0.00"
- '
- 'txtPrice
- '
- Me.txtPrice.Location = New System.Drawing.Point(240, 50)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(88, 21)
- Me.txtPrice.TabIndex = 84
- Me.txtPrice.Text = "0.00"
- '
- 'txtCount
- '
- Me.txtCount.Location = New System.Drawing.Point(132, 48)
- Me.txtCount.Name = "txtCount"
- Me.txtCount.Size = New System.Drawing.Size(42, 21)
- Me.txtCount.TabIndex = 83
- Me.txtCount.Text = ""
- '
- 'txtMedRule
- '
- Me.txtMedRule.Location = New System.Drawing.Point(450, 16)
- Me.txtMedRule.Name = "txtMedRule"
- Me.txtMedRule.ReadOnly = True
- Me.txtMedRule.Size = New System.Drawing.Size(96, 21)
- Me.txtMedRule.TabIndex = 81
- Me.txtMedRule.Text = ""
- '
- 'txtmedName
- '
- Me.txtmedName.Location = New System.Drawing.Point(240, 16)
- Me.txtmedName.Name = "txtmedName"
- Me.txtmedName.ReadOnly = True
- Me.txtmedName.Size = New System.Drawing.Size(136, 21)
- Me.txtmedName.TabIndex = 80
- Me.txtmedName.Text = ""
- '
- 'txtMedNumber
- '
- Me.txtMedNumber.Location = New System.Drawing.Point(60, 16)
- Me.txtMedNumber.Name = "txtMedNumber"
- Me.txtMedNumber.Size = New System.Drawing.Size(114, 21)
- Me.txtMedNumber.TabIndex = 79
- Me.txtMedNumber.Text = ""
- '
- 'Label19
- '
- Me.Label19.AutoSize = True
- Me.Label19.Location = New System.Drawing.Point(210, 88)
- Me.Label19.Name = "Label19"
- Me.Label19.Size = New System.Drawing.Size(42, 17)
- Me.Label19.TabIndex = 78
- Me.Label19.Text = "产地:"
- '
- 'Label18
- '
- Me.Label18.AutoSize = True
- Me.Label18.Location = New System.Drawing.Point(336, 88)
- Me.Label18.Name = "Label18"
- Me.Label18.Size = New System.Drawing.Size(54, 17)
- Me.Label18.TabIndex = 77
- Me.Label18.Text = "有效期:"
- '
- 'Label17
- '
- Me.Label17.AutoSize = True
- Me.Label17.Location = New System.Drawing.Point(30, 88)
- Me.Label17.Name = "Label17"
- Me.Label17.Size = New System.Drawing.Size(42, 17)
- Me.Label17.TabIndex = 76
- Me.Label17.Text = "批号:"
- '
- 'Label15
- '
- Me.Label15.AutoSize = True
- Me.Label15.ForeColor = System.Drawing.Color.Red
- Me.Label15.Location = New System.Drawing.Point(348, 56)
- Me.Label15.Name = "Label15"
- Me.Label15.Size = New System.Drawing.Size(42, 17)
- Me.Label15.TabIndex = 75
- Me.Label15.Text = "金额:"
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(210, 56)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(42, 17)
- Me.Label14.TabIndex = 74
- Me.Label14.Text = "单价:"
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(100, 56)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(42, 17)
- Me.Label13.TabIndex = 73
- Me.Label13.Text = "数量:"
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(396, 24)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(66, 17)
- Me.Label11.TabIndex = 72
- Me.Label11.Text = "药品规格:"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(186, 24)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(66, 17)
- Me.Label10.TabIndex = 71
- Me.Label10.Text = "药品名称:"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(6, 24)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(66, 17)
- Me.Label9.TabIndex = 70
- Me.Label9.Text = "药品编号:"
- '
- '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, 232)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(604, 240)
- Me.dgview.TabIndex = 4
- '
- 'ErrorProvider1
- '
- Me.ErrorProvider1.ContainerControl = Me
- '
- 'txtbillnumber
- '
- Me.txtbillnumber.Location = New System.Drawing.Point(48, 19)
- Me.txtbillnumber.Name = "txtbillnumber"
- Me.txtbillnumber.ReadOnly = True
- Me.txtbillnumber.Size = New System.Drawing.Size(126, 21)
- Me.txtbillnumber.TabIndex = 57
- Me.txtbillnumber.Text = ""
- '
- 'frmPsth
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(604, 489)
- Me.Controls.Add(Me.dgview)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.StatusBar1)
- Me.Controls.Add(Me.tbnth)
- Me.Name = "frmPsth"
- Me.Text = "门店退货登记"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.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 dslocal As DataSet = lsweb.returndataset("select BillNumber as 票号,PsMedName as 配送对象,Money as 金额,ThTime as 退货日期,PsCenter as 配送中心,ywy as 业务员 from psth", "psth")
- Public dslocals As DataSet = lsweb.returndataset("select Number as 序号,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Price as 单价,Lcount as 数量,Money as 金额,Batch as 批号,Avaid as 有效期,Package as 包装,Product as 产地,BillNumber as 票号,demo as 货位 from psthmx", "psthmx")
- Public Sub add()
- dslocal.Clear()
- dslocals.Clear()
- txtthdate.Value().Today().ToString()
- txtbillnumber.Text = lsweb.selectbill("TS").ToString
- txtpsmedname.Text = ""
- txtpscenter.Text = ""
- txtywy.Text = ""
- txtsum.Text() = CStr(0)
- txtMedNumber.Text = ""
- txtmedName.Text() = ""
- txtMedRule.Text() = ""
- txtno.Text() = "1"
- txtCount.Text() = ""
- txtPrice.Text() = CStr(0)
- txtMoney.Text() = CStr(0)
- txtBatch.Text() = ""
- txtAvaid.Text() = ""
- txtUnit.Text() = ""
- txtProduct.Text() = ""
- txtPackage.Text() = ""
- txtywy.Focus()
- End Sub
- Private Sub save()
- Dim dr As DataRow = dslocal.Tables("psth").NewRow()
- dr("票号") = Me.txtbillnumber.Text.Trim
- dr("配送对象") = Me.txtmedName.Text.Trim
- dr("金额") = Me.txtsum.Text.Trim
- dr("退货日期") = Me.txtthdate.Text.Trim
- dr("配送中心") = Me.txtpscenter.Text.Trim
- dr("业务员") = Me.txtywy.Text.Trim
- dslocal.Tables("psth").Rows.Add(dr)
- If lsweb.updatedataset("select BillNumber as 票号,PsMedName as 配送对象,Money as 金额,ThTime as 退货日期,PsCenter as 配送中心,ywy as 业务员 from psth", "psth", dslocal, DataRowState.Added) = True And lsweb.updatedataset("select Number as 序号,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Price as 单价,Lcount as 数量,Money as 金额,Batch as 批号,Avaid as 有效期,Package as 包装,Product as 产地,BillNumber as 票号,demo as 货位 from psthmx", "psthmx", dslocals, DataRowState.Added) = True Then
- MessageBox.Show("信息成功保存!", "提示", MessageBoxButtons.OK)
- Else
- MessageBox.Show("信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
- 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 ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbnth.ButtonClick
- Select Case e.Button.Text
- Case "添加"
- add()
- tbnEnable("tbnAdd.Enabled = False", tbnth)
- Case "保存"
- If txtsum.Text = "" Then
- MessageBox.Show("信息不完整,保存失败!", "提示", MessageBoxButtons.OK)
- Else
- save()
- tbnEnable("tbnSave.Enabled = False", tbnth)
- End If
- Case "退出"
- Me.Close()
- End Select
- End Sub
- Private Sub txtywy_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtywy.SelectedIndexChanged
- End Sub
- Private Sub txtywy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtywy.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtpsmedname.Focus()
- End If
- End Sub
- Private Sub txtpsmedname_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtpsmedname.SelectedIndexChanged
- End Sub
- Private Sub txtpsmedname_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtpsmedname.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtpscenter.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 CalTotalMoney()
- If dslocals.Tables("psthMx").Rows.Count = 0 Then
- Me.txtMoney.Text = 0
- End If
- Dim money As String = ""
- Dim dtotal As Double = 0
- For Each dr As DataRow In dslocals.Tables("psthMx").Rows
- money = dr("金额")
- dtotal = dtotal + CType(money.Trim, Double)
- txtsum.Text = dtotal.ToString.Trim
- Next
- 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 txtCount_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCount.TextChanged
- 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 txtywy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtywy.Validating
- If txtywy.Text = String.Empty Then
- ErrorProvider1.SetError(txtywy, "不是数值类型且不能为空。")
- txtywy.Focus()
- Else
- ErrorProvider1.SetError(txtywy, "")
- End If
- End Sub
- Private Sub txtpsmedname_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtpsmedname.Validating
- If txtpsmedname.Text = String.Empty Then
- ErrorProvider1.SetError(txtpsmedname, "不是数值类型且不能为空。")
- txtpsmedname.Focus()
- Else
- ErrorProvider1.SetError(txtpsmedname, "")
- End If
- End Sub
- Private Sub txtMedNumber_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtMedNumber.Validating
- If txtMedNumber.Text = String.Empty Then
- ErrorProvider1.SetError(txtMedNumber, "不是数值类型且不能为空。")
- txtMedNumber.Focus()
- Else
- ErrorProvider1.SetError(txtMedNumber, "")
- End If
- End Sub
- Private Sub txtCount_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtCount.Validating
- If Not IsNumeric(txtCount.Text) Or txtCount.Text = String.Empty Then
- ErrorProvider1.SetError(txtCount, "不是数值类型且不能为空!")
- txtCount.Focus()
- Else
- ErrorProvider1.SetError(txtCount, "")
- End If
- End Sub
- Private Sub txtPrice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPrice.TextChanged
- 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, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtPrice, "")
- End If
- 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("psthmx").Rows.Count < 1 Then
- i = 1
- Else
- i = i + 1
- End If
- txtno.Text = CStr(i)
- Dim dr As DataRow = dslocals.Tables("psthmx").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.txtPackage.Text.Trim
- dr("票号") = Me.txtbillnumber.Text.Trim
- dr("货位") = Me.txthw.Text.Trim
- dslocals.Tables("psthmx").Rows.Add(dr)
- txtMedNumber.Text = ""
- txtMedNumber.Focus()
- CalTotalMoney()
- clear()
- End If
- End If
- dgview.DataSource = dslocals.Tables("psthMx").DefaultView
- 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 frmPsth_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- dslocals.Clear()
- dgview.DataSource = dslocals.Tables("psthMx").DefaultView
- Dim unitdr, mmdr, md As System.Data.SqlClient.SqlDataReader
- unitdr = lsweb.returnDataReader("select Cname from PsCenter")
- Do While unitdr.Read()
- txtpscenter.Items.Add(unitdr("Cname"))
- Loop
- mmdr = lsweb.returnDataReader("select 操作员 from wz_mm")
- Do While mmdr.Read()
- txtywy.Items.Add(mmdr("操作员"))
- Loop
- md = lsweb.returnDataReader("select Cname from MdManager")
- Do While md.Read()
- txtpsmedname.Items.Add(md("Cname"))
- Loop
- End Sub
- Private Sub txtpscenter_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
- End Sub
- Private Sub txtpscenter_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs)
- If e.KeyCode = Keys.Enter Then
- txtMedNumber.Focus()
- End If
- End Sub
- Private Sub txtpscenter_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
- If txtpscenter.Text = String.Empty Then
- ErrorProvider1.SetError(txtpscenter, "不是数值类型且不能为空。")
- txtpscenter.Focus()
- Else
- ErrorProvider1.SetError(txtpscenter, "")
- End If
- End Sub
- Private Sub frmPsth_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 txtpscenter_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtpscenter.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtMedNumber.Focus()
- End If
- End Sub
- Private Sub txtMedNumber_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMedNumber.TextChanged
- End Sub
- End Class