frmKcCs.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:39k
- Public Class frmKcCs
- Inherits System.Windows.Forms.Form
- #Region " Windows 窗体设计器生成的代码 "
- Public Sub New()
- MyBase.New()
- '该调用是 Windows 窗体设计器所必需的。
- InitializeComponent()
- '在 InitializeComponent() 调用之后添加任何初始化
- End Sub
- '窗体重写 dispose 以清理组件列表。
- Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing Then
- If Not (components Is Nothing) Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(disposing)
- End Sub
- 'Windows 窗体设计器所必需的
- Private components As System.ComponentModel.IContainer
- '注意: 以下过程是 Windows 窗体设计器所必需的
- '可以使用 Windows 窗体设计器修改此过程。
- '不要使用代码编辑器修改它。
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents cbohw As System.Windows.Forms.ComboBox
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- 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 Label9 As System.Windows.Forms.Label
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents Label13 As System.Windows.Forms.Label
- Friend WithEvents Label14 As System.Windows.Forms.Label
- Friend WithEvents Label15 As System.Windows.Forms.Label
- Friend WithEvents Label16 As System.Windows.Forms.Label
- Friend WithEvents Label17 As System.Windows.Forms.Label
- Friend WithEvents txtDate As System.Windows.Forms.DateTimePicker
- Friend WithEvents txtRule As System.Windows.Forms.TextBox
- Friend WithEvents txtName As System.Windows.Forms.TextBox
- Friend WithEvents txtUnit As System.Windows.Forms.TextBox
- Friend WithEvents txtCount As System.Windows.Forms.TextBox
- Friend WithEvents txtJJ As System.Windows.Forms.TextBox
- Friend WithEvents txtBatch As System.Windows.Forms.TextBox
- Friend WithEvents txtHy As System.Windows.Forms.TextBox
- Friend WithEvents txtZprice As System.Windows.Forms.TextBox
- Friend WithEvents txtJprice As System.Windows.Forms.TextBox
- Friend WithEvents txtLprice As System.Windows.Forms.TextBox
- Friend WithEvents txtPprice As System.Windows.Forms.TextBox
- Friend WithEvents Label18 As System.Windows.Forms.Label
- 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 Label19 As System.Windows.Forms.Label
- Friend WithEvents Label20 As System.Windows.Forms.Label
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
- Friend WithEvents txtNumber As System.Windows.Forms.TextBox
- Friend WithEvents txtavaid As System.Windows.Forms.TextBox
- Friend WithEvents txtaddress As System.Windows.Forms.TextBox
- Friend WithEvents cboczy As System.Windows.Forms.ComboBox
- Friend WithEvents txtNo As System.Windows.Forms.TextBox
- Friend WithEvents txtmoney As System.Windows.Forms.TextBox
- Friend WithEvents txtPackage As System.Windows.Forms.TextBox
- Friend WithEvents tbrcs As System.Windows.Forms.ToolBar
- Friend WithEvents tbnAdd As System.Windows.Forms.ToolBarButton
- Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmKcCs))
- Me.tbrcs = 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.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtNo = New System.Windows.Forms.TextBox
- Me.cboczy = New System.Windows.Forms.ComboBox
- Me.Label20 = New System.Windows.Forms.Label
- Me.Label19 = New System.Windows.Forms.Label
- Me.txtavaid = New System.Windows.Forms.TextBox
- Me.Label18 = New System.Windows.Forms.Label
- Me.txtZprice = New System.Windows.Forms.TextBox
- Me.Label14 = New System.Windows.Forms.Label
- Me.txtJprice = New System.Windows.Forms.TextBox
- Me.Label15 = New System.Windows.Forms.Label
- Me.txtLprice = New System.Windows.Forms.TextBox
- Me.Label16 = New System.Windows.Forms.Label
- Me.txtPprice = New System.Windows.Forms.TextBox
- Me.Label17 = New System.Windows.Forms.Label
- Me.txtHy = New System.Windows.Forms.TextBox
- Me.Label13 = New System.Windows.Forms.Label
- Me.txtaddress = New System.Windows.Forms.TextBox
- Me.Label12 = New System.Windows.Forms.Label
- Me.txtBatch = New System.Windows.Forms.TextBox
- Me.Label11 = New System.Windows.Forms.Label
- Me.txtmoney = New System.Windows.Forms.TextBox
- Me.Label10 = New System.Windows.Forms.Label
- Me.txtPackage = New System.Windows.Forms.TextBox
- Me.Label9 = New System.Windows.Forms.Label
- Me.txtJJ = New System.Windows.Forms.TextBox
- Me.Label8 = New System.Windows.Forms.Label
- Me.txtCount = New System.Windows.Forms.TextBox
- Me.Label7 = New System.Windows.Forms.Label
- Me.txtUnit = New System.Windows.Forms.TextBox
- Me.Label6 = New System.Windows.Forms.Label
- Me.txtName = New System.Windows.Forms.TextBox
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtRule = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.txtNumber = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.txtDate = New System.Windows.Forms.DateTimePicker
- Me.Label2 = New System.Windows.Forms.Label
- Me.cbohw = New System.Windows.Forms.ComboBox
- Me.Label1 = New System.Windows.Forms.Label
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
- Me.GroupBox1.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'tbrcs
- '
- Me.tbrcs.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.tbrcs.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnAdd, Me.tbnSave, Me.tbnPrint, Me.tbnExit})
- Me.tbrcs.DropDownArrows = True
- Me.tbrcs.ImageList = Me.ImageList2
- Me.tbrcs.Location = New System.Drawing.Point(0, 0)
- Me.tbrcs.Name = "tbrcs"
- Me.tbrcs.ShowToolTips = True
- Me.tbrcs.Size = New System.Drawing.Size(676, 41)
- Me.tbrcs.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
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtNo)
- Me.GroupBox1.Controls.Add(Me.cboczy)
- Me.GroupBox1.Controls.Add(Me.Label20)
- Me.GroupBox1.Controls.Add(Me.Label19)
- Me.GroupBox1.Controls.Add(Me.txtavaid)
- Me.GroupBox1.Controls.Add(Me.Label18)
- Me.GroupBox1.Controls.Add(Me.txtZprice)
- Me.GroupBox1.Controls.Add(Me.Label14)
- Me.GroupBox1.Controls.Add(Me.txtJprice)
- Me.GroupBox1.Controls.Add(Me.Label15)
- Me.GroupBox1.Controls.Add(Me.txtLprice)
- Me.GroupBox1.Controls.Add(Me.Label16)
- Me.GroupBox1.Controls.Add(Me.txtPprice)
- Me.GroupBox1.Controls.Add(Me.Label17)
- Me.GroupBox1.Controls.Add(Me.txtHy)
- Me.GroupBox1.Controls.Add(Me.Label13)
- Me.GroupBox1.Controls.Add(Me.txtaddress)
- Me.GroupBox1.Controls.Add(Me.Label12)
- Me.GroupBox1.Controls.Add(Me.txtBatch)
- Me.GroupBox1.Controls.Add(Me.Label11)
- Me.GroupBox1.Controls.Add(Me.txtmoney)
- Me.GroupBox1.Controls.Add(Me.Label10)
- Me.GroupBox1.Controls.Add(Me.txtPackage)
- Me.GroupBox1.Controls.Add(Me.Label9)
- Me.GroupBox1.Controls.Add(Me.txtJJ)
- Me.GroupBox1.Controls.Add(Me.Label8)
- Me.GroupBox1.Controls.Add(Me.txtCount)
- Me.GroupBox1.Controls.Add(Me.Label7)
- Me.GroupBox1.Controls.Add(Me.txtUnit)
- Me.GroupBox1.Controls.Add(Me.Label6)
- Me.GroupBox1.Controls.Add(Me.txtName)
- Me.GroupBox1.Controls.Add(Me.Label5)
- Me.GroupBox1.Controls.Add(Me.txtRule)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.txtNumber)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.GroupBox2)
- Me.GroupBox1.Controls.Add(Me.txtDate)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.cbohw)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox1.Location = New System.Drawing.Point(0, 41)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(676, 192)
- Me.GroupBox1.TabIndex = 1
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "初始化信息"
- '
- 'txtNo
- '
- Me.txtNo.Location = New System.Drawing.Point(594, 24)
- Me.txtNo.Name = "txtNo"
- Me.txtNo.ReadOnly = True
- Me.txtNo.Size = New System.Drawing.Size(56, 21)
- Me.txtNo.TabIndex = 42
- Me.txtNo.Text = ""
- '
- 'cboczy
- '
- Me.cboczy.Location = New System.Drawing.Point(456, 24)
- Me.cboczy.Name = "cboczy"
- Me.cboczy.Size = New System.Drawing.Size(84, 20)
- Me.cboczy.TabIndex = 41
- '
- 'Label20
- '
- Me.Label20.AutoSize = True
- Me.Label20.Location = New System.Drawing.Point(414, 32)
- Me.Label20.Name = "Label20"
- Me.Label20.Size = New System.Drawing.Size(54, 17)
- Me.Label20.TabIndex = 40
- Me.Label20.Text = "操作员:"
- '
- 'Label19
- '
- Me.Label19.AutoSize = True
- Me.Label19.Location = New System.Drawing.Point(564, 32)
- Me.Label19.Name = "Label19"
- Me.Label19.Size = New System.Drawing.Size(42, 17)
- Me.Label19.TabIndex = 39
- Me.Label19.Text = "序号:"
- '
- 'txtavaid
- '
- Me.txtavaid.Location = New System.Drawing.Point(456, 124)
- Me.txtavaid.Name = "txtavaid"
- Me.txtavaid.ReadOnly = True
- Me.txtavaid.Size = New System.Drawing.Size(84, 21)
- Me.txtavaid.TabIndex = 38
- Me.txtavaid.Text = ""
- '
- 'Label18
- '
- Me.Label18.AutoSize = True
- Me.Label18.Location = New System.Drawing.Point(414, 131)
- Me.Label18.Name = "Label18"
- Me.Label18.Size = New System.Drawing.Size(54, 17)
- Me.Label18.TabIndex = 37
- Me.Label18.Text = "有效期:"
- '
- 'txtZprice
- '
- Me.txtZprice.Location = New System.Drawing.Point(594, 156)
- Me.txtZprice.Name = "txtZprice"
- Me.txtZprice.Size = New System.Drawing.Size(72, 21)
- Me.txtZprice.TabIndex = 36
- Me.txtZprice.Text = ""
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(552, 162)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(54, 17)
- Me.Label14.TabIndex = 35
- Me.Label14.Text = "最低价:"
- '
- 'txtJprice
- '
- Me.txtJprice.Location = New System.Drawing.Point(456, 156)
- Me.txtJprice.Name = "txtJprice"
- Me.txtJprice.Size = New System.Drawing.Size(84, 21)
- Me.txtJprice.TabIndex = 34
- Me.txtJprice.Text = ""
- '
- 'Label15
- '
- Me.Label15.AutoSize = True
- Me.Label15.Location = New System.Drawing.Point(414, 162)
- Me.Label15.Name = "Label15"
- Me.Label15.Size = New System.Drawing.Size(54, 17)
- Me.Label15.TabIndex = 33
- Me.Label15.Text = "建议价:"
- '
- 'txtLprice
- '
- Me.txtLprice.Location = New System.Drawing.Point(246, 156)
- Me.txtLprice.Name = "txtLprice"
- Me.txtLprice.Size = New System.Drawing.Size(102, 21)
- Me.txtLprice.TabIndex = 32
- Me.txtLprice.Text = ""
- '
- 'Label16
- '
- Me.Label16.AutoSize = True
- Me.Label16.Location = New System.Drawing.Point(204, 162)
- Me.Label16.Name = "Label16"
- Me.Label16.Size = New System.Drawing.Size(54, 17)
- Me.Label16.TabIndex = 31
- Me.Label16.Text = "零售价:"
- '
- 'txtPprice
- '
- Me.txtPprice.Location = New System.Drawing.Point(72, 156)
- Me.txtPprice.Name = "txtPprice"
- Me.txtPprice.TabIndex = 30
- Me.txtPprice.Text = ""
- '
- 'Label17
- '
- Me.Label17.AutoSize = True
- Me.Label17.Location = New System.Drawing.Point(34, 162)
- Me.Label17.Name = "Label17"
- Me.Label17.Size = New System.Drawing.Size(54, 17)
- Me.Label17.TabIndex = 29
- Me.Label17.Text = "批发价:"
- '
- 'txtHy
- '
- Me.txtHy.Location = New System.Drawing.Point(246, 124)
- Me.txtHy.Name = "txtHy"
- Me.txtHy.Size = New System.Drawing.Size(144, 21)
- Me.txtHy.TabIndex = 28
- Me.txtHy.Text = ""
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(216, 131)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(42, 17)
- Me.Label13.TabIndex = 27
- Me.Label13.Text = "货源:"
- '
- 'txtaddress
- '
- Me.txtaddress.Location = New System.Drawing.Point(594, 124)
- Me.txtaddress.Name = "txtaddress"
- Me.txtaddress.ReadOnly = True
- Me.txtaddress.Size = New System.Drawing.Size(72, 21)
- Me.txtaddress.TabIndex = 26
- Me.txtaddress.Text = ""
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(564, 131)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(42, 17)
- Me.Label12.TabIndex = 25
- Me.Label12.Text = "产地:"
- '
- 'txtBatch
- '
- Me.txtBatch.Location = New System.Drawing.Point(72, 124)
- Me.txtBatch.Name = "txtBatch"
- Me.txtBatch.TabIndex = 24
- Me.txtBatch.Text = ""
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(44, 131)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(42, 17)
- Me.Label11.TabIndex = 23
- Me.Label11.Text = "批号:"
- '
- 'txtmoney
- '
- Me.txtmoney.Location = New System.Drawing.Point(594, 93)
- Me.txtmoney.Name = "txtmoney"
- Me.txtmoney.ReadOnly = True
- Me.txtmoney.Size = New System.Drawing.Size(72, 21)
- Me.txtmoney.TabIndex = 22
- Me.txtmoney.Text = ""
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(564, 100)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(42, 17)
- Me.Label10.TabIndex = 21
- Me.Label10.Text = "金额:"
- '
- 'txtPackage
- '
- Me.txtPackage.Location = New System.Drawing.Point(456, 93)
- Me.txtPackage.Name = "txtPackage"
- Me.txtPackage.Size = New System.Drawing.Size(84, 21)
- Me.txtPackage.TabIndex = 20
- Me.txtPackage.Text = ""
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(426, 100)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(42, 17)
- Me.Label9.TabIndex = 19
- Me.Label9.Text = "包装:"
- '
- 'txtJJ
- '
- Me.txtJJ.Location = New System.Drawing.Point(246, 93)
- Me.txtJJ.Name = "txtJJ"
- Me.txtJJ.Size = New System.Drawing.Size(102, 21)
- Me.txtJJ.TabIndex = 18
- Me.txtJJ.Text = ""
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(216, 104)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(42, 17)
- Me.Label8.TabIndex = 17
- Me.Label8.Text = "进价:"
- '
- 'txtCount
- '
- Me.txtCount.Location = New System.Drawing.Point(72, 93)
- Me.txtCount.Name = "txtCount"
- Me.txtCount.TabIndex = 16
- Me.txtCount.Text = ""
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(44, 104)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(42, 17)
- Me.Label7.TabIndex = 15
- Me.Label7.Text = "数量:"
- '
- 'txtUnit
- '
- Me.txtUnit.Location = New System.Drawing.Point(594, 62)
- Me.txtUnit.Name = "txtUnit"
- Me.txtUnit.ReadOnly = True
- Me.txtUnit.Size = New System.Drawing.Size(72, 21)
- Me.txtUnit.TabIndex = 14
- Me.txtUnit.Text = ""
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(564, 68)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(42, 17)
- Me.Label6.TabIndex = 13
- Me.Label6.Text = "单位:"
- '
- 'txtName
- '
- Me.txtName.Location = New System.Drawing.Point(246, 62)
- Me.txtName.Name = "txtName"
- Me.txtName.ReadOnly = True
- Me.txtName.Size = New System.Drawing.Size(144, 21)
- Me.txtName.TabIndex = 12
- Me.txtName.Text = ""
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(192, 72)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(66, 17)
- Me.Label5.TabIndex = 11
- Me.Label5.Text = "药品名称:"
- '
- 'txtRule
- '
- Me.txtRule.Location = New System.Drawing.Point(456, 62)
- Me.txtRule.Name = "txtRule"
- Me.txtRule.ReadOnly = True
- Me.txtRule.Size = New System.Drawing.Size(84, 21)
- Me.txtRule.TabIndex = 10
- Me.txtRule.Text = ""
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(402, 68)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(66, 17)
- Me.Label4.TabIndex = 9
- Me.Label4.Text = "药品规格:"
- '
- 'txtNumber
- '
- Me.txtNumber.Location = New System.Drawing.Point(72, 62)
- Me.txtNumber.Name = "txtNumber"
- Me.txtNumber.TabIndex = 8
- Me.txtNumber.Text = ""
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(20, 72)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(66, 17)
- Me.Label3.TabIndex = 7
- Me.Label3.Text = "药品编号:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Location = New System.Drawing.Point(8, 48)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(800, 8)
- Me.GroupBox2.TabIndex = 6
- Me.GroupBox2.TabStop = False
- '
- 'txtDate
- '
- Me.txtDate.Location = New System.Drawing.Point(246, 24)
- Me.txtDate.Name = "txtDate"
- Me.txtDate.Size = New System.Drawing.Size(102, 21)
- Me.txtDate.TabIndex = 5
- Me.txtDate.Value = New Date(2006, 4, 15, 0, 0, 0, 0)
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(192, 32)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(66, 17)
- Me.Label2.TabIndex = 4
- Me.Label2.Text = "初始日期:"
- '
- 'cbohw
- '
- Me.cbohw.Location = New System.Drawing.Point(72, 24)
- Me.cbohw.Name = "cbohw"
- Me.cbohw.Size = New System.Drawing.Size(104, 20)
- Me.cbohw.TabIndex = 1
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(44, 32)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(42, 17)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "货位:"
- '
- 'dgview
- '
- Me.dgview.DataMember = ""
- Me.dgview.Dock = System.Windows.Forms.DockStyle.Fill
- Me.dgview.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgview.Location = New System.Drawing.Point(0, 233)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(676, 274)
- Me.dgview.TabIndex = 2
- '
- 'ErrorProvider1
- '
- Me.ErrorProvider1.ContainerControl = Me
- '
- 'frmKcCs
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(676, 507)
- Me.Controls.Add(Me.dgview)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.tbrcs)
- Me.Name = "frmKcCs"
- Me.Text = "库存初始化"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Public dslocals As DataSet = lsweb.returndataset("select 序号,药品编号,药品名称,药品规格,单位,进价,数量,金额,批号,有效期,包装,产地,批发价,零售价,建议价,最低价,货位,客户名称 as 货源 from wz_kc", "wz_kc")
- Private Sub frmKcCs_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- tbnSave.Enabled = False
- dslocals.Clear()
- dgview.DataSource = dslocals.Tables("wz_kc").DefaultView
- txtDate.Value = Today.ToString
- End Sub
- Public Sub add()
- dslocals.Clear()
- txtNumber.Text() = ""
- txtNumber.Focus()
- txtDate.Value().Today().ToString()
- txtNo.Text = 1
- Dim hwdr, mmdr As System.Data.SqlClient.SqlDataReader
- hwdr = lsweb.returnDataReader("select 货位 from wz_hw")
- Do While hwdr.Read()
- cbohw.Items.Add(hwdr("货位"))
- Loop
- cbohw.Text = ""
- mmdr = lsweb.returnDataReader("select 操作员 from wz_mm")
- Do While mmdr.Read()
- cboczy.Items.Add(mmdr("操作员"))
- Loop
- cboczy.Text = ""
- txtNumber.Text = ""
- txtName.Text() = ""
- txtRule.Text() = ""
- txtUnit.Text() = ""
- txtJJ.Text() = ""
- txtCount.Text() = ""
- txtmoney.Text() = CStr(0)
- txtPackage.Text() = ""
- txtBatch.Text() = ""
- txtavaid.Text() = ""
- txtHy.Text = ""
- txtaddress.Text() = ""
- txtPprice.Text() = CStr(0)
- txtLprice.Text() = CStr(0)
- txtJprice.Text() = CStr(0)
- txtZprice.Text() = CStr(0)
- End Sub
- Public Function getinfo(ByVal strqueryid As String) As String
- Dim strOrderId As String
- strOrderId = strqueryid
- Return strOrderId
- End Function
- Private Sub txtNumber_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtNumber.KeyDown
- If e.KeyCode = Keys.Enter Then
- Dim dlg As frmMedQuery = New frmMedQuery
- dlg.PYM = Me.getinfo(txtNumber.Text)
- If dlg.PYM = "" Then
- ErrorProvider1.SetError(txtNumber, "不能为空,请输入查询码!")
- Else
- dlg.ShowDialog()
- ErrorProvider1.SetError(txtNumber, "")
- End If
- Dim medIdvalue As String
- medIdvalue = dlg.GetInfo("药品编号")
- If medIdvalue Is Nothing Then
- ErrorProvider1.SetError(txtNumber, "不能为空,请输入查询码!或没有查到记录,请重新开始!")
- 'txtNumber.Focus()
- 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
- txtNumber.Text = dv(0)("药品编号")
- txtName.Text = dv(0)("药品名称")
- txtRule.Text = dv(0)("药品规格")
- txtUnit.Text = dv(0)("单位")
- txtJJ.Text = dv(0)("单价")
- txtavaid.Text = dv(0)("有效期")
- 'txtPackage.Text = dv(0)("包装")
- txtaddress.Text = dv(0)("产地")
- txtPprice.Text = dv(0)("批发价")
- txtLprice.Text = dv(0)("零售价")
- ErrorProvider1.SetError(txtNumber, "")
- txtCount.Focus()
- End If
- End If
- End Sub
- Private Sub clear()
- txtNo.ReadOnly = True
- cboczy.Enabled = False
- cboHw.Enabled = False
- txtNumber.Text = ""
- txtName.Text() = ""
- txtRule.Text() = ""
- txtUnit.Text() = ""
- txtHy.Text = ""
- txtJJ.Text() = 0.0
- txtCount.Text() = 0
- txtMoney.Text() = 0.0
- txtPackage.Text() = ""
- txtBatch.Text() = ""
- txtAvaid.Text() = ""
- txtAddress.Text() = ""
- txtPprice.Text() = CStr(0.0)
- txtLprice.Text() = CStr(0.0)
- txtJprice.Text() = CStr(0.0)
- txtZprice.Text() = CStr(0.0)
- 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 cbohw_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cbohw.KeyDown
- If e.KeyCode = Keys.Enter Then
- cboczy.Focus()
- End If
- End Sub
- Private Sub cboczy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboczy.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtNumber.Focus()
- 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()
- End If
- Me.txtJJ.Focus()
- End If
- End Sub
- Private Sub txtJJ_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtJJ.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtPackage.Focus()
- End If
- End Sub
- Private Sub txtPackage_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPackage.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtBatch.Focus()
- End If
- End Sub
- Private Sub txtBatch_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtBatch.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtHy.Focus()
- End If
- End Sub
- Private Sub txtHy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtHy.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtPprice.Focus()
- End If
- End Sub
- Private Sub txtPprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPprice.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtLprice.Focus()
- End If
- End Sub
- Private Sub txtLprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtLprice.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtJprice.Focus()
- End If
- End Sub
- Private Sub txtJprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtJprice.KeyDown
- If e.KeyCode = Keys.Enter Then
- txtZprice.Focus()
- End If
- End Sub
- Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbrcs.ButtonClick
- Select Case e.Button.Text
- Case "添加"
- add()
- tbnEnable("tbnAdd.Enabled = False", tbrcs)
- Case "保存"
- save()
- tbnEnable("tbnSave.Enabled = False", tbrcs)
- Case "退出"
- Me.Close()
- End Select
- End Sub
- Private Sub save()
- If lsweb.updatedataset("select 序号,药品编号,药品名称,药品规格,单位,进价,数量,金额,批号,有效期,包装,产地,批发价,零售价,建议价,最低价,货位,客户名称 as 货源 from wz_kc", "wz_kc", dslocals, DataRowState.Added) = True Then
- lsweb.runSql("exec sp_kccs")
- MessageBox.Show("信息成功保存!", "提示", MessageBoxButtons.OK)
- Else
- MessageBox.Show("信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
- End If
- End Sub
- Private Sub txtZprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtZprice.KeyDown
- If Not IsNumeric(txtZprice.Text) Or txtZprice.Text = String.Empty Then
- ErrorProvider1.SetError(txtZprice, "不是数值类型且不能为空。")
- txtZprice.Focus()
- Else
- If e.KeyCode = Keys.Enter Then
- Static i As Int16
- If dslocals.Tables("wz_kc").Rows.Count < 1 Then
- i = 1
- Else
- i = i + 1
- End If
- txtNo.Text = CStr(i)
- Dim dr As DataRow = dslocals.Tables("wz_kc").NewRow()
- dr("序号") = CInt(Me.txtNo.Text.Trim)
- dr("药品编号") = Me.txtNumber.Text.Trim
- dr("药品名称") = Me.txtName.Text.Trim
- dr("药品规格") = Me.txtRule.Text.Trim
- dr("单位") = Me.txtUnit.Text.Trim
- dr("进价") = CDec(Me.txtJJ.Text.Trim)
- dr("数量") = Me.txtCount.Text.Trim
- dr("金额") = CDec(Me.txtJJ.Text.Trim) * CInt(Me.txtCount.Text.Trim)
- dr("批号") = Me.txtBatch.Text.Trim
- dr("有效期") = Me.txtavaid.Text.Trim
- dr("包装") = Me.txtPackage.Text.Trim
- dr("产地") = Me.txtaddress.Text.Trim
- dr("批发价") = Me.txtPprice.Text.Trim
- dr("零售价") = Me.txtLprice.Text.Trim
- dr("建议价") = CInt(Me.txtJprice.Text.Trim)
- dr("最低价") = CInt(Me.txtZprice.Text.Trim)
- dr("货源") = Me.txtHy.Text.Trim
- dr("货位") = Me.cbohw.Text.Trim
- dslocals.Tables("wz_kc").Rows.Add(dr)
- txtNumber.Focus()
- clear()
- End If
- ErrorProvider1.SetError(txtZprice, "")
- End If
- dgview.DataSource = dslocals.Tables("wz_kc").DefaultView
- End Sub
- Private Sub cbohw_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles cbohw.Validating
- If cbohw.Text = String.Empty Then
- ErrorProvider1.SetError(cbohw, "不能为空。")
- cbohw.Focus()
- Else
- ErrorProvider1.SetError(cbohw, "")
- 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 txtJJ_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtJJ.Validating
- If Not IsNumeric(txtJJ.Text) Or txtJJ.Text = String.Empty Then
- ErrorProvider1.SetError(txtJJ, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtJJ, "")
- End If
- End Sub
- Private Sub txtPackage_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPackage.Validating
- If txtPackage.Text = String.Empty Then
- ErrorProvider1.SetError(txtPackage, "不能为空。")
- txtPackage.Focus()
- Else
- ErrorProvider1.SetError(txtPackage, "")
- End If
- End Sub
- Private Sub txtBatch_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtBatch.Validating
- If txtBatch.Text = String.Empty Then
- ErrorProvider1.SetError(txtBatch, "不能为空。")
- txtBatch.Focus()
- Else
- ErrorProvider1.SetError(txtBatch, "")
- End If
- End Sub
- Private Sub txtHy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtHy.Validating
- If txtHy.Text = String.Empty Then
- ErrorProvider1.SetError(txtHy, "不能为空。")
- txtHy.Focus()
- Else
- ErrorProvider1.SetError(txtHy, "")
- End If
- End Sub
- Private Sub txtPprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPprice.Validating
- If Not IsNumeric(txtPprice.Text) Or txtPprice.Text = String.Empty Then
- ErrorProvider1.SetError(txtPprice, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtPprice, "")
- End If
- End Sub
- Private Sub txtLprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtLprice.Validating
- If Not IsNumeric(txtLprice.Text) Or txtLprice.Text = String.Empty Then
- ErrorProvider1.SetError(txtLprice, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtLprice, "")
- End If
- End Sub
- Private Sub txtJprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtJprice.Validating
- If Not IsNumeric(txtJprice.Text) Or txtJprice.Text = String.Empty Then
- ErrorProvider1.SetError(txtJprice, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtJprice, "")
- End If
- End Sub
- Private Sub txtZprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtZprice.Validating
- If Not IsNumeric(txtZprice.Text) Or txtZprice.Text = String.Empty Then
- ErrorProvider1.SetError(txtZprice, "不是数值类型且不能为空。")
- e.Cancel = True
- Else
- ErrorProvider1.SetError(txtZprice, "")
- End If
- End Sub
- Private Sub CalMxMoney()
- Dim price As Double = CType(txtJJ.Text, Double)
- Dim count As Int16 = CInt(txtCount.Text)
- Me.txtmoney.Text = (price * count).ToString
- End Sub
- Private Sub txtZprice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtZprice.TextChanged
- End Sub
- Private Sub txtCount_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCount.TextChanged
- End Sub
- Private Sub cboczy_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboczy.SelectedIndexChanged
- End Sub
- Private Sub cboczy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles cboczy.Validating
- If cboczy.Text = String.Empty Then
- ErrorProvider1.SetError(cboczy, "不能为空。")
- cboczy.Focus()
- Else
- ErrorProvider1.SetError(cboczy, "")
- End If
- End Sub
- Private Sub frmKcCs_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
-
- End Sub
- End Class