frmPsPst.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:55k
- Public Class frmPsPst
- 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 Label8 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label21 As System.Windows.Forms.Label
- Friend WithEvents txtSum As System.Windows.Forms.TextBox
- Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
- 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 txtBhDate As System.Windows.Forms.DateTimePicker
- Friend WithEvents txtBhType As System.Windows.Forms.ComboBox
- Friend WithEvents txtBhy As System.Windows.Forms.ComboBox
- Friend WithEvents MsdnTextboxValidator1 As MSDNTextboxValidator.MSDNTextboxValidator
- Friend WithEvents txtPsCenter As System.Windows.Forms.ComboBox
- Friend WithEvents txtbillnumber As System.Windows.Forms.TextBox
- Friend WithEvents txtshy As System.Windows.Forms.TextBox
- Friend WithEvents txtBhNumber As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents txtPackage As System.Windows.Forms.TextBox
- Friend WithEvents txtUnit As System.Windows.Forms.TextBox
- Friend WithEvents Label22 As System.Windows.Forms.Label
- Friend WithEvents txtNo As System.Windows.Forms.TextBox
- Friend WithEvents Label20 As System.Windows.Forms.Label
- Friend WithEvents Label16 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 Panel2 As System.Windows.Forms.Panel
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents tbnPs As System.Windows.Forms.ToolBar
- Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents txtPsMedName As System.Windows.Forms.ComboBox
- Friend WithEvents Label23 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(frmPsPst))
- Me.tbnPs = 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.Label23 = New System.Windows.Forms.Label
- Me.txtPsMedName = New System.Windows.Forms.ComboBox
- Me.Label12 = New System.Windows.Forms.Label
- Me.Label4 = New System.Windows.Forms.Label
- Me.txtBhNumber = New System.Windows.Forms.TextBox
- Me.txtshy = New System.Windows.Forms.TextBox
- Me.txtbillnumber = New System.Windows.Forms.TextBox
- Me.txtPsCenter = New System.Windows.Forms.ComboBox
- Me.txtBhy = New System.Windows.Forms.ComboBox
- Me.txtBhType = New System.Windows.Forms.ComboBox
- 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.Label3 = New System.Windows.Forms.Label
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
- Me.MsdnTextboxValidator1 = New MSDNTextboxValidator.MSDNTextboxValidator(Me.components)
- Me.txtPackage = New System.Windows.Forms.TextBox
- Me.txtUnit = New System.Windows.Forms.TextBox
- Me.txtNo = New System.Windows.Forms.TextBox
- 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.Panel1 = New System.Windows.Forms.Panel
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.Label22 = New System.Windows.Forms.Label
- Me.Label20 = New System.Windows.Forms.Label
- Me.Label16 = New System.Windows.Forms.Label
- 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.Panel2 = New System.Windows.Forms.Panel
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.GroupBox1.SuspendLayout()
- Me.Panel1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.Panel2.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'tbnPs
- '
- Me.tbnPs.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.tbnPs.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnAdd, Me.tbnSave, Me.tbnPrint, Me.tbnExit})
- Me.tbnPs.DropDownArrows = True
- Me.tbnPs.ImageList = Me.ImageList2
- Me.tbnPs.Location = New System.Drawing.Point(0, 0)
- Me.tbnPs.Name = "tbnPs"
- Me.tbnPs.ShowToolTips = True
- Me.tbnPs.Size = New System.Drawing.Size(734, 44)
- Me.tbnPs.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, 694)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(734, 22)
- Me.StatusBar1.TabIndex = 1
- Me.StatusBar1.Text = "StatusBar1"
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txthw)
- Me.GroupBox1.Controls.Add(Me.Label23)
- Me.GroupBox1.Controls.Add(Me.txtPsMedName)
- Me.GroupBox1.Controls.Add(Me.Label12)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.txtBhNumber)
- Me.GroupBox1.Controls.Add(Me.txtshy)
- Me.GroupBox1.Controls.Add(Me.txtbillnumber)
- Me.GroupBox1.Controls.Add(Me.txtPsCenter)
- Me.GroupBox1.Controls.Add(Me.txtBhy)
- Me.GroupBox1.Controls.Add(Me.txtBhType)
- 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.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(734, 153)
- Me.GroupBox1.TabIndex = 2
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "配送信息"
- '
- 'txthw
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txthw, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txthw, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txthw, "")
- Me.txthw.Location = New System.Drawing.Point(480, 104)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txthw, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txthw, "")
- Me.txthw.Name = "txthw"
- Me.txthw.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txthw, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txthw, False)
- Me.txthw.Size = New System.Drawing.Size(80, 25)
- Me.txthw.TabIndex = 49
- Me.txthw.Text = ""
- '
- 'Label23
- '
- Me.Label23.AutoSize = True
- Me.Label23.Location = New System.Drawing.Point(440, 112)
- Me.Label23.Name = "Label23"
- Me.Label23.Size = New System.Drawing.Size(52, 21)
- Me.Label23.TabIndex = 47
- Me.Label23.Text = "货位:"
- '
- 'txtPsMedName
- '
- Me.txtPsMedName.Location = New System.Drawing.Point(96, 64)
- Me.txtPsMedName.Name = "txtPsMedName"
- Me.txtPsMedName.Size = New System.Drawing.Size(136, 23)
- Me.txtPsMedName.TabIndex = 45
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(24, 72)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(83, 21)
- Me.Label12.TabIndex = 44
- Me.Label12.Text = "配送对象:"
- '
- 'Label4
- '
- Me.Label4.Location = New System.Drawing.Point(0, 0)
- Me.Label4.Name = "Label4"
- Me.Label4.TabIndex = 46
- '
- 'txtBhNumber
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtBhNumber, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtBhNumber, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtBhNumber, "")
- Me.txtBhNumber.Location = New System.Drawing.Point(560, 24)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtBhNumber, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtBhNumber, "")
- Me.txtBhNumber.Name = "txtBhNumber"
- Me.txtBhNumber.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtBhNumber, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtBhNumber, False)
- Me.txtBhNumber.Size = New System.Drawing.Size(152, 25)
- Me.txtBhNumber.TabIndex = 41
- Me.txtBhNumber.Text = ""
- '
- 'txtshy
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtshy, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtshy, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtshy, "")
- Me.txtshy.Location = New System.Drawing.Point(560, 62)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtshy, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtshy, "")
- Me.txtshy.Name = "txtshy"
- Me.txtshy.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtshy, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtshy, False)
- Me.txtshy.Size = New System.Drawing.Size(152, 25)
- Me.txtshy.TabIndex = 40
- Me.txtshy.Text = ""
- '
- 'txtbillnumber
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtbillnumber, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtbillnumber, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtbillnumber, "")
- Me.txtbillnumber.Location = New System.Drawing.Point(85, 24)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtbillnumber, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtbillnumber, "")
- Me.txtbillnumber.Name = "txtbillnumber"
- Me.txtbillnumber.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtbillnumber, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtbillnumber, False)
- Me.txtbillnumber.Size = New System.Drawing.Size(147, 25)
- Me.txtbillnumber.TabIndex = 39
- Me.txtbillnumber.Text = ""
- '
- 'txtPsCenter
- '
- Me.txtPsCenter.Location = New System.Drawing.Point(96, 103)
- Me.txtPsCenter.Name = "txtPsCenter"
- Me.txtPsCenter.Size = New System.Drawing.Size(136, 23)
- Me.txtPsCenter.TabIndex = 38
- '
- 'txtBhy
- '
- Me.txtBhy.Location = New System.Drawing.Point(328, 104)
- Me.txtBhy.Name = "txtBhy"
- Me.txtBhy.Size = New System.Drawing.Size(88, 23)
- Me.txtBhy.TabIndex = 36
- '
- 'txtBhType
- '
- Me.txtBhType.Location = New System.Drawing.Point(328, 62)
- Me.txtBhType.Name = "txtBhType"
- Me.txtBhType.Size = New System.Drawing.Size(136, 23)
- Me.txtBhType.TabIndex = 35
- '
- 'txtBhDate
- '
- Me.txtBhDate.Location = New System.Drawing.Point(328, 24)
- Me.txtBhDate.Name = "txtBhDate"
- Me.txtBhDate.Size = New System.Drawing.Size(136, 25)
- Me.txtBhDate.TabIndex = 34
- '
- 'txtSum
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtSum, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtSum, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtSum, "")
- Me.txtSum.Location = New System.Drawing.Point(640, 104)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtSum, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtSum, "")
- Me.txtSum.Name = "txtSum"
- Me.txtSum.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtSum, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtSum, False)
- Me.txtSum.Size = New System.Drawing.Size(72, 25)
- Me.txtSum.TabIndex = 33
- Me.txtSum.Text = ""
- '
- 'Label21
- '
- Me.Label21.AutoSize = True
- Me.Label21.ForeColor = System.Drawing.Color.Red
- Me.Label21.Location = New System.Drawing.Point(568, 112)
- Me.Label21.Name = "Label21"
- Me.Label21.RightToLeft = System.Windows.Forms.RightToLeft.No
- Me.Label21.Size = New System.Drawing.Size(83, 21)
- Me.Label21.TabIndex = 32
- Me.Label21.Text = "合计金额:"
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(504, 72)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(67, 21)
- Me.Label8.TabIndex = 31
- Me.Label8.Text = "审核员:"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(272, 113)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(67, 21)
- Me.Label7.TabIndex = 30
- Me.Label7.Text = "配送员:"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(256, 72)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(83, 21)
- Me.Label6.TabIndex = 29
- Me.Label6.Text = "配送状态:"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(21, 113)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(83, 21)
- Me.Label5.TabIndex = 28
- Me.Label5.Text = "配送中心:"
- Me.Label5.TextAlign = System.Drawing.ContentAlignment.TopRight
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(488, 32)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(83, 21)
- Me.Label3.TabIndex = 26
- Me.Label3.Text = "补货票号:"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(256, 31)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(83, 21)
- Me.Label2.TabIndex = 25
- Me.Label2.Text = "配货日期:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(37, 32)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(52, 21)
- Me.Label1.TabIndex = 24
- Me.Label1.Text = "票号:"
- Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopRight
- '
- 'ErrorProvider1
- '
- Me.ErrorProvider1.ContainerControl = Me
- '
- 'MsdnTextboxValidator1
- '
- Me.MsdnTextboxValidator1.DisplayControl = Nothing
- Me.MsdnTextboxValidator1.ErrorProvider = Nothing
- Me.MsdnTextboxValidator1.InvalidBackColor = System.Drawing.Color.Empty
- Me.MsdnTextboxValidator1.TooltipProvider = Nothing
- '
- 'txtPackage
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtPackage, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtPackage, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtPackage, "")
- Me.txtPackage.Location = New System.Drawing.Point(656, 104)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtPackage, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtPackage, "")
- Me.txtPackage.Name = "txtPackage"
- Me.txtPackage.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtPackage, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtPackage, False)
- Me.txtPackage.Size = New System.Drawing.Size(56, 25)
- Me.txtPackage.TabIndex = 74
- Me.txtPackage.Text = ""
- '
- 'txtUnit
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtUnit, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtUnit, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtUnit, "")
- Me.txtUnit.Location = New System.Drawing.Point(656, 62)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtUnit, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtUnit, "")
- Me.txtUnit.Name = "txtUnit"
- Me.txtUnit.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtUnit, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtUnit, False)
- Me.txtUnit.Size = New System.Drawing.Size(56, 25)
- Me.txtUnit.TabIndex = 73
- Me.txtUnit.Text = ""
- '
- 'txtNo
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtNo, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtNo, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtNo, "")
- Me.txtNo.Location = New System.Drawing.Point(96, 62)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtNo, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtNo, "")
- Me.txtNo.Name = "txtNo"
- Me.txtNo.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtNo, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtNo, False)
- Me.txtNo.Size = New System.Drawing.Size(40, 25)
- Me.txtNo.TabIndex = 71
- Me.txtNo.Text = ""
- '
- 'txtProduct
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtProduct, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtProduct, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtProduct, "")
- Me.txtProduct.Location = New System.Drawing.Point(331, 103)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtProduct, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtProduct, "")
- Me.txtProduct.Name = "txtProduct"
- Me.txtProduct.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtProduct, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtProduct, False)
- Me.txtProduct.Size = New System.Drawing.Size(128, 25)
- Me.txtProduct.TabIndex = 67
- Me.txtProduct.Text = ""
- '
- 'txtAvaid
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtAvaid, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtAvaid, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtAvaid, "")
- Me.txtAvaid.Location = New System.Drawing.Point(528, 103)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtAvaid, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtAvaid, "")
- Me.txtAvaid.Name = "txtAvaid"
- Me.txtAvaid.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtAvaid, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtAvaid, False)
- Me.txtAvaid.Size = New System.Drawing.Size(72, 25)
- Me.txtAvaid.TabIndex = 66
- Me.txtAvaid.Text = ""
- '
- 'txtBatch
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtBatch, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtBatch, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtBatch, "")
- Me.txtBatch.Location = New System.Drawing.Point(96, 103)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtBatch, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtBatch, "")
- Me.txtBatch.Name = "txtBatch"
- Me.txtBatch.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtBatch, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtBatch, False)
- Me.txtBatch.Size = New System.Drawing.Size(152, 25)
- Me.txtBatch.TabIndex = 65
- Me.txtBatch.Text = ""
- '
- 'txtMoney
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtMoney, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtMoney, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtMoney, "")
- Me.txtMoney.Location = New System.Drawing.Point(528, 62)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtMoney, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtMoney, "")
- Me.txtMoney.Name = "txtMoney"
- Me.txtMoney.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtMoney, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtMoney, False)
- Me.txtMoney.Size = New System.Drawing.Size(72, 25)
- Me.txtMoney.TabIndex = 63
- Me.txtMoney.Text = "0.00"
- '
- 'txtPrice
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtPrice, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtPrice, MSDNTextboxValidator.DataTypeConstants.DecimalType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtPrice, "")
- Me.txtPrice.Location = New System.Drawing.Point(331, 62)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtPrice, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtPrice, "")
- Me.txtPrice.Name = "txtPrice"
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtPrice, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtPrice, False)
- Me.txtPrice.Size = New System.Drawing.Size(128, 25)
- Me.txtPrice.TabIndex = 62
- Me.txtPrice.Text = "0.00"
- '
- 'txtCount
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtCount, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtCount, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtCount, "")
- Me.txtCount.Location = New System.Drawing.Point(192, 62)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtCount, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtCount, "")
- Me.txtCount.Name = "txtCount"
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtCount, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtCount, False)
- Me.txtCount.Size = New System.Drawing.Size(56, 25)
- Me.txtCount.TabIndex = 61
- Me.txtCount.Text = ""
- '
- 'txtMedRule
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtMedRule, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtMedRule, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtMedRule, "")
- Me.txtMedRule.Location = New System.Drawing.Point(616, 24)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtMedRule, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtMedRule, "")
- Me.txtMedRule.Name = "txtMedRule"
- Me.txtMedRule.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtMedRule, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtMedRule, False)
- Me.txtMedRule.Size = New System.Drawing.Size(96, 25)
- Me.txtMedRule.TabIndex = 59
- Me.txtMedRule.Text = ""
- '
- 'txtmedName
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtmedName, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtmedName, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtmedName, "")
- Me.txtmedName.Location = New System.Drawing.Point(331, 24)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtmedName, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtmedName, "")
- Me.txtmedName.Name = "txtmedName"
- Me.txtmedName.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtmedName, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtmedName, False)
- Me.txtmedName.Size = New System.Drawing.Size(200, 25)
- Me.txtmedName.TabIndex = 58
- Me.txtmedName.Text = ""
- '
- 'txtMedNumber
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtMedNumber, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtMedNumber, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtMedNumber, "")
- Me.txtMedNumber.Location = New System.Drawing.Point(96, 24)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtMedNumber, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtMedNumber, "")
- Me.txtMedNumber.Name = "txtMedNumber"
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtMedNumber, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtMedNumber, False)
- Me.txtMedNumber.Size = New System.Drawing.Size(152, 25)
- Me.txtMedNumber.TabIndex = 57
- Me.txtMedNumber.Text = ""
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.GroupBox2)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
- Me.Panel1.Location = New System.Drawing.Point(0, 197)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(734, 144)
- Me.Panel1.TabIndex = 6
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.txtPackage)
- Me.GroupBox2.Controls.Add(Me.txtUnit)
- Me.GroupBox2.Controls.Add(Me.Label22)
- Me.GroupBox2.Controls.Add(Me.txtNo)
- Me.GroupBox2.Controls.Add(Me.Label20)
- Me.GroupBox2.Controls.Add(Me.Label16)
- 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.Fill
- Me.GroupBox2.Location = New System.Drawing.Point(0, 0)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(734, 144)
- Me.GroupBox2.TabIndex = 6
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "药品信息"
- '
- 'Label22
- '
- Me.Label22.AutoSize = True
- Me.Label22.Location = New System.Drawing.Point(616, 72)
- Me.Label22.Name = "Label22"
- Me.Label22.Size = New System.Drawing.Size(52, 21)
- Me.Label22.TabIndex = 72
- Me.Label22.Text = "单位:"
- '
- 'Label20
- '
- Me.Label20.AutoSize = True
- Me.Label20.Location = New System.Drawing.Point(56, 72)
- Me.Label20.Name = "Label20"
- Me.Label20.Size = New System.Drawing.Size(52, 21)
- Me.Label20.TabIndex = 70
- Me.Label20.Text = "序号:"
- '
- 'Label16
- '
- Me.Label16.AutoSize = True
- Me.Label16.Location = New System.Drawing.Point(616, 113)
- Me.Label16.Name = "Label16"
- Me.Label16.Size = New System.Drawing.Size(52, 21)
- Me.Label16.TabIndex = 69
- Me.Label16.Text = "包装:"
- '
- 'Label19
- '
- Me.Label19.AutoSize = True
- Me.Label19.Location = New System.Drawing.Point(288, 113)
- Me.Label19.Name = "Label19"
- Me.Label19.Size = New System.Drawing.Size(52, 21)
- Me.Label19.TabIndex = 56
- Me.Label19.Text = "产地:"
- '
- 'Label18
- '
- Me.Label18.AutoSize = True
- Me.Label18.Location = New System.Drawing.Point(472, 113)
- Me.Label18.Name = "Label18"
- Me.Label18.Size = New System.Drawing.Size(67, 21)
- Me.Label18.TabIndex = 55
- Me.Label18.Text = "有效期:"
- '
- 'Label17
- '
- Me.Label17.AutoSize = True
- Me.Label17.Location = New System.Drawing.Point(56, 113)
- Me.Label17.Name = "Label17"
- Me.Label17.Size = New System.Drawing.Size(52, 21)
- Me.Label17.TabIndex = 54
- Me.Label17.Text = "批号:"
- '
- 'Label15
- '
- Me.Label15.AutoSize = True
- Me.Label15.ForeColor = System.Drawing.Color.Red
- Me.Label15.Location = New System.Drawing.Point(488, 72)
- Me.Label15.Name = "Label15"
- Me.Label15.Size = New System.Drawing.Size(52, 21)
- Me.Label15.TabIndex = 53
- Me.Label15.Text = "金额:"
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(288, 72)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(52, 21)
- Me.Label14.TabIndex = 52
- Me.Label14.Text = "单价:"
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(152, 72)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(52, 21)
- Me.Label13.TabIndex = 51
- Me.Label13.Text = "数量:"
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(544, 31)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(83, 21)
- Me.Label11.TabIndex = 50
- Me.Label11.Text = "药品规格:"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(260, 32)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(83, 21)
- Me.Label10.TabIndex = 49
- Me.Label10.Text = "药品名称:"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(24, 31)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(83, 21)
- Me.Label9.TabIndex = 48
- Me.Label9.Text = "药品编号:"
- '
- 'Panel2
- '
- Me.Panel2.Controls.Add(Me.dgview)
- Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel2.Location = New System.Drawing.Point(0, 341)
- Me.Panel2.Name = "Panel2"
- Me.Panel2.Size = New System.Drawing.Size(734, 353)
- Me.Panel2.TabIndex = 7
- '
- '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(734, 353)
- Me.dgview.TabIndex = 5
- '
- 'frmPsPst
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(734, 716)
- Me.Controls.Add(Me.Panel2)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.StatusBar1)
- Me.Controls.Add(Me.tbnPs)
- Me.Name = "frmPsPst"
- Me.Text = "门店配送登记"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.Panel2.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Public dslocals As New DataSet
- Public dslocal As DataSet = lsweb.returndataset("select BillNumber as 票号,BhDate as 日期,BhNumber as 补货票号,PsMedName as 配送对象,PsZt as 配送状态,Shy as 审核员,PsCenter as 配送中心,Psy as 配送员,Money as 金额,ysmoney as 应收金额 from PsPsdj", "PsPsdj")
- Public strSql As String
- Public s As Int16
- Private Sub frmPsPst_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Dim pscenterdr, psmednamedr, bhy As System.Data.SqlClient.SqlDataReader
- pscenterdr = lsweb.returnDataReader("select Cname from PsCenter")
- psmednamedr = lsweb.returnDataReader("select Cname from MdManager")
- bhy = lsweb.returnDataReader("select 操作员 from wz_mm")
- Do While pscenterdr.Read()
- txtPsCenter.Items.Add(pscenterdr("Cname"))
- Loop
- Do While psmednamedr.Read()
- txtPsMedName.Items.Add(psmednamedr("Cname"))
- Loop
- Do While bhy.Read()
- txtBhy.Items.Add(bhy("操作员"))
- Loop
-
- Dim frmpspfer As New frmPsPf
- If strSql = "" Then
- dslocals = lsweb.returndataset("select number as 序号,medNumber as 药品编号,medname as 药品名称,medrule as 药品规格,unit as 单位,Pfcount as 数量,price as 单价,money as 金额,batch as 批号,avaid as 有效期,product as 产地,package as 包装,billnumber as 票号,demo as 货位 from PsPsdjMx", "PsPsdjMx")
- dslocals.Clear()
- Me.Show()
- s = 0
- Else
- tbnAdd.Enabled = False
- Dim drlocals As System.Data.SqlClient.SqlDataReader
- drlocals = lsweb.returnDataReader("select * from PsPsdj where billnumber = '" & strSql.Substring(4, 16) & "' and psmedname='" & strSql.Substring(0, 4) & "'")
- Do While drlocals.Read()
- txtbillnumber.Text = lsweb.selectbill("PS").ToString.Trim()
- txtBhDate.Text = drlocals("BhDate")
- txtSum.Text = drlocals("Money")
- txtPsMedName.Text = drlocals("PsMedName")
- txtBhNumber.Text = drlocals("billnumber")
- txtshy.Text = drlocals("Shy")
- txtPsCenter.Text = drlocals("PsCenter")
- Loop
- dslocals = lsweb.returndataset("select number as 序号,medNumber as 药品编号,medname as 药品名称,medrule as 药品规格,unit as 单位,Pfcount as 数量,price as 单价,money as 金额,batch as 批号,avaid as 有效期,product as 产地,package as 包装,billnumber as 票号,demo as 货位 from PsPsdjMx where billnumber = '" & strSql.Substring(4, 16) & "' and psmedname='" & strSql.Substring(0, 4) & "'", "PsPsdjMx")
- dgview.DataSource = dslocals.Tables(0).DefaultView
- s = lsweb.maxNumber("select isnull(max(number),0) as 序号 from PsPsdjMx where billnumber = '" & strSql.Substring(4, 16) & "' and psmedname='" & strSql.Substring(0, 4) & "'")
- End If
- txtBhDate.Value() = Today().ToString()
- 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("PsPsdjMx").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("PsPsdjMx").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 = ""
- txtBatch.Text = ""
- End Sub
- Private Sub add()
- dslocals.Clear()
- txtBhDate.Value() = Today().ToString()
- txtbillnumber.Text = lsweb.selectbill("PS").ToString
- txtPsMedName.Text = ""
- txtBhType.Text = ""
- txtPsCenter.Text = ""
- txtBhy.Text = ""
- txthw.Text = ""
- txtNo.Text = "1"
- 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 = ""
- txtPsMedName.Focus()
- 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 tbnPs.ButtonClick
- Select Case e.Button.Text
- Case "添加"
- add()
- tbnEnable("tbnAdd.Enabled = False", tbnPs)
- Case "保存"
- If txtSum.Text = "" Then
- MessageBox.Show("信息不完整,保存失败!", "提示", MessageBoxButtons.OK)
- Else
- Dim dr As DataRow = dslocal.Tables("PsPsdj").NewRow()
- dr("票号") = Me.txtbillnumber.Text.Trim
- dr("日期") = Me.txtBhDate.Value
- dr("补货票号") = Me.txtBhNumber.Text.Trim
- dr("配送对象") = Me.txtPsMedName.Text.Trim
- dr("配送状态") = Me.txtBhType.Text.Trim
- dr("审核员") = Me.txtshy.Text.Trim
- dr("配送中心") = Me.txtPsCenter.Text.Trim
- dr("配送员") = Me.txtBhy.Text.Trim
- dr("金额") = Me.txtSum.Text.Trim
- dr("应收金额") = Me.txtSum.Text.Trim
- dslocal.Tables("PsPsdj").Rows.Add(dr)
- If lsweb.updatedataset("select number as 序号,medNumber as 药品编号,medname as 药品名称,medrule as 药品规格,unit as 单位,Pfcount as 数量,price as 单价,money as 金额,batch as 批号,avaid as 有效期,product as 产地,package as 包装,billnumber as 票号,demo as 货位 from PsPsdjMx", "PsPsdjMx", dslocals, DataRowState.Added) = True And lsweb.updatedataset("select BillNumber as 票号,BhDate as 日期,BhNumber as 补货票号,PsMedName as 配送对象,PsZt as 配送状态,Shy as 审核员,PsCenter as 配送中心,Psy as 配送员,Money as 金额,ysmoney as 应收金额 from PsPsdj", "PsPsdj", dslocal, DataRowState.Added) = True Then
- MessageBox.Show("销售信息成功保存!", "提示", MessageBoxButtons.OK)
- Else
- MessageBox.Show("销售信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
- End If
- tbnEnable("tbnSave.Enabled = False", tbnPs)
- End If
- Case "退出"
- Me.Close()
- End Select
- End Sub
- Private Sub txtPrice_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
- 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 System.Object, ByVal e As System.Windows.Forms.KeyEventArgs)
- If e.KeyCode = Keys.Enter Then
- txtPrice.Focus()
- End If
- End Sub
- Private Sub txtCount_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
- If txtCount.Text = String.Empty Then
- ErrorProvider1.SetError(txtCount, "不是数值类型且不能为空。")
- txtCount.Focus()
- Else
- ErrorProvider1.SetError(txtCount, "")
- End If
- End Sub
- Private Sub txtMedNumber_KeyDown1(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, "")
- txtCount.Focus()
- End If
- End If
- End Sub
- Private Sub txtPrice_KeyDown1(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("PsPsdjMx").Rows.Count < 1 Then
- i = 1
- Else
- i = i + 1
- End If
- txtNo.Text = CStr(i + s)
- Dim dr As DataRow = dslocals.Tables("PsPsdjMx").NewRow()
- dr("序号") = CStr(i + s)
- 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("PsPsdjMx").Rows.Add(dr)
- txtMedNumber.Text = ""
- txtMedNumber.Focus()
- 'clear()
- CalMxMoney()
- CalTotalMoney()
- End If
- End If
- dgview.DataSource = dslocals.Tables("PsPsdjMx").DefaultView
- End Sub
- Private Sub txtPsMedName_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs)
-
- 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
- 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 txtCount_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtCount.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtPrice.Focus()
- End If
- End Sub
- Private Sub txtPsMedName_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
- If txtPsMedName.Text = String.Empty Then
- ErrorProvider1.SetError(txtPsMedName, "不能为空!")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtPsMedName, "")
- End If
- End Sub
- Private Sub txtBhType_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtBhType.Validating
- If txtBhType.Text = String.Empty Then
- ErrorProvider1.SetError(txtBhType, "不能为空!")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtBhType, "")
- End If
- End Sub
- Private Sub txtPsCenter_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPsCenter.Validating
- If txtPsCenter.Text = String.Empty Then
- ErrorProvider1.SetError(txtPsCenter, "不能为空!")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtPsCenter, "")
- End If
- End Sub
- Private Sub txtBhy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtBhy.Validating
- If txtBhy.Text = String.Empty Then
- ErrorProvider1.SetError(txtBhy, "不能为空!")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtBhy, "")
- 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_Validating1(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, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtCount, "")
- End If
- End Sub
- Private Sub txtPrice_Validating1(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 frmPsPst_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 txtBhy_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBhy.SelectedIndexChanged
- End Sub
- Private Sub txthw_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
- End Sub
- Private Sub txthw_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs)
-
- End Sub
- Private Sub txthw_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
- If txthw.Text = String.Empty Then
- ErrorProvider1.SetError(txthw, "不能为空!")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txthw, "")
- 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_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPsMedName.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtBhType.Focus()
- End If
- End Sub
- Private Sub txthw_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txthw.TextChanged
- End Sub
- Private Sub txthw_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txthw.KeyDown
- End Sub
- Private Sub txtMedNumber_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMedNumber.TextChanged
- End Sub
- End Class