frmMdcf.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:37k
源码类别:

医药行业

开发平台:

Visual Basic

  1. Public Class frmMdcf
  2.     Inherits System.Windows.Forms.Form
  3. #Region " Windows 窗体设计器生成的代码 "
  4.     Public Sub New()
  5.         MyBase.New()
  6.         '该调用是 Windows 窗体设计器所必需的。
  7.         InitializeComponent()
  8.         '在 InitializeComponent() 调用之后添加任何初始化
  9.     End Sub
  10.     '窗体重写 dispose 以清理组件列表。
  11.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  12.         If disposing Then
  13.             If Not (components Is Nothing) Then
  14.                 components.Dispose()
  15.             End If
  16.         End If
  17.         MyBase.Dispose(disposing)
  18.     End Sub
  19.     'Windows 窗体设计器所必需的
  20.     Private components As System.ComponentModel.IContainer
  21.     '注意: 以下过程是 Windows 窗体设计器所必需的
  22.     '可以使用 Windows 窗体设计器修改此过程。
  23.     '不要使用代码编辑器修改它。
  24.     Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
  25.     Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
  26.     Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
  27.     Friend WithEvents Label1 As System.Windows.Forms.Label
  28.     Friend WithEvents Label2 As System.Windows.Forms.Label
  29.     Friend WithEvents Label3 As System.Windows.Forms.Label
  30.     Friend WithEvents Label4 As System.Windows.Forms.Label
  31.     Friend WithEvents Label5 As System.Windows.Forms.Label
  32.     Friend WithEvents Label6 As System.Windows.Forms.Label
  33.     Friend WithEvents Label16 As System.Windows.Forms.Label
  34.     Friend WithEvents Label12 As System.Windows.Forms.Label
  35.     Friend WithEvents txtProduct As System.Windows.Forms.TextBox
  36.     Friend WithEvents txtAvaid As System.Windows.Forms.TextBox
  37.     Friend WithEvents txtBatch As System.Windows.Forms.TextBox
  38.     Friend WithEvents txtMoney As System.Windows.Forms.TextBox
  39.     Friend WithEvents txtPrice As System.Windows.Forms.TextBox
  40.     Friend WithEvents txtCount As System.Windows.Forms.TextBox
  41.     Friend WithEvents txtMedRule As System.Windows.Forms.TextBox
  42.     Friend WithEvents txtmedName As System.Windows.Forms.TextBox
  43.     Friend WithEvents txtMedNumber As System.Windows.Forms.TextBox
  44.     Friend WithEvents Label19 As System.Windows.Forms.Label
  45.     Friend WithEvents Label18 As System.Windows.Forms.Label
  46.     Friend WithEvents Label17 As System.Windows.Forms.Label
  47.     Friend WithEvents Label15 As System.Windows.Forms.Label
  48.     Friend WithEvents Label14 As System.Windows.Forms.Label
  49.     Friend WithEvents Label13 As System.Windows.Forms.Label
  50.     Friend WithEvents Label11 As System.Windows.Forms.Label
  51.     Friend WithEvents Label10 As System.Windows.Forms.Label
  52.     Friend WithEvents Label9 As System.Windows.Forms.Label
  53.     Friend WithEvents Label7 As System.Windows.Forms.Label
  54.     Friend WithEvents txtName As System.Windows.Forms.TextBox
  55.     Friend WithEvents txtdemo As System.Windows.Forms.TextBox
  56.     Friend WithEvents txtdoctor As System.Windows.Forms.TextBox
  57.     Friend WithEvents txtbillnumber As System.Windows.Forms.TextBox
  58.     Friend WithEvents txtdate As System.Windows.Forms.DateTimePicker
  59.     Friend WithEvents txtshy As System.Windows.Forms.ComboBox
  60.     Friend WithEvents tbnAdd As System.Windows.Forms.ToolBarButton
  61.     Friend WithEvents tbnsave As System.Windows.Forms.ToolBarButton
  62.     Friend WithEvents tbnPrint As System.Windows.Forms.ToolBarButton
  63.     Friend WithEvents tbnExit As System.Windows.Forms.ToolBarButton
  64.     Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
  65.     Friend WithEvents txtunit As System.Windows.Forms.TextBox
  66.     Friend WithEvents txtpackage As System.Windows.Forms.TextBox
  67.     Friend WithEvents txtno As System.Windows.Forms.TextBox
  68.     Friend WithEvents Panel1 As System.Windows.Forms.Panel
  69.     Friend WithEvents dgview As System.Windows.Forms.DataGrid
  70.     Friend WithEvents tbncf As System.Windows.Forms.ToolBar
  71.     Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
  72.     Friend WithEvents Label8 As System.Windows.Forms.Label
  73.     Friend WithEvents txthw As System.Windows.Forms.TextBox
  74.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  75.         Me.components = New System.ComponentModel.Container
  76.         Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMdcf))
  77.         Me.StatusBar1 = New System.Windows.Forms.StatusBar
  78.         Me.tbncf = New System.Windows.Forms.ToolBar
  79.         Me.tbnAdd = New System.Windows.Forms.ToolBarButton
  80.         Me.tbnsave = New System.Windows.Forms.ToolBarButton
  81.         Me.tbnPrint = New System.Windows.Forms.ToolBarButton
  82.         Me.tbnExit = New System.Windows.Forms.ToolBarButton
  83.         Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
  84.         Me.GroupBox1 = New System.Windows.Forms.GroupBox
  85.         Me.txthw = New System.Windows.Forms.TextBox
  86.         Me.Label8 = New System.Windows.Forms.Label
  87.         Me.txtshy = New System.Windows.Forms.ComboBox
  88.         Me.txtdate = New System.Windows.Forms.DateTimePicker
  89.         Me.txtName = New System.Windows.Forms.TextBox
  90.         Me.txtdemo = New System.Windows.Forms.TextBox
  91.         Me.txtdoctor = New System.Windows.Forms.TextBox
  92.         Me.txtbillnumber = New System.Windows.Forms.TextBox
  93.         Me.Label6 = New System.Windows.Forms.Label
  94.         Me.Label5 = New System.Windows.Forms.Label
  95.         Me.Label4 = New System.Windows.Forms.Label
  96.         Me.Label3 = New System.Windows.Forms.Label
  97.         Me.Label2 = New System.Windows.Forms.Label
  98.         Me.Label1 = New System.Windows.Forms.Label
  99.         Me.GroupBox2 = New System.Windows.Forms.GroupBox
  100.         Me.txtno = New System.Windows.Forms.TextBox
  101.         Me.txtpackage = New System.Windows.Forms.TextBox
  102.         Me.txtunit = New System.Windows.Forms.TextBox
  103.         Me.Label7 = New System.Windows.Forms.Label
  104.         Me.Label16 = New System.Windows.Forms.Label
  105.         Me.Label12 = New System.Windows.Forms.Label
  106.         Me.txtProduct = New System.Windows.Forms.TextBox
  107.         Me.txtAvaid = New System.Windows.Forms.TextBox
  108.         Me.txtBatch = New System.Windows.Forms.TextBox
  109.         Me.txtMoney = New System.Windows.Forms.TextBox
  110.         Me.txtPrice = New System.Windows.Forms.TextBox
  111.         Me.txtCount = New System.Windows.Forms.TextBox
  112.         Me.txtMedRule = New System.Windows.Forms.TextBox
  113.         Me.txtmedName = New System.Windows.Forms.TextBox
  114.         Me.txtMedNumber = New System.Windows.Forms.TextBox
  115.         Me.Label19 = New System.Windows.Forms.Label
  116.         Me.Label18 = New System.Windows.Forms.Label
  117.         Me.Label17 = New System.Windows.Forms.Label
  118.         Me.Label15 = New System.Windows.Forms.Label
  119.         Me.Label14 = New System.Windows.Forms.Label
  120.         Me.Label13 = New System.Windows.Forms.Label
  121.         Me.Label11 = New System.Windows.Forms.Label
  122.         Me.Label10 = New System.Windows.Forms.Label
  123.         Me.Label9 = New System.Windows.Forms.Label
  124.         Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
  125.         Me.Panel1 = New System.Windows.Forms.Panel
  126.         Me.dgview = New System.Windows.Forms.DataGrid
  127.         Me.GroupBox1.SuspendLayout()
  128.         Me.GroupBox2.SuspendLayout()
  129.         Me.Panel1.SuspendLayout()
  130.         CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
  131.         Me.SuspendLayout()
  132.         '
  133.         'StatusBar1
  134.         '
  135.         Me.StatusBar1.Location = New System.Drawing.Point(0, 574)
  136.         Me.StatusBar1.Name = "StatusBar1"
  137.         Me.StatusBar1.Size = New System.Drawing.Size(718, 22)
  138.         Me.StatusBar1.TabIndex = 0
  139.         Me.StatusBar1.Text = "StatusBar1"
  140.         '
  141.         'tbncf
  142.         '
  143.         Me.tbncf.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
  144.         Me.tbncf.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnAdd, Me.tbnsave, Me.tbnPrint, Me.tbnExit})
  145.         Me.tbncf.DropDownArrows = True
  146.         Me.tbncf.ImageList = Me.ImageList2
  147.         Me.tbncf.Location = New System.Drawing.Point(0, 0)
  148.         Me.tbncf.Name = "tbncf"
  149.         Me.tbncf.ShowToolTips = True
  150.         Me.tbncf.Size = New System.Drawing.Size(718, 44)
  151.         Me.tbncf.TabIndex = 1
  152.         '
  153.         'tbnAdd
  154.         '
  155.         Me.tbnAdd.ImageIndex = 7
  156.         Me.tbnAdd.Text = "添加"
  157.         '
  158.         'tbnsave
  159.         '
  160.         Me.tbnsave.ImageIndex = 4
  161.         Me.tbnsave.Text = "保存"
  162.         '
  163.         'tbnPrint
  164.         '
  165.         Me.tbnPrint.ImageIndex = 12
  166.         Me.tbnPrint.Text = "打印"
  167.         '
  168.         'tbnExit
  169.         '
  170.         Me.tbnExit.ImageIndex = 11
  171.         Me.tbnExit.Text = "退出"
  172.         '
  173.         'ImageList2
  174.         '
  175.         Me.ImageList2.ImageSize = New System.Drawing.Size(16, 16)
  176.         Me.ImageList2.ImageStream = CType(resources.GetObject("ImageList2.ImageStream"), System.Windows.Forms.ImageListStreamer)
  177.         Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
  178.         '
  179.         'GroupBox1
  180.         '
  181.         Me.GroupBox1.Controls.Add(Me.txthw)
  182.         Me.GroupBox1.Controls.Add(Me.Label8)
  183.         Me.GroupBox1.Controls.Add(Me.txtshy)
  184.         Me.GroupBox1.Controls.Add(Me.txtdate)
  185.         Me.GroupBox1.Controls.Add(Me.txtName)
  186.         Me.GroupBox1.Controls.Add(Me.txtdemo)
  187.         Me.GroupBox1.Controls.Add(Me.txtdoctor)
  188.         Me.GroupBox1.Controls.Add(Me.txtbillnumber)
  189.         Me.GroupBox1.Controls.Add(Me.Label6)
  190.         Me.GroupBox1.Controls.Add(Me.Label5)
  191.         Me.GroupBox1.Controls.Add(Me.Label4)
  192.         Me.GroupBox1.Controls.Add(Me.Label3)
  193.         Me.GroupBox1.Controls.Add(Me.Label2)
  194.         Me.GroupBox1.Controls.Add(Me.Label1)
  195.         Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
  196.         Me.GroupBox1.Location = New System.Drawing.Point(0, 44)
  197.         Me.GroupBox1.Name = "GroupBox1"
  198.         Me.GroupBox1.Size = New System.Drawing.Size(718, 149)
  199.         Me.GroupBox1.TabIndex = 2
  200.         Me.GroupBox1.TabStop = False
  201.         Me.GroupBox1.Text = "处方信息"
  202.         '
  203.         'txthw
  204.         '
  205.         Me.txthw.Location = New System.Drawing.Point(312, 64)
  206.         Me.txthw.Name = "txthw"
  207.         Me.txthw.ReadOnly = True
  208.         Me.txthw.Size = New System.Drawing.Size(128, 25)
  209.         Me.txthw.TabIndex = 13
  210.         Me.txthw.Text = ""
  211.         '
  212.         'Label8
  213.         '
  214.         Me.Label8.AutoSize = True
  215.         Me.Label8.Location = New System.Drawing.Point(272, 72)
  216.         Me.Label8.Name = "Label8"
  217.         Me.Label8.Size = New System.Drawing.Size(44, 21)
  218.         Me.Label8.TabIndex = 12
  219.         Me.Label8.Text = "货位:"
  220.         '
  221.         'txtshy
  222.         '
  223.         Me.txtshy.Location = New System.Drawing.Point(520, 62)
  224.         Me.txtshy.Name = "txtshy"
  225.         Me.txtshy.Size = New System.Drawing.Size(136, 23)
  226.         Me.txtshy.TabIndex = 11
  227.         '
  228.         'txtdate
  229.         '
  230.         Me.txtdate.Location = New System.Drawing.Point(520, 24)
  231.         Me.txtdate.Name = "txtdate"
  232.         Me.txtdate.Size = New System.Drawing.Size(136, 25)
  233.         Me.txtdate.TabIndex = 10
  234.         Me.txtdate.Value = New Date(2006, 4, 5, 0, 0, 0, 0)
  235.         '
  236.         'txtName
  237.         '
  238.         Me.txtName.Location = New System.Drawing.Point(312, 24)
  239.         Me.txtName.Name = "txtName"
  240.         Me.txtName.Size = New System.Drawing.Size(160, 25)
  241.         Me.txtName.TabIndex = 9
  242.         Me.txtName.Text = ""
  243.         '
  244.         'txtdemo
  245.         '
  246.         Me.txtdemo.Location = New System.Drawing.Point(88, 104)
  247.         Me.txtdemo.Name = "txtdemo"
  248.         Me.txtdemo.Size = New System.Drawing.Size(568, 25)
  249.         Me.txtdemo.TabIndex = 8
  250.         Me.txtdemo.Text = ""
  251.         '
  252.         'txtdoctor
  253.         '
  254.         Me.txtdoctor.Location = New System.Drawing.Point(88, 62)
  255.         Me.txtdoctor.Name = "txtdoctor"
  256.         Me.txtdoctor.Size = New System.Drawing.Size(144, 25)
  257.         Me.txtdoctor.TabIndex = 7
  258.         Me.txtdoctor.Text = ""
  259.         '
  260.         'txtbillnumber
  261.         '
  262.         Me.txtbillnumber.Location = New System.Drawing.Point(88, 24)
  263.         Me.txtbillnumber.Name = "txtbillnumber"
  264.         Me.txtbillnumber.ReadOnly = True
  265.         Me.txtbillnumber.Size = New System.Drawing.Size(144, 25)
  266.         Me.txtbillnumber.TabIndex = 6
  267.         Me.txtbillnumber.Text = ""
  268.         '
  269.         'Label6
  270.         '
  271.         Me.Label6.AutoSize = True
  272.         Me.Label6.Location = New System.Drawing.Point(464, 72)
  273.         Me.Label6.Name = "Label6"
  274.         Me.Label6.Size = New System.Drawing.Size(60, 21)
  275.         Me.Label6.TabIndex = 5
  276.         Me.Label6.Text = "审核员:"
  277.         '
  278.         'Label5
  279.         '
  280.         Me.Label5.AutoSize = True
  281.         Me.Label5.Location = New System.Drawing.Point(480, 31)
  282.         Me.Label5.Name = "Label5"
  283.         Me.Label5.Size = New System.Drawing.Size(44, 21)
  284.         Me.Label5.TabIndex = 4
  285.         Me.Label5.Text = "日期:"
  286.         '
  287.         'Label4
  288.         '
  289.         Me.Label4.AutoSize = True
  290.         Me.Label4.Location = New System.Drawing.Point(8, 113)
  291.         Me.Label4.Name = "Label4"
  292.         Me.Label4.Size = New System.Drawing.Size(83, 21)
  293.         Me.Label4.TabIndex = 3
  294.         Me.Label4.Text = "备注/功用:"
  295.         '
  296.         'Label3
  297.         '
  298.         Me.Label3.AutoSize = True
  299.         Me.Label3.Location = New System.Drawing.Point(240, 32)
  300.         Me.Label3.Name = "Label3"
  301.         Me.Label3.Size = New System.Drawing.Size(75, 21)
  302.         Me.Label3.TabIndex = 2
  303.         Me.Label3.Text = "处方名称:"
  304.         '
  305.         'Label2
  306.         '
  307.         Me.Label2.AutoSize = True
  308.         Me.Label2.Location = New System.Drawing.Point(32, 72)
  309.         Me.Label2.Name = "Label2"
  310.         Me.Label2.Size = New System.Drawing.Size(60, 21)
  311.         Me.Label2.TabIndex = 1
  312.         Me.Label2.Text = "药剂师:"
  313.         '
  314.         'Label1
  315.         '
  316.         Me.Label1.AutoSize = True
  317.         Me.Label1.Location = New System.Drawing.Point(16, 31)
  318.         Me.Label1.Name = "Label1"
  319.         Me.Label1.Size = New System.Drawing.Size(75, 21)
  320.         Me.Label1.TabIndex = 0
  321.         Me.Label1.Text = "处方编号:"
  322.         '
  323.         'GroupBox2
  324.         '
  325.         Me.GroupBox2.Controls.Add(Me.txtno)
  326.         Me.GroupBox2.Controls.Add(Me.txtpackage)
  327.         Me.GroupBox2.Controls.Add(Me.txtunit)
  328.         Me.GroupBox2.Controls.Add(Me.Label7)
  329.         Me.GroupBox2.Controls.Add(Me.Label16)
  330.         Me.GroupBox2.Controls.Add(Me.Label12)
  331.         Me.GroupBox2.Controls.Add(Me.txtProduct)
  332.         Me.GroupBox2.Controls.Add(Me.txtAvaid)
  333.         Me.GroupBox2.Controls.Add(Me.txtBatch)
  334.         Me.GroupBox2.Controls.Add(Me.txtMoney)
  335.         Me.GroupBox2.Controls.Add(Me.txtPrice)
  336.         Me.GroupBox2.Controls.Add(Me.txtCount)
  337.         Me.GroupBox2.Controls.Add(Me.txtMedRule)
  338.         Me.GroupBox2.Controls.Add(Me.txtmedName)
  339.         Me.GroupBox2.Controls.Add(Me.txtMedNumber)
  340.         Me.GroupBox2.Controls.Add(Me.Label19)
  341.         Me.GroupBox2.Controls.Add(Me.Label18)
  342.         Me.GroupBox2.Controls.Add(Me.Label17)
  343.         Me.GroupBox2.Controls.Add(Me.Label15)
  344.         Me.GroupBox2.Controls.Add(Me.Label14)
  345.         Me.GroupBox2.Controls.Add(Me.Label13)
  346.         Me.GroupBox2.Controls.Add(Me.Label11)
  347.         Me.GroupBox2.Controls.Add(Me.Label10)
  348.         Me.GroupBox2.Controls.Add(Me.Label9)
  349.         Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Top
  350.         Me.GroupBox2.Location = New System.Drawing.Point(0, 193)
  351.         Me.GroupBox2.Name = "GroupBox2"
  352.         Me.GroupBox2.Size = New System.Drawing.Size(718, 144)
  353.         Me.GroupBox2.TabIndex = 3
  354.         Me.GroupBox2.TabStop = False
  355.         Me.GroupBox2.Text = "药品信息"
  356.         '
  357.         'txtno
  358.         '
  359.         Me.txtno.Location = New System.Drawing.Point(96, 62)
  360.         Me.txtno.Name = "txtno"
  361.         Me.txtno.ReadOnly = True
  362.         Me.txtno.Size = New System.Drawing.Size(32, 25)
  363.         Me.txtno.TabIndex = 118
  364.         Me.txtno.Text = ""
  365.         '
  366.         'txtpackage
  367.         '
  368.         Me.txtpackage.Location = New System.Drawing.Point(616, 103)
  369.         Me.txtpackage.Name = "txtpackage"
  370.         Me.txtpackage.ReadOnly = True
  371.         Me.txtpackage.Size = New System.Drawing.Size(88, 25)
  372.         Me.txtpackage.TabIndex = 117
  373.         Me.txtpackage.Text = ""
  374.         '
  375.         'txtunit
  376.         '
  377.         Me.txtunit.Location = New System.Drawing.Point(616, 64)
  378.         Me.txtunit.Name = "txtunit"
  379.         Me.txtunit.ReadOnly = True
  380.         Me.txtunit.Size = New System.Drawing.Size(88, 25)
  381.         Me.txtunit.TabIndex = 116
  382.         Me.txtunit.Text = ""
  383.         '
  384.         'Label7
  385.         '
  386.         Me.Label7.AutoSize = True
  387.         Me.Label7.Location = New System.Drawing.Point(53, 72)
  388.         Me.Label7.Name = "Label7"
  389.         Me.Label7.Size = New System.Drawing.Size(52, 21)
  390.         Me.Label7.TabIndex = 115
  391.         Me.Label7.Text = "序号:"
  392.         '
  393.         'Label16
  394.         '
  395.         Me.Label16.AutoSize = True
  396.         Me.Label16.Location = New System.Drawing.Point(576, 113)
  397.         Me.Label16.Name = "Label16"
  398.         Me.Label16.Size = New System.Drawing.Size(52, 21)
  399.         Me.Label16.TabIndex = 113
  400.         Me.Label16.Text = "包装:"
  401.         '
  402.         'Label12
  403.         '
  404.         Me.Label12.AutoSize = True
  405.         Me.Label12.Location = New System.Drawing.Point(576, 72)
  406.         Me.Label12.Name = "Label12"
  407.         Me.Label12.Size = New System.Drawing.Size(52, 21)
  408.         Me.Label12.TabIndex = 112
  409.         Me.Label12.Text = "单位:"
  410.         '
  411.         'txtProduct
  412.         '
  413.         Me.txtProduct.Location = New System.Drawing.Point(312, 103)
  414.         Me.txtProduct.Name = "txtProduct"
  415.         Me.txtProduct.ReadOnly = True
  416.         Me.txtProduct.Size = New System.Drawing.Size(96, 25)
  417.         Me.txtProduct.TabIndex = 111
  418.         Me.txtProduct.Text = ""
  419.         '
  420.         'txtAvaid
  421.         '
  422.         Me.txtAvaid.Location = New System.Drawing.Point(472, 104)
  423.         Me.txtAvaid.Name = "txtAvaid"
  424.         Me.txtAvaid.ReadOnly = True
  425.         Me.txtAvaid.Size = New System.Drawing.Size(88, 25)
  426.         Me.txtAvaid.TabIndex = 110
  427.         Me.txtAvaid.Text = ""
  428.         '
  429.         'txtBatch
  430.         '
  431.         Me.txtBatch.Location = New System.Drawing.Point(96, 103)
  432.         Me.txtBatch.Name = "txtBatch"
  433.         Me.txtBatch.ReadOnly = True
  434.         Me.txtBatch.Size = New System.Drawing.Size(128, 25)
  435.         Me.txtBatch.TabIndex = 109
  436.         Me.txtBatch.Text = ""
  437.         '
  438.         'txtMoney
  439.         '
  440.         Me.txtMoney.Location = New System.Drawing.Point(472, 64)
  441.         Me.txtMoney.Name = "txtMoney"
  442.         Me.txtMoney.ReadOnly = True
  443.         Me.txtMoney.Size = New System.Drawing.Size(88, 25)
  444.         Me.txtMoney.TabIndex = 107
  445.         Me.txtMoney.Text = "0.00"
  446.         '
  447.         'txtPrice
  448.         '
  449.         Me.txtPrice.Location = New System.Drawing.Point(312, 64)
  450.         Me.txtPrice.Name = "txtPrice"
  451.         Me.txtPrice.Size = New System.Drawing.Size(96, 25)
  452.         Me.txtPrice.TabIndex = 106
  453.         Me.txtPrice.Text = "0.00"
  454.         '
  455.         'txtCount
  456.         '
  457.         Me.txtCount.Location = New System.Drawing.Point(176, 64)
  458.         Me.txtCount.Name = "txtCount"
  459.         Me.txtCount.Size = New System.Drawing.Size(48, 25)
  460.         Me.txtCount.TabIndex = 105
  461.         Me.txtCount.Text = ""
  462.         '
  463.         'txtMedRule
  464.         '
  465.         Me.txtMedRule.Location = New System.Drawing.Point(568, 24)
  466.         Me.txtMedRule.Name = "txtMedRule"
  467.         Me.txtMedRule.ReadOnly = True
  468.         Me.txtMedRule.Size = New System.Drawing.Size(136, 25)
  469.         Me.txtMedRule.TabIndex = 103
  470.         Me.txtMedRule.Text = ""
  471.         '
  472.         'txtmedName
  473.         '
  474.         Me.txtmedName.Location = New System.Drawing.Point(312, 24)
  475.         Me.txtmedName.Name = "txtmedName"
  476.         Me.txtmedName.ReadOnly = True
  477.         Me.txtmedName.Size = New System.Drawing.Size(168, 25)
  478.         Me.txtmedName.TabIndex = 102
  479.         Me.txtmedName.Text = ""
  480.         '
  481.         'txtMedNumber
  482.         '
  483.         Me.txtMedNumber.Location = New System.Drawing.Point(96, 21)
  484.         Me.txtMedNumber.Name = "txtMedNumber"
  485.         Me.txtMedNumber.Size = New System.Drawing.Size(128, 25)
  486.         Me.txtMedNumber.TabIndex = 101
  487.         Me.txtMedNumber.Text = ""
  488.         '
  489.         'Label19
  490.         '
  491.         Me.Label19.AutoSize = True
  492.         Me.Label19.Location = New System.Drawing.Point(272, 112)
  493.         Me.Label19.Name = "Label19"
  494.         Me.Label19.Size = New System.Drawing.Size(52, 21)
  495.         Me.Label19.TabIndex = 100
  496.         Me.Label19.Text = "产地:"
  497.         '
  498.         'Label18
  499.         '
  500.         Me.Label18.AutoSize = True
  501.         Me.Label18.Location = New System.Drawing.Point(416, 113)
  502.         Me.Label18.Name = "Label18"
  503.         Me.Label18.Size = New System.Drawing.Size(67, 21)
  504.         Me.Label18.TabIndex = 99
  505.         Me.Label18.Text = "有效期:"
  506.         '
  507.         'Label17
  508.         '
  509.         Me.Label17.AutoSize = True
  510.         Me.Label17.Location = New System.Drawing.Point(53, 113)
  511.         Me.Label17.Name = "Label17"
  512.         Me.Label17.Size = New System.Drawing.Size(52, 21)
  513.         Me.Label17.TabIndex = 98
  514.         Me.Label17.Text = "批号:"
  515.         '
  516.         'Label15
  517.         '
  518.         Me.Label15.AutoSize = True
  519.         Me.Label15.ForeColor = System.Drawing.Color.Red
  520.         Me.Label15.Location = New System.Drawing.Point(432, 72)
  521.         Me.Label15.Name = "Label15"
  522.         Me.Label15.Size = New System.Drawing.Size(52, 21)
  523.         Me.Label15.TabIndex = 97
  524.         Me.Label15.Text = "金额:"
  525.         '
  526.         'Label14
  527.         '
  528.         Me.Label14.AutoSize = True
  529.         Me.Label14.Location = New System.Drawing.Point(272, 72)
  530.         Me.Label14.Name = "Label14"
  531.         Me.Label14.Size = New System.Drawing.Size(52, 21)
  532.         Me.Label14.TabIndex = 96
  533.         Me.Label14.Text = "单价:"
  534.         '
  535.         'Label13
  536.         '
  537.         Me.Label13.AutoSize = True
  538.         Me.Label13.Location = New System.Drawing.Point(136, 72)
  539.         Me.Label13.Name = "Label13"
  540.         Me.Label13.Size = New System.Drawing.Size(52, 21)
  541.         Me.Label13.TabIndex = 95
  542.         Me.Label13.Text = "数量:"
  543.         '
  544.         'Label11
  545.         '
  546.         Me.Label11.AutoSize = True
  547.         Me.Label11.Location = New System.Drawing.Point(496, 32)
  548.         Me.Label11.Name = "Label11"
  549.         Me.Label11.Size = New System.Drawing.Size(83, 21)
  550.         Me.Label11.TabIndex = 94
  551.         Me.Label11.Text = "药品规格:"
  552.         '
  553.         'Label10
  554.         '
  555.         Me.Label10.AutoSize = True
  556.         Me.Label10.Location = New System.Drawing.Point(240, 31)
  557.         Me.Label10.Name = "Label10"
  558.         Me.Label10.Size = New System.Drawing.Size(83, 21)
  559.         Me.Label10.TabIndex = 93
  560.         Me.Label10.Text = "药品名称:"
  561.         '
  562.         'Label9
  563.         '
  564.         Me.Label9.AutoSize = True
  565.         Me.Label9.Location = New System.Drawing.Point(21, 31)
  566.         Me.Label9.Name = "Label9"
  567.         Me.Label9.Size = New System.Drawing.Size(83, 21)
  568.         Me.Label9.TabIndex = 92
  569.         Me.Label9.Text = "药品编号:"
  570.         '
  571.         'ErrorProvider1
  572.         '
  573.         Me.ErrorProvider1.ContainerControl = Me
  574.         '
  575.         'Panel1
  576.         '
  577.         Me.Panel1.Controls.Add(Me.dgview)
  578.         Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
  579.         Me.Panel1.Location = New System.Drawing.Point(0, 337)
  580.         Me.Panel1.Name = "Panel1"
  581.         Me.Panel1.Size = New System.Drawing.Size(718, 237)
  582.         Me.Panel1.TabIndex = 4
  583.         '
  584.         'dgview
  585.         '
  586.         Me.dgview.DataMember = ""
  587.         Me.dgview.Dock = System.Windows.Forms.DockStyle.Fill
  588.         Me.dgview.HeaderForeColor = System.Drawing.SystemColors.ControlText
  589.         Me.dgview.Location = New System.Drawing.Point(0, 0)
  590.         Me.dgview.Name = "dgview"
  591.         Me.dgview.Size = New System.Drawing.Size(718, 237)
  592.         Me.dgview.TabIndex = 5
  593.         '
  594.         'frmMdcf
  595.         '
  596.         Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
  597.         Me.ClientSize = New System.Drawing.Size(718, 596)
  598.         Me.Controls.Add(Me.Panel1)
  599.         Me.Controls.Add(Me.GroupBox2)
  600.         Me.Controls.Add(Me.GroupBox1)
  601.         Me.Controls.Add(Me.tbncf)
  602.         Me.Controls.Add(Me.StatusBar1)
  603.         Me.Name = "frmMdcf"
  604.         Me.Text = "零售处方管理"
  605.         Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
  606.         Me.GroupBox1.ResumeLayout(False)
  607.         Me.GroupBox2.ResumeLayout(False)
  608.         Me.Panel1.ResumeLayout(False)
  609.         CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
  610.         Me.ResumeLayout(False)
  611.     End Sub
  612. #End Region
  613.     Public bool As Boolean
  614.     Public lsweb As New jxcmanage
  615.     Public dslocals As DataSet = lsweb.returndataset("select Number as 序号,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Lcount as 数量,Price 单价,Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期,Package as 包装,CDate as 日期,Yjs as 药剂师,BillNumber as 票号,CfName as 处方名称,Shy as 审核员,Demo as 货位 from mdcf", "mdcf")
  616.     
  617.     Private Sub txtName_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtName.KeyDown
  618.         If e.KeyCode = Keys.Enter Then
  619.             txtdoctor.Focus()
  620.         End If
  621.     End Sub
  622.     
  623.     Private Sub txtdoctor_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtdoctor.KeyDown
  624.         If e.KeyCode = Keys.Enter Then
  625.             txtshy.Focus()
  626.         End If
  627.     End Sub
  628.    
  629.     Private Sub txtshy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtshy.KeyDown
  630.         If e.KeyCode = Keys.Enter Then
  631.             txtdemo.Focus()
  632.         End If
  633.     End Sub
  634.   
  635.     Private Sub txtdemo_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtdemo.KeyDown
  636.         If e.KeyCode = Keys.Enter Then
  637.             txtMedNumber.Focus()
  638.         End If
  639.     End Sub
  640.     Public Function getinfo(ByVal strqueryid As String) As String
  641.         Dim strOrderId As String
  642.         strOrderId = strqueryid
  643.         Return strOrderId
  644.     End Function
  645.     Private Sub CalMxMoney()
  646.         Dim price As Double = CType(txtPrice.Text.Trim, Double)
  647.         Dim count As Int16 = CInt(txtCount.Text.Trim)
  648.         Me.txtMoney.Text = (price * count).ToString
  649.     End Sub
  650.     Private Sub txtMedNumber_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMedNumber.KeyDown
  651.         If e.KeyCode = Keys.Enter Then
  652.             Dim dlg As frmMedKcQuery = New frmMedKcQuery
  653.             dlg.PYMs = Me.getinfo(txtMedNumber.Text)
  654.             If dlg.PYMs = "" Then
  655.                 ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!")
  656.             Else
  657.                 dlg.ShowDialog()
  658.                 ErrorProvider1.SetError(txtMedNumber, "")
  659.             End If
  660.             Dim medIdvalue, medbatch, product, avaid, hw, package As String
  661.             medIdvalue = dlg.GetInfo("药品编号")
  662.             medbatch = dlg.GetInfo("批号")
  663.             product = dlg.GetInfo("产地")
  664.             avaid = dlg.GetInfo("有效期")
  665.             hw = dlg.GetInfo("货位")
  666.             package = dlg.GetInfo("包装")
  667.             If medIdvalue Is Nothing Then
  668.                 ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!或没有查到记录,请重新开始!")
  669.             Else
  670.                 Dim runSqlQuery As String
  671.                 runSqlQuery = "select * from wz_kc where 药品编号='" & medIdvalue & "' and 批号 ='" & medbatch & "' and 产地='" & product & "' and 有效期='" & avaid & "' and 货位='" & hw & "' and 包装='" & package & "'"
  672.                 Dim dv As DataView
  673.                 ' Dim mOrderId As New managers
  674.                 '调用mCustomId对象的SPcustomersID函数
  675.                 Dim dtOrder As DataTable = lsweb.runSql(runSqlQuery).Tables(0)
  676.                 'bb为一随意表名
  677.                 dtOrder.TableName = "bb"
  678.                 dv = dtOrder.DefaultView
  679.                 txtMedNumber.Text = dv(0)("药品编号")
  680.                 txtmedName.Text = dv(0)("药品名称")
  681.                 txtMedRule.Text = dv(0)("药品规格")
  682.                 txtUnit.Text = dv(0)("单位")
  683.                 txtPrice.Text = dv(0)("进价")
  684.                 txtCount.Text = dv(0)("数量")
  685.                 txtAvaid.Text = dv(0)("有效期")
  686.                 txtPackage.Text = dv(0)("包装")
  687.                 txtProduct.Text = dv(0)("产地")
  688.                 txtBatch.Text = dv(0)("批号")
  689.                 txthw.Text = dv(0)("货位")
  690.                 ErrorProvider1.SetError(txtMedNumber, "")
  691.             End If
  692.             txtCount.Focus()
  693.         End If
  694.     End Sub
  695.     Private Sub save()
  696.         If lsweb.updatedataset("select Number as 序号,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Lcount as 数量,Price 单价,Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期,Package as 包装,CDate as 日期,Yjs as 药剂师,BillNumber as 票号,CfName as 处方名称,Shy as 审核员,Demo as 货位 from mdcf", "mdcf", dslocals, DataRowState.Added) = True Then
  697.             MessageBox.Show("销售信息成功保存!", "提示", MessageBoxButtons.OK)
  698.         Else
  699.             MessageBox.Show("销售信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
  700.         End If
  701.     End Sub
  702.   
  703.     Private Sub txtCount_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtCount.KeyDown
  704.         If e.KeyCode = Keys.Enter Then
  705.             txtPrice.Focus()
  706.             CalMxMoney()
  707.         End If
  708.     End Sub
  709.     Private Sub frmMdcf_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  710.         dslocals.Clear()
  711.         dgview.DataSource = dslocals.Tables("Mdcf").DefaultView
  712.         txtdate.Value = Today().ToString()
  713.         Dim hwdr As System.Data.SqlClient.SqlDataReader
  714.         hwdr = lsweb.returnDataReader("select 操作员 from wz_mm")
  715.         Do While hwdr.Read()
  716.             txtshy.Items.Add(hwdr("操作员"))
  717.         Loop
  718.         txtdate.Value = Today.ToString
  719.     End Sub
  720.     Public Sub tbnEnable(ByVal strboolean As String, ByVal tbr As ToolBar)
  721.         If strboolean = "tbnAdd.Enabled = True" Then
  722.             tbnSave.Enabled = False
  723.             tbnPrint.Enabled = False
  724.             tbnExit.Enabled = True
  725.         ElseIf strboolean = "tbnAdd.Enabled = False" Then
  726.             tbnAdd.Enabled = False
  727.             tbnSave.Enabled = True
  728.             tbnPrint.Enabled = True
  729.             tbnExit.Enabled = True
  730.         ElseIf strboolean = "tbnSave.Enabled = True" Then
  731.             tbnAdd.Enabled = False
  732.             tbnPrint.Enabled = True
  733.             tbnExit.Enabled = True
  734.         ElseIf strboolean = "tbnSave.Enabled = False" Then
  735.             tbnSave.Enabled = False
  736.             tbnAdd.Enabled = True
  737.             tbnPrint.Enabled = True
  738.             tbnExit.Enabled = True
  739.         End If
  740.     End Sub
  741.     Private Sub txtName_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtName.Validating
  742.         If txtName.Text = String.Empty Then
  743.             ErrorProvider1.SetError(txtName, "不能为空。")
  744.             txtName.Focus()
  745.         Else
  746.             ErrorProvider1.SetError(txtName, "")
  747.         End If
  748.     End Sub
  749.     Private Sub txtdoctor_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtdoctor.Validating
  750.         If txtdoctor.Text = String.Empty Then
  751.             ErrorProvider1.SetError(txtdoctor, "不能为空。")
  752.             txtdoctor.Focus()
  753.         Else
  754.             ErrorProvider1.SetError(txtdoctor, "")
  755.         End If
  756.     End Sub
  757.     Private Sub txtshy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtshy.Validating
  758.         If txtshy.Text = String.Empty Then
  759.             ErrorProvider1.SetError(txtshy, "不能为空。")
  760.             txtshy.Focus()
  761.         Else
  762.             ErrorProvider1.SetError(txtshy, "")
  763.         End If
  764.     End Sub
  765.     Private Sub txtdemo_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtdemo.Validating
  766.         If txtdemo.Text = String.Empty Then
  767.             ErrorProvider1.SetError(txtdemo, "不能为空。")
  768.             txtdemo.Focus()
  769.         Else
  770.             ErrorProvider1.SetError(txtdemo, "")
  771.         End If
  772.     End Sub
  773.     Private Sub txtCount_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtCount.Validating
  774.         If txtCount.Text = String.Empty Then
  775.             ErrorProvider1.SetError(txtCount, "不是数值类型且不能为空。")
  776.             txtCount.Focus()
  777.         Else
  778.             ErrorProvider1.SetError(txtCount, "")
  779.         End If
  780.     End Sub
  781.     Private Sub txtPrice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPrice.Validating
  782.         If Not IsNumeric(txtPrice.Text) Or txtPrice.Text = String.Empty Then
  783.             ErrorProvider1.SetError(txtPrice, "不是数值类型且不能为空。")
  784.             txtPrice.Focus()
  785.         Else
  786.             ErrorProvider1.SetError(txtPrice, "")
  787.         End If
  788.     End Sub
  789.     Public Sub add()
  790.         dslocals.Clear()
  791.         txtName.Focus()
  792.         txtName.Text() = ""
  793.         txtbillnumber.Text = lsweb.selectbill("CF").ToString
  794.         txtno.Text = 1
  795.         txtdate.Value = Today().ToString()
  796.         
  797.         txtdoctor.Text = ""
  798.         txtdemo.Text = ""
  799.         txtMedNumber.Text = ""
  800.         txtmedName.Text() = ""
  801.         txtMedRule.Text() = ""
  802.         txtunit.Text() = ""
  803.         txtPrice.Text() = 0.0
  804.         txtCount.Text() = 0
  805.         txtMoney.Text() = 0.0
  806.         txtpackage.Text() = ""
  807.         txtBatch.Text() = ""
  808.         txtAvaid.Text() = ""
  809.         txtProduct.Text() = ""
  810.     End Sub
  811.     Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbncf.ButtonClick
  812.         Select Case e.Button.Text
  813.             Case "添加"
  814.                 add()
  815.                 tbnEnable("tbnAdd.Enabled = False", tbncf)
  816.             Case "保存"
  817.                 If txtbillnumber.Text = String.Empty Then
  818.                     MessageBox.Show("请点击添加按钮!", "提示:", MessageBoxButtons.OK)
  819.                 Else
  820.                     save()
  821.                     tbnEnable("tbnSave.Enabled = False", tbncf)
  822.                 End If
  823.             Case "退出"
  824.                     Me.Close()
  825.         End Select
  826.     End Sub
  827.     Private Sub clear()
  828.         txtMedNumber.Text = ""
  829.         txtmedName.Text = ""
  830.         txtMedRule.Text = ""
  831.         txtunit.Text = ""
  832.         txtPrice.Text = 0.0
  833.         txtCount.Text = 0
  834.         txtMoney.Text = 0.0
  835.         txtAvaid.Text = ""
  836.         txtpackage.Text = ""
  837.         txtProduct.Text = ""
  838.         txtBatch.Text = ""
  839.     End Sub
  840.     Private Sub txtPrice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPrice.KeyDown
  841.         If e.KeyCode = Keys.Enter Then
  842.             If txtPrice.Text = String.Empty Then
  843.                 txtPrice_Validating(Nothing, Nothing)
  844.             Else
  845.                 Static i As Int16
  846.                 If dslocals.Tables("mdcf").Rows.Count < 1 Then
  847.                     i = 1
  848.                 Else
  849.                     i = i + 1
  850.                 End If
  851.                 txtno.Text = CStr(i)
  852.                 Dim dr As DataRow = dslocals.Tables("mdcf").NewRow()
  853.                 dr("序号") = CStr(i)
  854.                 dr("药品编号") = Me.txtMedNumber.Text.Trim
  855.                 dr("药品名称") = Me.txtmedName.Text.Trim
  856.                 dr("药品规格") = Me.txtMedRule.Text.Trim
  857.                 dr("单位") = Me.txtunit.Text.Trim
  858.                 dr("数量") = Me.txtCount.Text.Trim
  859.                 dr("单价") = CDec(Me.txtPrice.Text.Trim)
  860.                 dr("金额") = CDec(Me.txtPrice.Text.Trim) * CInt(Me.txtCount.Text.Trim)
  861.                 dr("批号") = Me.txtBatch.Text.Trim
  862.                 dr("有效期") = Me.txtAvaid.Text.Trim
  863.                 dr("产地") = Me.txtProduct.Text.Trim
  864.                 dr("货位") = Me.txthw.Text.Trim
  865.                 dr("包装") = Me.txtpackage.Text.Trim
  866.                 dr("票号") = Me.txtbillnumber.Text.Trim
  867.                 dr("货位") = Me.txthw.Text.Trim
  868.                 dr("日期") = Me.txtdate.Value
  869.                 dr("药剂师") = Me.txtdoctor.Text.Trim
  870.                 dr("审核员") = Me.txtshy.Text.Trim
  871.                 dr("处方名称") = Me.txtName.Text.Trim
  872.                 dslocals.Tables("mdcf").Rows.Add(dr)
  873.                 txtMedNumber.Text = ""
  874.                 txtMedNumber.Focus()
  875.                 'CalTotalMoney()
  876.                 clear()
  877.             End If
  878.         End If
  879.         dgview.DataSource = dslocals.Tables("mdcf").DefaultView
  880.     End Sub
  881.     Private Sub frmMdcf_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
  882.         If txtbillnumber.Text <> String.Empty And tbnsave.Enabled = True Then
  883.             lsweb.cancelbill(txtbillnumber.Text.Trim)
  884.         End If
  885.     End Sub
  886.     Private Sub txtMedNumber_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMedNumber.TextChanged
  887.     End Sub
  888.     Private Sub txtPrice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPrice.TextChanged
  889.     End Sub
  890. End Class