frmMdBh.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:36k
- Imports localJxc.jxcmanage
- Public Class frmMdBh
- 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 ToolBar1 As System.Windows.Forms.ToolBar
- Friend WithEvents GroupBox1 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 Label7 As System.Windows.Forms.Label
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents txtProduct As System.Windows.Forms.TextBox
- Friend WithEvents txtAvaid As System.Windows.Forms.TextBox
- Friend WithEvents txtPackage 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 txtUnit 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 Label16 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 Label12 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 StatusBar1 As System.Windows.Forms.StatusBar
- Friend WithEvents Label20 As System.Windows.Forms.Label
- Friend WithEvents Label21 As System.Windows.Forms.Label
- Friend WithEvents tbnAdd As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnModify As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbnDelete 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 txtSum As System.Windows.Forms.TextBox
- Friend WithEvents txtPsMedName As System.Windows.Forms.TextBox
- Friend WithEvents txtBillNumber As System.Windows.Forms.TextBox
- Friend WithEvents txtBhDate As System.Windows.Forms.DateTimePicker
- Friend WithEvents txtDhDate As System.Windows.Forms.DateTimePicker
- Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
- Friend WithEvents txtBhType As System.Windows.Forms.ComboBox
- Friend WithEvents txtBhy As System.Windows.Forms.ComboBox
- Friend WithEvents txtShy As System.Windows.Forms.ComboBox
- Friend WithEvents txtPsCenter As System.Windows.Forms.ComboBox
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents txtno As System.Windows.Forms.TextBox
- 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(frmMdBh))
- Me.ToolBar1 = New System.Windows.Forms.ToolBar
- Me.tbnAdd = New System.Windows.Forms.ToolBarButton
- Me.tbnModify = New System.Windows.Forms.ToolBarButton
- Me.tbnDelete = 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.txtPsCenter = New System.Windows.Forms.ComboBox
- Me.txtShy = New System.Windows.Forms.ComboBox
- Me.txtBhy = New System.Windows.Forms.ComboBox
- Me.txtBhType = New System.Windows.Forms.ComboBox
- Me.txtDhDate = New System.Windows.Forms.DateTimePicker
- Me.txtBhDate = New System.Windows.Forms.DateTimePicker
- 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.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.txtPsMedName = New System.Windows.Forms.TextBox
- Me.txtBillNumber = New System.Windows.Forms.TextBox
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.txtno = New System.Windows.Forms.TextBox
- Me.Label20 = New System.Windows.Forms.Label
- Me.txtProduct = New System.Windows.Forms.TextBox
- Me.txtAvaid = New System.Windows.Forms.TextBox
- Me.txtPackage = 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.txtUnit = 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.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.Label12 = 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.StatusBar1 = New System.Windows.Forms.StatusBar
- 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()
- '
- 'ToolBar1
- '
- Me.ToolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnAdd, Me.tbnModify, Me.tbnDelete, Me.tbnSave, 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(550, 41)
- Me.ToolBar1.TabIndex = 0
- '
- 'tbnAdd
- '
- Me.tbnAdd.ImageIndex = 7
- Me.tbnAdd.Text = "添加"
- '
- 'tbnModify
- '
- Me.tbnModify.ImageIndex = 5
- Me.tbnModify.Text = "修改"
- '
- 'tbnDelete
- '
- Me.tbnDelete.ImageIndex = 6
- Me.tbnDelete.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.txtPsCenter)
- Me.GroupBox1.Controls.Add(Me.txtShy)
- Me.GroupBox1.Controls.Add(Me.txtBhy)
- Me.GroupBox1.Controls.Add(Me.txtBhType)
- Me.GroupBox1.Controls.Add(Me.txtDhDate)
- Me.GroupBox1.Controls.Add(Me.txtBhDate)
- Me.GroupBox1.Controls.Add(Me.txtSum)
- Me.GroupBox1.Controls.Add(Me.Label21)
- Me.GroupBox1.Controls.Add(Me.Label8)
- Me.GroupBox1.Controls.Add(Me.Label7)
- 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.Controls.Add(Me.txtPsMedName)
- Me.GroupBox1.Controls.Add(Me.txtBillNumber)
- 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(550, 116)
- Me.GroupBox1.TabIndex = 1
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "配送补货信息"
- '
- 'txtPsCenter
- '
- Me.txtPsCenter.Location = New System.Drawing.Point(72, 80)
- Me.txtPsCenter.Name = "txtPsCenter"
- Me.txtPsCenter.Size = New System.Drawing.Size(102, 20)
- Me.txtPsCenter.TabIndex = 23
- '
- 'txtShy
- '
- Me.txtShy.Location = New System.Drawing.Point(420, 50)
- Me.txtShy.Name = "txtShy"
- Me.txtShy.Size = New System.Drawing.Size(102, 20)
- Me.txtShy.TabIndex = 22
- '
- 'txtBhy
- '
- Me.txtBhy.Location = New System.Drawing.Point(246, 80)
- Me.txtBhy.Name = "txtBhy"
- Me.txtBhy.Size = New System.Drawing.Size(102, 20)
- Me.txtBhy.TabIndex = 21
- '
- 'txtBhType
- '
- Me.txtBhType.Location = New System.Drawing.Point(246, 48)
- Me.txtBhType.Name = "txtBhType"
- Me.txtBhType.Size = New System.Drawing.Size(102, 20)
- Me.txtBhType.TabIndex = 20
- '
- 'txtDhDate
- '
- Me.txtDhDate.Location = New System.Drawing.Point(420, 19)
- Me.txtDhDate.Name = "txtDhDate"
- Me.txtDhDate.Size = New System.Drawing.Size(102, 21)
- Me.txtDhDate.TabIndex = 19
- Me.txtDhDate.Value = New Date(2006, 4, 15, 0, 0, 0, 0)
- '
- 'txtBhDate
- '
- Me.txtBhDate.Location = New System.Drawing.Point(246, 19)
- Me.txtBhDate.Name = "txtBhDate"
- Me.txtBhDate.Size = New System.Drawing.Size(102, 21)
- Me.txtBhDate.TabIndex = 18
- Me.txtBhDate.Value = New Date(2006, 4, 15, 0, 0, 0, 0)
- '
- 'txtSum
- '
- Me.txtSum.Location = New System.Drawing.Point(420, 81)
- Me.txtSum.Name = "txtSum"
- Me.txtSum.ReadOnly = True
- Me.txtSum.Size = New System.Drawing.Size(102, 21)
- Me.txtSum.TabIndex = 17
- Me.txtSum.Text = ""
- '
- 'Label21
- '
- Me.Label21.AutoSize = True
- Me.Label21.ForeColor = System.Drawing.Color.Red
- Me.Label21.Location = New System.Drawing.Point(366, 87)
- Me.Label21.Name = "Label21"
- Me.Label21.Size = New System.Drawing.Size(66, 17)
- Me.Label21.TabIndex = 16
- Me.Label21.Text = "合计金额:"
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(378, 56)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(54, 17)
- Me.Label8.TabIndex = 15
- Me.Label8.Text = "审核员:"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(204, 88)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(54, 17)
- Me.Label7.TabIndex = 14
- Me.Label7.Text = "补货员:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(192, 56)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(66, 17)
- Me.Label6.TabIndex = 13
- Me.Label6.Text = "补货类型:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(6, 88)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(66, 17)
- Me.Label5.TabIndex = 12
- Me.Label5.Text = "配送中心:"
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(6, 56)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(66, 17)
- Me.Label4.TabIndex = 11
- Me.Label4.Text = "配送对象:"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(366, 25)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(66, 17)
- Me.Label3.TabIndex = 10
- Me.Label3.Text = "到货日期:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(192, 25)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(66, 17)
- Me.Label2.TabIndex = 9
- Me.Label2.Text = "补货日期:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(6, 25)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(42, 17)
- Me.Label1.TabIndex = 8
- Me.Label1.Text = "票号:"
- '
- 'txtPsMedName
- '
- Me.txtPsMedName.Location = New System.Drawing.Point(72, 50)
- Me.txtPsMedName.Name = "txtPsMedName"
- Me.txtPsMedName.ReadOnly = True
- Me.txtPsMedName.Size = New System.Drawing.Size(102, 21)
- Me.txtPsMedName.TabIndex = 1
- Me.txtPsMedName.Text = ""
- '
- '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 = 0
- Me.txtBillNumber.Text = ""
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.txtno)
- Me.GroupBox2.Controls.Add(Me.Label20)
- Me.GroupBox2.Controls.Add(Me.txtProduct)
- Me.GroupBox2.Controls.Add(Me.txtAvaid)
- Me.GroupBox2.Controls.Add(Me.txtPackage)
- Me.GroupBox2.Controls.Add(Me.txtMoney)
- Me.GroupBox2.Controls.Add(Me.txtPrice)
- Me.GroupBox2.Controls.Add(Me.txtCount)
- Me.GroupBox2.Controls.Add(Me.txtUnit)
- 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.Label16)
- Me.GroupBox2.Controls.Add(Me.Label15)
- Me.GroupBox2.Controls.Add(Me.Label14)
- Me.GroupBox2.Controls.Add(Me.Label13)
- Me.GroupBox2.Controls.Add(Me.Label12)
- 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, 157)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(550, 120)
- Me.GroupBox2.TabIndex = 2
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "药品信息"
- '
- 'txtno
- '
- Me.txtno.Location = New System.Drawing.Point(60, 56)
- Me.txtno.Name = "txtno"
- Me.txtno.Size = New System.Drawing.Size(112, 21)
- Me.txtno.TabIndex = 50
- Me.txtno.Text = ""
- '
- 'Label20
- '
- Me.Label20.AutoSize = True
- Me.Label20.Location = New System.Drawing.Point(32, 64)
- Me.Label20.Name = "Label20"
- Me.Label20.Size = New System.Drawing.Size(42, 17)
- Me.Label20.TabIndex = 49
- Me.Label20.Text = "序号:"
- '
- 'txtProduct
- '
- Me.txtProduct.Location = New System.Drawing.Point(246, 87)
- Me.txtProduct.Name = "txtProduct"
- Me.txtProduct.ReadOnly = True
- Me.txtProduct.Size = New System.Drawing.Size(89, 21)
- Me.txtProduct.TabIndex = 47
- Me.txtProduct.Text = ""
- '
- 'txtAvaid
- '
- Me.txtAvaid.Location = New System.Drawing.Point(390, 88)
- Me.txtAvaid.Name = "txtAvaid"
- Me.txtAvaid.ReadOnly = True
- Me.txtAvaid.Size = New System.Drawing.Size(54, 21)
- Me.txtAvaid.TabIndex = 46
- Me.txtAvaid.Text = ""
- '
- 'txtPackage
- '
- Me.txtPackage.Location = New System.Drawing.Point(492, 88)
- Me.txtPackage.Name = "txtPackage"
- Me.txtPackage.ReadOnly = True
- Me.txtPackage.Size = New System.Drawing.Size(48, 21)
- Me.txtPackage.TabIndex = 44
- Me.txtPackage.Text = ""
- '
- 'txtMoney
- '
- Me.txtMoney.Location = New System.Drawing.Point(492, 56)
- Me.txtMoney.Name = "txtMoney"
- Me.txtMoney.ReadOnly = True
- Me.txtMoney.Size = New System.Drawing.Size(48, 21)
- Me.txtMoney.TabIndex = 43
- Me.txtMoney.Text = "0.00"
- '
- 'txtPrice
- '
- Me.txtPrice.Location = New System.Drawing.Point(390, 56)
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.Size = New System.Drawing.Size(54, 21)
- Me.txtPrice.TabIndex = 42
- Me.txtPrice.Text = "0.00"
- '
- 'txtCount
- '
- Me.txtCount.Location = New System.Drawing.Point(246, 56)
- Me.txtCount.Name = "txtCount"
- Me.txtCount.Size = New System.Drawing.Size(89, 21)
- Me.txtCount.TabIndex = 41
- Me.txtCount.Text = ""
- '
- 'txtUnit
- '
- Me.txtUnit.Location = New System.Drawing.Point(60, 87)
- Me.txtUnit.Name = "txtUnit"
- Me.txtUnit.ReadOnly = True
- Me.txtUnit.Size = New System.Drawing.Size(112, 21)
- Me.txtUnit.TabIndex = 40
- Me.txtUnit.Text = ""
- '
- 'txtMedRule
- '
- Me.txtMedRule.Location = New System.Drawing.Point(420, 25)
- Me.txtMedRule.Name = "txtMedRule"
- Me.txtMedRule.ReadOnly = True
- Me.txtMedRule.Size = New System.Drawing.Size(120, 21)
- Me.txtMedRule.TabIndex = 39
- Me.txtMedRule.Text = ""
- '
- 'txtmedName
- '
- Me.txtmedName.Location = New System.Drawing.Point(246, 25)
- Me.txtmedName.Name = "txtmedName"
- Me.txtmedName.ReadOnly = True
- Me.txtmedName.Size = New System.Drawing.Size(102, 21)
- Me.txtmedName.TabIndex = 38
- Me.txtmedName.Text = ""
- '
- 'txtMedNumber
- '
- Me.txtMedNumber.Location = New System.Drawing.Point(60, 25)
- Me.txtMedNumber.Name = "txtMedNumber"
- Me.txtMedNumber.Size = New System.Drawing.Size(112, 21)
- Me.txtMedNumber.TabIndex = 37
- Me.txtMedNumber.Text = ""
- '
- 'Label19
- '
- Me.Label19.AutoSize = True
- Me.Label19.Location = New System.Drawing.Point(216, 96)
- Me.Label19.Name = "Label19"
- Me.Label19.Size = New System.Drawing.Size(42, 17)
- Me.Label19.TabIndex = 36
- Me.Label19.Text = "产地:"
- '
- 'Label18
- '
- Me.Label18.AutoSize = True
- Me.Label18.Location = New System.Drawing.Point(348, 93)
- Me.Label18.Name = "Label18"
- Me.Label18.Size = New System.Drawing.Size(54, 17)
- Me.Label18.TabIndex = 35
- Me.Label18.Text = "有效期:"
- '
- 'Label16
- '
- Me.Label16.AutoSize = True
- Me.Label16.Location = New System.Drawing.Point(462, 96)
- Me.Label16.Name = "Label16"
- Me.Label16.Size = New System.Drawing.Size(42, 17)
- Me.Label16.TabIndex = 33
- Me.Label16.Text = "包装:"
- '
- 'Label15
- '
- Me.Label15.AutoSize = True
- Me.Label15.ForeColor = System.Drawing.Color.Red
- Me.Label15.Location = New System.Drawing.Point(462, 64)
- Me.Label15.Name = "Label15"
- Me.Label15.Size = New System.Drawing.Size(42, 17)
- Me.Label15.TabIndex = 32
- Me.Label15.Text = "金额:"
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(360, 64)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(42, 17)
- Me.Label14.TabIndex = 31
- Me.Label14.Text = "单价:"
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(216, 64)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(42, 17)
- Me.Label13.TabIndex = 30
- Me.Label13.Text = "数量:"
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(32, 96)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(42, 17)
- Me.Label12.TabIndex = 29
- Me.Label12.Text = "单位:"
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(366, 32)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(66, 17)
- Me.Label11.TabIndex = 28
- Me.Label11.Text = "药品规格:"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(192, 32)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(66, 17)
- Me.Label10.TabIndex = 27
- Me.Label10.Text = "药品名称:"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(8, 32)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(66, 17)
- Me.Label9.TabIndex = 26
- Me.Label9.Text = "药品编号:"
- '
- 'StatusBar1
- '
- Me.StatusBar1.Location = New System.Drawing.Point(0, 457)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(550, 18)
- Me.StatusBar1.TabIndex = 4
- Me.StatusBar1.Text = "StatusBar1"
- '
- '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, 277)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(550, 180)
- Me.Panel1.TabIndex = 5
- '
- '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(550, 180)
- Me.dgview.TabIndex = 0
- '
- 'frmMdBh
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(550, 475)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.StatusBar1)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.ToolBar1)
- Me.Name = "frmMdBh"
- 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 web As New WebReference.DataManager
- Public dslocal As DataSet = web.returndataset("select BillNumber as 票号,PsMedName as 配送对象,Money as 金额,BhTime as 补货日期,PsCenter as 配送中心,DhTime as 到货日期,BhType as 补货类型,Shy as 审核人,Bhy as 补货员 from mdbh", "mdbh")
- Public dslocals As DataSet = web.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 票号 from mdbhmx", "mdbhmx")
- Private Sub save()
- Dim dr As DataRow = dslocal.Tables("mdbh").NewRow()
- dr("票号") = Me.txtBillNumber.Text.Trim
- dr("配送对象") = Me.txtmedName.Text.Trim
- dr("金额") = Me.txtMoney.Text.Trim
- dr("补货日期") = Me.txtBhDate.Text.Trim
- dr("配送中心") = Me.txtPsCenter.Text.Trim
- dr("到货日期") = Me.txtDhDate.Text.Trim
- dr("补货类型") = Me.txtBhType.Text.Trim
- dr("审核人") = Me.txtShy.Text.Trim
- dr("补货员") = Me.txtBhy.Text.Trim
- dslocal.Tables("mdbh").Rows.Add(dr)
- If web.updatedataset("select BillNumber as 票号,PsMedName as 配送对象,Money as 金额,BhTime as 补货日期,PsCenter as 配送中心,DhTime as 到货日期,BhType as 补货类型,Shy as 审核人,Bhy as 补货员 from mdbh", "mdbh", dslocal, DataRowState.Added) = True And web.updatedataset("select Number as 序号,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Price as 单价,Lcount as 数量,Money as 金额,Avaid as 有效期,Package as 包装,Product as 产地,BillNumber as 票号 from mdbhmx", "mdbhmx", dslocals, DataRowState.Added) = True Then
- MessageBox.Show("信息成功保存!", "提示", MessageBoxButtons.OK)
- Else
- MessageBox.Show("信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
- End If
- End Sub
- Public Sub add()
- dslocal.Clear()
- dslocals.Clear()
- Dim unitdr, mmdr As System.Data.SqlClient.SqlDataReader
- unitdr = lsweb.returnDataReader("select 单位名称 from wz_regedit")
- Do While unitdr.Read()
- txtPsMedName.Text = unitdr("单位名称")
- Loop
- txtBhType.Focus()
- txtBhDate.Value().Today().ToString()
- txtDhDate.Text() = ""
- txtBillNumber.Text = lsweb.selectbill("BH").ToString
- txtPsCenter.Text = ""
- mmdr = lsweb.returnDataReader("select 操作员 from wz_mm")
- Do While mmdr.Read()
- txtShy.Items.Add(mmdr("操作员"))
- txtBhy.Items.Add(mmdr("操作员"))
- Loop
- txtSum.Text() = CStr(0)
- txtMedNumber.Text = ""
- txtmedName.Text() = ""
- txtMedRule.Text() = ""
- txtNo.Text() = "1"
- txtCount.Text() = ""
- txtPrice.Text() = CStr(0)
- txtMoney.Text() = CStr(0)
- txtAvaid.Text() = ""
- txtUnit.Text() = ""
- txtProduct.Text() = ""
- txtPackage.Text() = ""
- End Sub
- Private Sub frmMdBh_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- txtBhDate.Value = Today.ToString
- txtDhDate.Value = Today.ToString
- dslocals.Clear()
- dgview.DataSource = dslocals.Tables("mdbhmx").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 "添加"
- bool = False
- add()
- Case "保存"
- bool = True
- save()
- Case "退出"
- If txtBillNumber.Text = String.Empty Or bool = True Then
- Me.Close()
- Else
- lsweb.cancelbill(txtBillNumber.Text.Trim)
- Me.Close()
- End If
- End Select
- 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 dlg As frmMedQuery = New frmMedQuery
- dlg.PYM = Me.getinfo(txtMedNumber.Text)
- If dlg.PYM = "" Then
- ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!")
- Else
- dlg.ShowDialog()
- ErrorProvider1.SetError(txtMedNumber, "")
- End If
- Dim medIdvalue As String
- medIdvalue = dlg.GetInfo("药品编号")
- If medIdvalue Is Nothing Then
- ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!或没有查到记录,请重新开始!")
- Else
- Dim runSqlQuery As String
- runSqlQuery = "select * from wz_cp where 药品编号='" & medIdvalue & " '"
- 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)("单价")
- txtAvaid.Text = dv(0)("有效期")
- 'txtPackage.Text = dv(0)("包装")
- txtProduct.Text = dv(0)("产地")
- ErrorProvider1.SetError(txtMedNumber, "")
- End If
- txtCount.Focus()
- 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
- 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()
- txtPrice.Focus()
- End If
- 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
- i = i + 1
- txtNo.Text = CStr(i)
- Dim dr As DataRow = dslocals.Tables("mdbhmx").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.txtAvaid.Text.Trim
- dr("产地") = Me.txtProduct.Text.Trim
- dr("包装") = Me.txtPackage.Text.Trim
- dr("票号") = Me.txtBillNumber.Text.Trim
- dslocals.Tables("mdbhmx").Rows.Add(dr)
- txtMedNumber.Text = ""
- txtMedNumber.Focus()
- CalTotalMoney()
- clear()
- End If
- End If
- dgview.DataSource = dslocals.Tables("mdbhmx").DefaultView
- End Sub
- 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("mdbhmx").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("mdbhmx").Rows
- money = dr("金额")
- dtotal = dtotal + CType(money.Trim, Double)
- txtSum.Text = dtotal.ToString.Trim
- Next
- 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 = ""
- End Sub
- Private Sub txtBhType_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtBhType.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
- txtPsCenter.Focus()
- End If
- End Sub
- Private Sub txtPsCenter_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPsCenter.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtBhy.Focus()
- End If
- End Sub
- Private Sub txtBhy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtBhy.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtMedNumber.Focus()
- End If
- End Sub
- Private Sub frmMdBh_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
- If Not txtBillNumber.Text = String.Empty Then
- lsweb.cancelbill(txtBillNumber.Text.Trim)
- End If
- End Sub
-
- Private Sub txtCount_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCount.TextChanged
- End Sub
- End Class