frmPd.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:33k
- Public Class frmPd
- 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 tbrpd As System.Windows.Forms.ToolBar
- Friend WithEvents tbrAdd As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbrSave As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbrPrint As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbrsp As System.Windows.Forms.ToolBarButton
- Friend WithEvents tbrExit As System.Windows.Forms.ToolBarButton
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents Label13 As System.Windows.Forms.Label
- Friend WithEvents txtBillnumber As System.Windows.Forms.TextBox
- Friend WithEvents txtDate As System.Windows.Forms.DateTimePicker
- Friend WithEvents MsdnTextboxValidator1 As MSDNTextboxValidator.MSDNTextboxValidator
- Friend WithEvents txtSzy As System.Windows.Forms.TextBox
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtProduct 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 txtUnit As System.Windows.Forms.TextBox
- Friend WithEvents txtMedName As System.Windows.Forms.TextBox
- Friend WithEvents txtMedNumber As System.Windows.Forms.TextBox
- Friend WithEvents txtNo As System.Windows.Forms.TextBox
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- 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 Panel2 As System.Windows.Forms.Panel
- Friend WithEvents dgPd As System.Windows.Forms.DataGrid
- 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(frmPd))
- Me.tbrpd = New System.Windows.Forms.ToolBar
- Me.tbrAdd = New System.Windows.Forms.ToolBarButton
- Me.tbrSave = New System.Windows.Forms.ToolBarButton
- Me.tbrPrint = New System.Windows.Forms.ToolBarButton
- Me.tbrsp = New System.Windows.Forms.ToolBarButton
- Me.tbrExit = New System.Windows.Forms.ToolBarButton
- Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
- Me.StatusBar1 = New System.Windows.Forms.StatusBar
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.txtSzy = New System.Windows.Forms.TextBox
- Me.txtBillnumber = New System.Windows.Forms.TextBox
- Me.txtDate = New System.Windows.Forms.DateTimePicker
- Me.Label13 = New System.Windows.Forms.Label
- Me.Label12 = New System.Windows.Forms.Label
- Me.Label11 = New System.Windows.Forms.Label
- Me.MsdnTextboxValidator1 = New MSDNTextboxValidator.MSDNTextboxValidator(Me.components)
- Me.txtProduct = 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.txtUnit = New System.Windows.Forms.TextBox
- Me.txtMedName = New System.Windows.Forms.TextBox
- Me.txtMedNumber = New System.Windows.Forms.TextBox
- Me.txtNo = New System.Windows.Forms.TextBox
- Me.Panel1 = New System.Windows.Forms.Panel
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.Label10 = New System.Windows.Forms.Label
- Me.Label9 = 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.Panel2 = New System.Windows.Forms.Panel
- Me.dgPd = New System.Windows.Forms.DataGrid
- Me.GroupBox2.SuspendLayout()
- Me.Panel1.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.Panel2.SuspendLayout()
- CType(Me.dgPd, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'tbrpd
- '
- Me.tbrpd.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.tbrpd.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbrAdd, Me.tbrSave, Me.tbrPrint, Me.tbrsp, Me.tbrExit})
- Me.tbrpd.DropDownArrows = True
- Me.tbrpd.ImageList = Me.ImageList2
- Me.tbrpd.Location = New System.Drawing.Point(0, 0)
- Me.tbrpd.Name = "tbrpd"
- Me.tbrpd.ShowToolTips = True
- Me.tbrpd.Size = New System.Drawing.Size(681, 41)
- Me.tbrpd.TabIndex = 0
- '
- 'tbrAdd
- '
- Me.tbrAdd.ImageIndex = 7
- Me.tbrAdd.Text = "添加"
- '
- 'tbrSave
- '
- Me.tbrSave.ImageIndex = 4
- Me.tbrSave.Text = "保存"
- '
- 'tbrPrint
- '
- Me.tbrPrint.ImageIndex = 12
- Me.tbrPrint.Text = "打印"
- '
- 'tbrsp
- '
- Me.tbrsp.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
- '
- 'tbrExit
- '
- Me.tbrExit.ImageIndex = 11
- Me.tbrExit.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, 382)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(681, 18)
- Me.StatusBar1.TabIndex = 1
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.txtSzy)
- Me.GroupBox2.Controls.Add(Me.txtBillnumber)
- Me.GroupBox2.Controls.Add(Me.txtDate)
- Me.GroupBox2.Controls.Add(Me.Label13)
- Me.GroupBox2.Controls.Add(Me.Label12)
- Me.GroupBox2.Controls.Add(Me.Label11)
- Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox2.Location = New System.Drawing.Point(0, 41)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(681, 49)
- Me.GroupBox2.TabIndex = 4
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "票据信息"
- '
- 'txtSzy
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtSzy, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtSzy, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtSzy, "")
- Me.txtSzy.Location = New System.Drawing.Point(56, 19)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtSzy, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtSzy, "")
- Me.txtSzy.Name = "txtSzy"
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtSzy, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtSzy, False)
- Me.txtSzy.TabIndex = 6
- Me.txtSzy.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(486, 19)
- 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(174, 21)
- Me.txtBillnumber.TabIndex = 5
- Me.txtBillnumber.Text = ""
- '
- 'txtDate
- '
- Me.txtDate.Location = New System.Drawing.Point(222, 19)
- Me.txtDate.Name = "txtDate"
- Me.txtDate.Size = New System.Drawing.Size(138, 21)
- Me.txtDate.TabIndex = 4
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(456, 25)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(42, 17)
- Me.Label13.TabIndex = 2
- Me.Label13.Text = "票号:"
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(192, 25)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(42, 17)
- Me.Label12.TabIndex = 1
- Me.Label12.Text = "日期:"
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(6, 25)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(54, 17)
- Me.Label11.TabIndex = 0
- Me.Label11.Text = "操作员:"
- '
- 'MsdnTextboxValidator1
- '
- Me.MsdnTextboxValidator1.DisplayControl = Nothing
- Me.MsdnTextboxValidator1.ErrorProvider = Nothing
- Me.MsdnTextboxValidator1.InvalidBackColor = System.Drawing.Color.Empty
- Me.MsdnTextboxValidator1.TooltipProvider = Nothing
- '
- '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(552, 37)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtProduct, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtProduct, "")
- Me.txtProduct.Name = "txtProduct"
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtProduct, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtProduct, False)
- Me.txtProduct.Size = New System.Drawing.Size(108, 21)
- Me.txtProduct.TabIndex = 19
- Me.txtProduct.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(468, 37)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtBatch, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtBatch, "")
- Me.txtBatch.Name = "txtBatch"
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtBatch, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtBatch, False)
- Me.txtBatch.Size = New System.Drawing.Size(75, 21)
- Me.txtBatch.TabIndex = 18
- 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(402, 37)
- 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(60, 21)
- Me.txtMoney.TabIndex = 17
- Me.txtMoney.Text = ""
- '
- 'txtPrice
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtPrice, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtPrice, MSDNTextboxValidator.DataTypeConstants.StringType)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtPrice, "")
- Me.txtPrice.Location = New System.Drawing.Point(336, 37)
- Me.MsdnTextboxValidator1.SetMaxValue(Me.txtPrice, "")
- Me.MsdnTextboxValidator1.SetMinValue(Me.txtPrice, "")
- Me.txtPrice.Name = "txtPrice"
- Me.txtPrice.ReadOnly = True
- Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtPrice, "")
- Me.MsdnTextboxValidator1.SetRequired(Me.txtPrice, False)
- Me.txtPrice.Size = New System.Drawing.Size(60, 21)
- Me.txtPrice.TabIndex = 16
- Me.txtPrice.Text = ""
- '
- 'txtCount
- '
- Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtCount, True)
- Me.MsdnTextboxValidator1.SetDataType(Me.txtCount, MSDNTextboxValidator.DataTypeConstants.Int16Type)
- Me.MsdnTextboxValidator1.SetDisplayName(Me.txtCount, "")
- Me.txtCount.Location = New System.Drawing.Point(282, 37)
- 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(48, 21)
- Me.txtCount.TabIndex = 15
- Me.txtCount.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(246, 37)
- 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(30, 21)
- Me.txtUnit.TabIndex = 14
- Me.txtUnit.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(114, 37)
- 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(126, 21)
- Me.txtMedName.TabIndex = 12
- 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(48, 37)
- 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(60, 21)
- Me.txtMedNumber.TabIndex = 11
- Me.txtMedNumber.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(6, 37)
- 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(36, 21)
- Me.txtNo.TabIndex = 10
- Me.txtNo.Text = "1"
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.GroupBox1)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
- Me.Panel1.Location = New System.Drawing.Point(0, 90)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(681, 86)
- Me.Panel1.TabIndex = 5
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtProduct)
- Me.GroupBox1.Controls.Add(Me.txtBatch)
- Me.GroupBox1.Controls.Add(Me.txtMoney)
- Me.GroupBox1.Controls.Add(Me.txtPrice)
- Me.GroupBox1.Controls.Add(Me.txtCount)
- Me.GroupBox1.Controls.Add(Me.txtUnit)
- Me.GroupBox1.Controls.Add(Me.txtMedName)
- Me.GroupBox1.Controls.Add(Me.txtMedNumber)
- Me.GroupBox1.Controls.Add(Me.txtNo)
- Me.GroupBox1.Controls.Add(Me.Label10)
- Me.GroupBox1.Controls.Add(Me.Label9)
- 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.Fill
- Me.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(681, 86)
- Me.GroupBox1.TabIndex = 3
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "盘点库存信息"
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(576, 19)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(29, 17)
- Me.Label10.TabIndex = 9
- Me.Label10.Text = "摘要"
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(492, 19)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(29, 17)
- Me.Label9.TabIndex = 8
- Me.Label9.Text = "批号"
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(420, 19)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(29, 17)
- Me.Label8.TabIndex = 7
- Me.Label8.Text = "金额"
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(354, 19)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(29, 17)
- Me.Label7.TabIndex = 6
- Me.Label7.Text = "进价"
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(294, 19)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(29, 17)
- Me.Label6.TabIndex = 5
- Me.Label6.Text = "数量"
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(246, 19)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(29, 17)
- Me.Label5.TabIndex = 4
- Me.Label5.Text = "单位"
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(156, 19)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(54, 17)
- Me.Label3.TabIndex = 2
- Me.Label3.Text = "药品名称"
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(54, 19)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(54, 17)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "药品编号"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(12, 19)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(29, 17)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "序号"
- '
- 'Panel2
- '
- Me.Panel2.Controls.Add(Me.dgPd)
- Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel2.Location = New System.Drawing.Point(0, 176)
- Me.Panel2.Name = "Panel2"
- Me.Panel2.Size = New System.Drawing.Size(681, 206)
- Me.Panel2.TabIndex = 6
- '
- 'dgPd
- '
- Me.dgPd.AlternatingBackColor = System.Drawing.Color.Gainsboro
- Me.dgPd.BackColor = System.Drawing.Color.Silver
- Me.dgPd.BackgroundColor = System.Drawing.Color.Silver
- Me.dgPd.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
- Me.dgPd.CaptionBackColor = System.Drawing.Color.DarkSlateBlue
- Me.dgPd.CaptionFont = New System.Drawing.Font("Tahoma", 8.0!)
- Me.dgPd.CaptionForeColor = System.Drawing.Color.White
- Me.dgPd.CaptionVisible = False
- Me.dgPd.DataMember = ""
- Me.dgPd.Dock = System.Windows.Forms.DockStyle.Fill
- Me.dgPd.FlatMode = True
- Me.dgPd.ForeColor = System.Drawing.Color.Black
- Me.dgPd.GridLineColor = System.Drawing.Color.White
- Me.dgPd.HeaderBackColor = System.Drawing.Color.DarkGray
- Me.dgPd.HeaderForeColor = System.Drawing.Color.Black
- Me.dgPd.LinkColor = System.Drawing.Color.DarkSlateBlue
- Me.dgPd.Location = New System.Drawing.Point(0, 0)
- Me.dgPd.Name = "dgPd"
- Me.dgPd.ParentRowsBackColor = System.Drawing.Color.Black
- Me.dgPd.ParentRowsForeColor = System.Drawing.Color.White
- Me.dgPd.RowHeadersVisible = False
- Me.dgPd.SelectionBackColor = System.Drawing.Color.DarkSlateBlue
- Me.dgPd.SelectionForeColor = System.Drawing.Color.White
- Me.dgPd.Size = New System.Drawing.Size(681, 206)
- Me.dgPd.TabIndex = 4
- '
- 'frmPd
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(681, 400)
- Me.Controls.Add(Me.Panel2)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.StatusBar1)
- Me.Controls.Add(Me.tbrpd)
- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
- Me.Name = "frmPd"
- Me.Text = "库存盘点"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox2.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- Me.GroupBox1.ResumeLayout(False)
- Me.Panel2.ResumeLayout(False)
- CType(Me.dgPd, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public bool As Boolean
- Public lswebpd As New jxcmanage
- Public dslocalpd As DataSet = lswebpd.returndataset("select 序号,药品编号,药品名称,单位,进价,数量,金额,批号,货位,日期,票号,操作员 from wz_pd", "wz_pd")
- Public Function getinfo(ByVal strqueryid As String) As String
- Dim strOrderId As String
- strOrderId = strqueryid
- Return strOrderId
- End Function
- Private Sub frmPd_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- dslocalpd.Clear()
- dgPd.DataSource = dslocalpd.Tables("wz_pd").DefaultView
- Dim frmloginer As New frmLogin
- txtSzy.Text = frmloginer.struser
- txtDate.Value = Today.ToString
- End Sub
- Private Sub add()
- dslocalpd.Clear()
- txtBillnumber.Text = lswebpd.selectbill("PD").ToString
- txtNo.Text = 1
- txtMedNumber.Text = ""
- txtMedNumber.Focus()
- txtMedName.Text() = ""
- txtUnit.Text() = ""
- txtPrice.Text() = 0.0
- txtCount.Text() = 0
- txtBatch.Text() = ""
- txtProduct.Text() = ""
- End Sub
- Private Sub CalMxMoney()
- Dim price As Double = CType(txtPrice.Text, Double)
- Dim count As Int16 = CInt(txtCount.Text)
- Me.txtMoney.Text = (price * count).ToString
- End Sub
- Private Sub cboczy_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs)
- If e.KeyCode = Keys.Enter Then
- Me.txtMedNumber.Focus()
- End If
- End Sub
- Private Sub txtCount_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs)
- If Trim(Me.txtCount.Text) = "" Then
- MessageBox.Show("请输入数量!", "提示", MessageBoxButtons.OK)
- Me.txtCount.Focus()
- Exit Sub
- End If
- If IsNumeric(Me.txtCount.Text) = False Then
- MessageBox.Show("数量输入错误", "提示", MessageBoxButtons.OK)
- Me.txtCount.Focus()
- Exit Sub
- End If
- End Sub
- Private Sub clear()
- txtDate.Enabled = False
- txtBillnumber.ReadOnly = True
- txtNo.ReadOnly = True
- txtMedNumber.Text = ""
- txtMedName.Text() = ""
- txtUnit.Text() = ""
- txtPrice.Text() = 0.0
- txtCount.Text() = 0
- txtBatch.Text() = ""
- txtProduct.Text() = ""
- End Sub
- Private Sub txtBatch_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs)
- If Trim(Me.txtBatch.Text) = "" Then
- MessageBox.Show("请输入数量!", "提示", MessageBoxButtons.OK)
- Me.txtBatch.Focus()
- Exit Sub
- End If
- End Sub
- Private Sub save()
- If lswebpd.updatedataset("select 序号,药品编号,药品名称,单位,进价,数量,金额,批号,货位,日期,票号,操作员 from wz_pd", "wz_pd", dslocalpd, 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 = "tbrAdd.Enabled = True" Then
- tbrSave.Enabled = False
- tbrPrint.Enabled = False
- tbrExit.Enabled = True
- ElseIf strboolean = "tbrAdd.Enabled = False" Then
- tbrAdd.Enabled = False
- tbrSave.Enabled = True
- tbrPrint.Enabled = True
- tbrExit.Enabled = True
- ElseIf strboolean = "tbrSave.Enabled = True" Then
- tbrAdd.Enabled = False
- tbrPrint.Enabled = True
- tbrExit.Enabled = True
- ElseIf strboolean = "tbrSave.Enabled = False" Then
- tbrSave.Enabled = False
- tbrAdd.Enabled = True
- tbrPrint.Enabled = True
- tbrExit.Enabled = True
- End If
- End Sub
- Private Sub tbrpd_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbrpd.ButtonClick
- Select Case e.Button.Text
- Case "添加"
- bool = False
- tbnEnable("tbrAdd.Enabled = False", tbrpd)
- add()
- Case "保存"
- bool = True
- tbnEnable("tbrSave.Enabled = False", tbrpd)
- save()
- Case "打印"
- Dim frmviewpder As New frmviewpd
- frmviewpder.Show()
- Case "退出"
- Me.Close()
-
- End Select
- 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 dlgs As frmMedKcQuery = New frmMedKcQuery
- dlgs.PYMs = Me.getinfo(txtMedNumber.Text)
- dlgs.ShowDialog()
- Dim medIdvalue, medbatch, hw As String
- medIdvalue = dlgs.GetInfo("药品编号")
- medbatch = dlgs.GetInfo("批号")
- hw = dlgs.GetInfo("货位")
- If medIdvalue Is Nothing Then
- MessageBox.Show("没有查到记录,请重新开始!")
- Else
- Dim runSqlQuery As String
- runSqlQuery = "select * from wz_kc where 药品编号='" & medIdvalue & "'and 批号 ='" & medbatch & "' and wz_kc.货位='" & hw & "'"
- Dim dv As DataView
- ' Dim mOrderId As New managers
- '调用mCustomId对象的SPcustomersID函数
- Dim dtOrder As DataTable = lswebpd.runSql(runSqlQuery).Tables(0)
- 'bb为一随意表名
- dtOrder.TableName = "bb"
- dv = dtOrder.DefaultView
- txtMedNumber.Text = dv(0)("药品编号")
- txtMedName.Text = dv(0)("药品名称")
- txtUnit.Text = dv(0)("单位")
- txtPrice.Text = dv(0)("进价")
- txtBatch.Text = dv(0)("批号")
- txtProduct.Text = dv(0)("货位")
- End If
- txtCount.Focus()
- End If
- End Sub
- Private Sub txtProduct_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtProduct.KeyDown
- If e.KeyCode = Keys.Enter Then
- Static i As Int16
- If dslocalpd.Tables("wz_pd").Rows.Count < 1 Then
- i = 1
- Else
- i = i + 1
- End If
- txtNo.Text = CStr(i)
- Dim dr As DataRow = dslocalpd.Tables("wz_pd").NewRow()
- dr("序号") = CInt(Me.txtNo.Text.Trim)
- dr("药品编号") = Me.txtMedNumber.Text.Trim
- dr("药品名称") = Me.txtMedName.Text.Trim
- dr("单位") = Me.txtUnit.Text.Trim
- dr("进价") = CDec(Me.txtPrice.Text.Trim)
- dr("数量") = Me.txtCount.Text.Trim
- dr("金额") = CDec(Me.txtPrice.Text.Trim) * CInt(Me.txtCount.Text.Trim)
- dr("批号") = Me.txtBatch.Text.Trim
- dr("日期") = Me.txtDate.Text.Trim
- dr("票号") = Me.txtBillnumber.Text.Trim
- dr("货位") = Me.txtProduct.Text.Trim
- dr("操作员") = Me.txtSzy.Text.Trim
- dslocalpd.Tables("wz_pd").Rows.Add(dr)
- clear()
- Me.txtMedNumber.Focus()
- End If
- dgPd.DataSource = dslocalpd.Tables("wz_pd").DefaultView
- 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
- Me.txtBatch.Focus()
- CalMxMoney()
- End If
- End Sub
- Private Sub txtBatch_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtBatch.KeyDown
- If e.KeyCode = Keys.Enter Then
- Me.txtProduct.Focus()
- End If
- End Sub
- Private Sub frmPd_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
- If txtBillnumber.Text <> String.Empty And tbrSave.Enabled = True Then
- lswebpd.cancelbill(txtBillnumber.Text.Trim)
- End If
- End Sub
- End Class