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

医药行业

开发平台:

Visual Basic

  1. Public Class frmTj
  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 tbntj As System.Windows.Forms.ToolBar
  25.     Friend WithEvents Label10 As System.Windows.Forms.Label
  26.     Friend WithEvents txtpprice As System.Windows.Forms.TextBox
  27.     Friend WithEvents Label9 As System.Windows.Forms.Label
  28.     Friend WithEvents txtsj As System.Windows.Forms.TextBox
  29.     Friend WithEvents Label8 As System.Windows.Forms.Label
  30.     Friend WithEvents txtjj As System.Windows.Forms.TextBox
  31.     Friend WithEvents Label7 As System.Windows.Forms.Label
  32.     Friend WithEvents txtbillnumber As System.Windows.Forms.TextBox
  33.     Friend WithEvents txtunit As System.Windows.Forms.TextBox
  34.     Friend WithEvents txtmedrule As System.Windows.Forms.TextBox
  35.     Friend WithEvents txtmedname As System.Windows.Forms.TextBox
  36.     Friend WithEvents txtmednumber As System.Windows.Forms.TextBox
  37.     Friend WithEvents txtno As System.Windows.Forms.TextBox
  38.     Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
  39.     Friend WithEvents Label6 As System.Windows.Forms.Label
  40.     Friend WithEvents Label5 As System.Windows.Forms.Label
  41.     Friend WithEvents Label4 As System.Windows.Forms.Label
  42.     Friend WithEvents Label3 As System.Windows.Forms.Label
  43.     Friend WithEvents Label2 As System.Windows.Forms.Label
  44.     Friend WithEvents Label1 As System.Windows.Forms.Label
  45.     Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
  46.     Friend WithEvents txtlprice As System.Windows.Forms.TextBox
  47.     Friend WithEvents Label11 As System.Windows.Forms.Label
  48.     Friend WithEvents txtjprice As System.Windows.Forms.TextBox
  49.     Friend WithEvents Label12 As System.Windows.Forms.Label
  50.     Friend WithEvents txtzprice As System.Windows.Forms.TextBox
  51.     Friend WithEvents txtxzprice As System.Windows.Forms.TextBox
  52.     Friend WithEvents Label13 As System.Windows.Forms.Label
  53.     Friend WithEvents txtxjprice As System.Windows.Forms.TextBox
  54.     Friend WithEvents Label14 As System.Windows.Forms.Label
  55.     Friend WithEvents txtxlprice As System.Windows.Forms.TextBox
  56.     Friend WithEvents Label15 As System.Windows.Forms.Label
  57.     Friend WithEvents txtxpprice As System.Windows.Forms.TextBox
  58.     Friend WithEvents Label16 As System.Windows.Forms.Label
  59.     Friend WithEvents txtxsj As System.Windows.Forms.TextBox
  60.     Friend WithEvents Label17 As System.Windows.Forms.Label
  61.     Friend WithEvents txtxjj As System.Windows.Forms.TextBox
  62.     Friend WithEvents Label18 As System.Windows.Forms.Label
  63.     Friend WithEvents Label19 As System.Windows.Forms.Label
  64.     Friend WithEvents Label20 As System.Windows.Forms.Label
  65.     Friend WithEvents cbojsr As System.Windows.Forms.ComboBox
  66.     Friend WithEvents txtzy As System.Windows.Forms.TextBox
  67.     Friend WithEvents Label21 As System.Windows.Forms.Label
  68.     Friend WithEvents txtyw As System.Windows.Forms.TextBox
  69.     Friend WithEvents TextBox14 As System.Windows.Forms.TextBox
  70.     Friend WithEvents TextBox15 As System.Windows.Forms.TextBox
  71.     Friend WithEvents TextBox16 As System.Windows.Forms.TextBox
  72.     Friend WithEvents TextBox17 As System.Windows.Forms.TextBox
  73.     Friend WithEvents TextBox18 As System.Windows.Forms.TextBox
  74.     Friend WithEvents dgview As System.Windows.Forms.DataGrid
  75.     Friend WithEvents tbnadd As System.Windows.Forms.ToolBarButton
  76.     Friend WithEvents tbnsave As System.Windows.Forms.ToolBarButton
  77.     Friend WithEvents tbnprint As System.Windows.Forms.ToolBarButton
  78.     Friend WithEvents tbnexit As System.Windows.Forms.ToolBarButton
  79.     Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
  80.     Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
  81.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  82.         Me.components = New System.ComponentModel.Container
  83.         Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmTj))
  84.         Me.tbntj = New System.Windows.Forms.ToolBar
  85.         Me.tbnadd = New System.Windows.Forms.ToolBarButton
  86.         Me.tbnsave = New System.Windows.Forms.ToolBarButton
  87.         Me.tbnprint = New System.Windows.Forms.ToolBarButton
  88.         Me.tbnexit = New System.Windows.Forms.ToolBarButton
  89.         Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
  90.         Me.Label10 = New System.Windows.Forms.Label
  91.         Me.txtpprice = New System.Windows.Forms.TextBox
  92.         Me.Label9 = New System.Windows.Forms.Label
  93.         Me.txtsj = New System.Windows.Forms.TextBox
  94.         Me.Label8 = New System.Windows.Forms.Label
  95.         Me.txtjj = New System.Windows.Forms.TextBox
  96.         Me.Label7 = New System.Windows.Forms.Label
  97.         Me.txtbillnumber = New System.Windows.Forms.TextBox
  98.         Me.txtunit = New System.Windows.Forms.TextBox
  99.         Me.txtmedrule = New System.Windows.Forms.TextBox
  100.         Me.txtmedname = New System.Windows.Forms.TextBox
  101.         Me.txtmednumber = New System.Windows.Forms.TextBox
  102.         Me.txtno = New System.Windows.Forms.TextBox
  103.         Me.GroupBox2 = New System.Windows.Forms.GroupBox
  104.         Me.Label6 = New System.Windows.Forms.Label
  105.         Me.Label5 = New System.Windows.Forms.Label
  106.         Me.Label4 = New System.Windows.Forms.Label
  107.         Me.Label3 = New System.Windows.Forms.Label
  108.         Me.Label2 = New System.Windows.Forms.Label
  109.         Me.Label1 = New System.Windows.Forms.Label
  110.         Me.GroupBox1 = New System.Windows.Forms.GroupBox
  111.         Me.txtyw = New System.Windows.Forms.TextBox
  112.         Me.Label21 = New System.Windows.Forms.Label
  113.         Me.txtzy = New System.Windows.Forms.TextBox
  114.         Me.cbojsr = New System.Windows.Forms.ComboBox
  115.         Me.Label20 = New System.Windows.Forms.Label
  116.         Me.Label19 = New System.Windows.Forms.Label
  117.         Me.txtxzprice = New System.Windows.Forms.TextBox
  118.         Me.Label13 = New System.Windows.Forms.Label
  119.         Me.txtxjprice = New System.Windows.Forms.TextBox
  120.         Me.Label14 = New System.Windows.Forms.Label
  121.         Me.txtxlprice = New System.Windows.Forms.TextBox
  122.         Me.Label15 = New System.Windows.Forms.Label
  123.         Me.txtxpprice = New System.Windows.Forms.TextBox
  124.         Me.Label16 = New System.Windows.Forms.Label
  125.         Me.txtxsj = New System.Windows.Forms.TextBox
  126.         Me.Label17 = New System.Windows.Forms.Label
  127.         Me.txtxjj = New System.Windows.Forms.TextBox
  128.         Me.Label18 = New System.Windows.Forms.Label
  129.         Me.txtzprice = New System.Windows.Forms.TextBox
  130.         Me.Label12 = New System.Windows.Forms.Label
  131.         Me.txtjprice = New System.Windows.Forms.TextBox
  132.         Me.Label11 = New System.Windows.Forms.Label
  133.         Me.txtlprice = New System.Windows.Forms.TextBox
  134.         Me.TextBox14 = New System.Windows.Forms.TextBox
  135.         Me.TextBox15 = New System.Windows.Forms.TextBox
  136.         Me.TextBox16 = New System.Windows.Forms.TextBox
  137.         Me.TextBox17 = New System.Windows.Forms.TextBox
  138.         Me.TextBox18 = New System.Windows.Forms.TextBox
  139.         Me.dgview = New System.Windows.Forms.DataGrid
  140.         Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
  141.         Me.GroupBox1.SuspendLayout()
  142.         CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
  143.         Me.SuspendLayout()
  144.         '
  145.         'tbntj
  146.         '
  147.         Me.tbntj.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
  148.         Me.tbntj.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbnadd, Me.tbnsave, Me.tbnprint, Me.tbnexit})
  149.         Me.tbntj.DropDownArrows = True
  150.         Me.tbntj.ImageList = Me.ImageList2
  151.         Me.tbntj.Location = New System.Drawing.Point(0, 0)
  152.         Me.tbntj.Name = "tbntj"
  153.         Me.tbntj.ShowToolTips = True
  154.         Me.tbntj.Size = New System.Drawing.Size(896, 41)
  155.         Me.tbntj.TabIndex = 0
  156.         '
  157.         'tbnadd
  158.         '
  159.         Me.tbnadd.ImageIndex = 7
  160.         Me.tbnadd.Text = "添加"
  161.         '
  162.         'tbnsave
  163.         '
  164.         Me.tbnsave.ImageIndex = 4
  165.         Me.tbnsave.Text = "保存"
  166.         '
  167.         'tbnprint
  168.         '
  169.         Me.tbnprint.ImageIndex = 12
  170.         Me.tbnprint.Text = "打印"
  171.         '
  172.         'tbnexit
  173.         '
  174.         Me.tbnexit.ImageIndex = 11
  175.         Me.tbnexit.Text = "退出"
  176.         '
  177.         'ImageList2
  178.         '
  179.         Me.ImageList2.ImageSize = New System.Drawing.Size(16, 16)
  180.         Me.ImageList2.ImageStream = CType(resources.GetObject("ImageList2.ImageStream"), System.Windows.Forms.ImageListStreamer)
  181.         Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
  182.         '
  183.         'Label10
  184.         '
  185.         Me.Label10.AutoSize = True
  186.         Me.Label10.Location = New System.Drawing.Point(454, 64)
  187.         Me.Label10.Name = "Label10"
  188.         Me.Label10.Size = New System.Drawing.Size(54, 17)
  189.         Me.Label10.TabIndex = 19
  190.         Me.Label10.Text = "零售价:"
  191.         '
  192.         'txtpprice
  193.         '
  194.         Me.txtpprice.Location = New System.Drawing.Point(352, 56)
  195.         Me.txtpprice.Name = "txtpprice"
  196.         Me.txtpprice.ReadOnly = True
  197.         Me.txtpprice.Size = New System.Drawing.Size(80, 21)
  198.         Me.txtpprice.TabIndex = 18
  199.         Me.txtpprice.Text = ""
  200.         '
  201.         'Label9
  202.         '
  203.         Me.Label9.AutoSize = True
  204.         Me.Label9.Location = New System.Drawing.Point(302, 64)
  205.         Me.Label9.Name = "Label9"
  206.         Me.Label9.Size = New System.Drawing.Size(54, 17)
  207.         Me.Label9.TabIndex = 17
  208.         Me.Label9.Text = "批发价:"
  209.         '
  210.         'txtsj
  211.         '
  212.         Me.txtsj.Location = New System.Drawing.Point(200, 56)
  213.         Me.txtsj.Name = "txtsj"
  214.         Me.txtsj.ReadOnly = True
  215.         Me.txtsj.Size = New System.Drawing.Size(80, 21)
  216.         Me.txtsj.TabIndex = 16
  217.         Me.txtsj.Text = ""
  218.         '
  219.         'Label8
  220.         '
  221.         Me.Label8.AutoSize = True
  222.         Me.Label8.Location = New System.Drawing.Point(162, 64)
  223.         Me.Label8.Name = "Label8"
  224.         Me.Label8.Size = New System.Drawing.Size(42, 17)
  225.         Me.Label8.TabIndex = 15
  226.         Me.Label8.Text = "售价:"
  227.         '
  228.         'txtjj
  229.         '
  230.         Me.txtjj.Location = New System.Drawing.Point(56, 56)
  231.         Me.txtjj.Name = "txtjj"
  232.         Me.txtjj.ReadOnly = True
  233.         Me.txtjj.Size = New System.Drawing.Size(80, 21)
  234.         Me.txtjj.TabIndex = 14
  235.         Me.txtjj.Text = ""
  236.         '
  237.         'Label7
  238.         '
  239.         Me.Label7.AutoSize = True
  240.         Me.Label7.Location = New System.Drawing.Point(18, 64)
  241.         Me.Label7.Name = "Label7"
  242.         Me.Label7.Size = New System.Drawing.Size(42, 17)
  243.         Me.Label7.TabIndex = 13
  244.         Me.Label7.Text = "进价:"
  245.         '
  246.         'txtbillnumber
  247.         '
  248.         Me.txtbillnumber.AutoSize = False
  249.         Me.txtbillnumber.Location = New System.Drawing.Point(728, 17)
  250.         Me.txtbillnumber.Name = "txtbillnumber"
  251.         Me.txtbillnumber.ReadOnly = True
  252.         Me.txtbillnumber.Size = New System.Drawing.Size(152, 21)
  253.         Me.txtbillnumber.TabIndex = 12
  254.         Me.txtbillnumber.Text = ""
  255.         '
  256.         'txtunit
  257.         '
  258.         Me.txtunit.AutoSize = False
  259.         Me.txtunit.Location = New System.Drawing.Point(640, 17)
  260.         Me.txtunit.Name = "txtunit"
  261.         Me.txtunit.ReadOnly = True
  262.         Me.txtunit.Size = New System.Drawing.Size(32, 21)
  263.         Me.txtunit.TabIndex = 11
  264.         Me.txtunit.Text = ""
  265.         '
  266.         'txtmedrule
  267.         '
  268.         Me.txtmedrule.AutoSize = False
  269.         Me.txtmedrule.Location = New System.Drawing.Point(496, 16)
  270.         Me.txtmedrule.Name = "txtmedrule"
  271.         Me.txtmedrule.ReadOnly = True
  272.         Me.txtmedrule.Size = New System.Drawing.Size(100, 25)
  273.         Me.txtmedrule.TabIndex = 10
  274.         Me.txtmedrule.Text = ""
  275.         '
  276.         'txtmedname
  277.         '
  278.         Me.txtmedname.AutoSize = False
  279.         Me.txtmedname.Location = New System.Drawing.Point(320, 17)
  280.         Me.txtmedname.Name = "txtmedname"
  281.         Me.txtmedname.ReadOnly = True
  282.         Me.txtmedname.Size = New System.Drawing.Size(100, 25)
  283.         Me.txtmedname.TabIndex = 9
  284.         Me.txtmedname.Text = ""
  285.         '
  286.         'txtmednumber
  287.         '
  288.         Me.txtmednumber.Location = New System.Drawing.Point(168, 17)
  289.         Me.txtmednumber.Name = "txtmednumber"
  290.         Me.txtmednumber.Size = New System.Drawing.Size(80, 21)
  291.         Me.txtmednumber.TabIndex = 8
  292.         Me.txtmednumber.Text = ""
  293.         '
  294.         'txtno
  295.         '
  296.         Me.txtno.Location = New System.Drawing.Point(56, 16)
  297.         Me.txtno.Name = "txtno"
  298.         Me.txtno.ReadOnly = True
  299.         Me.txtno.Size = New System.Drawing.Size(40, 21)
  300.         Me.txtno.TabIndex = 7
  301.         Me.txtno.Text = ""
  302.         '
  303.         'GroupBox2
  304.         '
  305.         Me.GroupBox2.Location = New System.Drawing.Point(8, 40)
  306.         Me.GroupBox2.Name = "GroupBox2"
  307.         Me.GroupBox2.Size = New System.Drawing.Size(872, 8)
  308.         Me.GroupBox2.TabIndex = 6
  309.         Me.GroupBox2.TabStop = False
  310.         '
  311.         'Label6
  312.         '
  313.         Me.Label6.AutoSize = True
  314.         Me.Label6.Location = New System.Drawing.Point(602, 24)
  315.         Me.Label6.Name = "Label6"
  316.         Me.Label6.Size = New System.Drawing.Size(42, 17)
  317.         Me.Label6.TabIndex = 5
  318.         Me.Label6.Text = "单位:"
  319.         '
  320.         'Label5
  321.         '
  322.         Me.Label5.AutoSize = True
  323.         Me.Label5.Location = New System.Drawing.Point(690, 24)
  324.         Me.Label5.Name = "Label5"
  325.         Me.Label5.Size = New System.Drawing.Size(42, 17)
  326.         Me.Label5.TabIndex = 4
  327.         Me.Label5.Text = "票号:"
  328.         '
  329.         'Label4
  330.         '
  331.         Me.Label4.AutoSize = True
  332.         Me.Label4.Location = New System.Drawing.Point(18, 24)
  333.         Me.Label4.Name = "Label4"
  334.         Me.Label4.Size = New System.Drawing.Size(42, 17)
  335.         Me.Label4.TabIndex = 3
  336.         Me.Label4.Text = "序号:"
  337.         '
  338.         'Label3
  339.         '
  340.         Me.Label3.AutoSize = True
  341.         Me.Label3.Location = New System.Drawing.Point(434, 24)
  342.         Me.Label3.Name = "Label3"
  343.         Me.Label3.Size = New System.Drawing.Size(66, 17)
  344.         Me.Label3.TabIndex = 2
  345.         Me.Label3.Text = "药品规格:"
  346.         '
  347.         'Label2
  348.         '
  349.         Me.Label2.AutoSize = True
  350.         Me.Label2.Location = New System.Drawing.Point(258, 24)
  351.         Me.Label2.Name = "Label2"
  352.         Me.Label2.Size = New System.Drawing.Size(66, 17)
  353.         Me.Label2.TabIndex = 1
  354.         Me.Label2.Text = "药品名称:"
  355.         '
  356.         'Label1
  357.         '
  358.         Me.Label1.AutoSize = True
  359.         Me.Label1.Location = New System.Drawing.Point(106, 24)
  360.         Me.Label1.Name = "Label1"
  361.         Me.Label1.Size = New System.Drawing.Size(66, 17)
  362.         Me.Label1.TabIndex = 0
  363.         Me.Label1.Text = "药品编号:"
  364.         '
  365.         'GroupBox1
  366.         '
  367.         Me.GroupBox1.Controls.Add(Me.txtyw)
  368.         Me.GroupBox1.Controls.Add(Me.Label21)
  369.         Me.GroupBox1.Controls.Add(Me.txtzy)
  370.         Me.GroupBox1.Controls.Add(Me.cbojsr)
  371.         Me.GroupBox1.Controls.Add(Me.Label20)
  372.         Me.GroupBox1.Controls.Add(Me.Label19)
  373.         Me.GroupBox1.Controls.Add(Me.txtxzprice)
  374.         Me.GroupBox1.Controls.Add(Me.Label13)
  375.         Me.GroupBox1.Controls.Add(Me.txtxjprice)
  376.         Me.GroupBox1.Controls.Add(Me.Label14)
  377.         Me.GroupBox1.Controls.Add(Me.txtxlprice)
  378.         Me.GroupBox1.Controls.Add(Me.Label15)
  379.         Me.GroupBox1.Controls.Add(Me.txtxpprice)
  380.         Me.GroupBox1.Controls.Add(Me.Label16)
  381.         Me.GroupBox1.Controls.Add(Me.txtxsj)
  382.         Me.GroupBox1.Controls.Add(Me.Label17)
  383.         Me.GroupBox1.Controls.Add(Me.txtxjj)
  384.         Me.GroupBox1.Controls.Add(Me.Label18)
  385.         Me.GroupBox1.Controls.Add(Me.txtzprice)
  386.         Me.GroupBox1.Controls.Add(Me.Label12)
  387.         Me.GroupBox1.Controls.Add(Me.txtjprice)
  388.         Me.GroupBox1.Controls.Add(Me.Label11)
  389.         Me.GroupBox1.Controls.Add(Me.txtlprice)
  390.         Me.GroupBox1.Controls.Add(Me.Label10)
  391.         Me.GroupBox1.Controls.Add(Me.txtpprice)
  392.         Me.GroupBox1.Controls.Add(Me.Label9)
  393.         Me.GroupBox1.Controls.Add(Me.txtsj)
  394.         Me.GroupBox1.Controls.Add(Me.Label8)
  395.         Me.GroupBox1.Controls.Add(Me.txtjj)
  396.         Me.GroupBox1.Controls.Add(Me.Label7)
  397.         Me.GroupBox1.Controls.Add(Me.txtbillnumber)
  398.         Me.GroupBox1.Controls.Add(Me.txtunit)
  399.         Me.GroupBox1.Controls.Add(Me.txtmedrule)
  400.         Me.GroupBox1.Controls.Add(Me.txtmedname)
  401.         Me.GroupBox1.Controls.Add(Me.txtmednumber)
  402.         Me.GroupBox1.Controls.Add(Me.txtno)
  403.         Me.GroupBox1.Controls.Add(Me.GroupBox2)
  404.         Me.GroupBox1.Controls.Add(Me.Label6)
  405.         Me.GroupBox1.Controls.Add(Me.Label5)
  406.         Me.GroupBox1.Controls.Add(Me.Label4)
  407.         Me.GroupBox1.Controls.Add(Me.Label3)
  408.         Me.GroupBox1.Controls.Add(Me.Label2)
  409.         Me.GroupBox1.Controls.Add(Me.Label1)
  410.         Me.GroupBox1.Controls.Add(Me.TextBox14)
  411.         Me.GroupBox1.Controls.Add(Me.TextBox15)
  412.         Me.GroupBox1.Controls.Add(Me.TextBox16)
  413.         Me.GroupBox1.Controls.Add(Me.TextBox17)
  414.         Me.GroupBox1.Controls.Add(Me.TextBox18)
  415.         Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
  416.         Me.GroupBox1.Location = New System.Drawing.Point(0, 41)
  417.         Me.GroupBox1.Name = "GroupBox1"
  418.         Me.GroupBox1.Size = New System.Drawing.Size(896, 158)
  419.         Me.GroupBox1.TabIndex = 1
  420.         Me.GroupBox1.TabStop = False
  421.         '
  422.         'txtyw
  423.         '
  424.         Me.txtyw.Location = New System.Drawing.Point(504, 120)
  425.         Me.txtyw.Name = "txtyw"
  426.         Me.txtyw.Size = New System.Drawing.Size(376, 21)
  427.         Me.txtyw.TabIndex = 42
  428.         Me.txtyw.Text = ""
  429.         '
  430.         'Label21
  431.         '
  432.         Me.Label21.AutoSize = True
  433.         Me.Label21.Location = New System.Drawing.Point(466, 128)
  434.         Me.Label21.Name = "Label21"
  435.         Me.Label21.Size = New System.Drawing.Size(42, 17)
  436.         Me.Label21.TabIndex = 41
  437.         Me.Label21.Text = "业务:"
  438.         '
  439.         'txtzy
  440.         '
  441.         Me.txtzy.Location = New System.Drawing.Point(200, 120)
  442.         Me.txtzy.Name = "txtzy"
  443.         Me.txtzy.Size = New System.Drawing.Size(232, 21)
  444.         Me.txtzy.TabIndex = 40
  445.         Me.txtzy.Text = ""
  446.         '
  447.         'cbojsr
  448.         '
  449.         Me.cbojsr.Location = New System.Drawing.Point(56, 120)
  450.         Me.cbojsr.Name = "cbojsr"
  451.         Me.cbojsr.Size = New System.Drawing.Size(80, 20)
  452.         Me.cbojsr.TabIndex = 39
  453.         '
  454.         'Label20
  455.         '
  456.         Me.Label20.AutoSize = True
  457.         Me.Label20.Location = New System.Drawing.Point(7, 128)
  458.         Me.Label20.Name = "Label20"
  459.         Me.Label20.Size = New System.Drawing.Size(54, 17)
  460.         Me.Label20.TabIndex = 38
  461.         Me.Label20.Text = "经手人:"
  462.         '
  463.         'Label19
  464.         '
  465.         Me.Label19.AutoSize = True
  466.         Me.Label19.Location = New System.Drawing.Point(162, 128)
  467.         Me.Label19.Name = "Label19"
  468.         Me.Label19.Size = New System.Drawing.Size(42, 17)
  469.         Me.Label19.TabIndex = 37
  470.         Me.Label19.Text = "摘要:"
  471.         '
  472.         'txtxzprice
  473.         '
  474.         Me.txtxzprice.Location = New System.Drawing.Point(800, 88)
  475.         Me.txtxzprice.Name = "txtxzprice"
  476.         Me.txtxzprice.Size = New System.Drawing.Size(80, 21)
  477.         Me.txtxzprice.TabIndex = 36
  478.         Me.txtxzprice.Text = "0.00"
  479.         '
  480.         'Label13
  481.         '
  482.         Me.Label13.AutoSize = True
  483.         Me.Label13.Location = New System.Drawing.Point(740, 96)
  484.         Me.Label13.Name = "Label13"
  485.         Me.Label13.Size = New System.Drawing.Size(66, 17)
  486.         Me.Label13.TabIndex = 35
  487.         Me.Label13.Text = "现最低价:"
  488.         '
  489.         'txtxjprice
  490.         '
  491.         Me.txtxjprice.Location = New System.Drawing.Point(656, 88)
  492.         Me.txtxjprice.Name = "txtxjprice"
  493.         Me.txtxjprice.Size = New System.Drawing.Size(80, 21)
  494.         Me.txtxjprice.TabIndex = 34
  495.         Me.txtxjprice.Text = "0.00"
  496.         '
  497.         'Label14
  498.         '
  499.         Me.Label14.AutoSize = True
  500.         Me.Label14.Location = New System.Drawing.Point(594, 96)
  501.         Me.Label14.Name = "Label14"
  502.         Me.Label14.Size = New System.Drawing.Size(66, 17)
  503.         Me.Label14.TabIndex = 33
  504.         Me.Label14.Text = "现建议价:"
  505.         '
  506.         'txtxlprice
  507.         '
  508.         Me.txtxlprice.Location = New System.Drawing.Point(504, 88)
  509.         Me.txtxlprice.Name = "txtxlprice"
  510.         Me.txtxlprice.Size = New System.Drawing.Size(80, 21)
  511.         Me.txtxlprice.TabIndex = 32
  512.         Me.txtxlprice.Text = "0.00"
  513.         '
  514.         'Label15
  515.         '
  516.         Me.Label15.AutoSize = True
  517.         Me.Label15.Location = New System.Drawing.Point(442, 96)
  518.         Me.Label15.Name = "Label15"
  519.         Me.Label15.Size = New System.Drawing.Size(66, 17)
  520.         Me.Label15.TabIndex = 31
  521.         Me.Label15.Text = "现零售价:"
  522.         '
  523.         'txtxpprice
  524.         '
  525.         Me.txtxpprice.Location = New System.Drawing.Point(352, 88)
  526.         Me.txtxpprice.Name = "txtxpprice"
  527.         Me.txtxpprice.Size = New System.Drawing.Size(80, 21)
  528.         Me.txtxpprice.TabIndex = 30
  529.         Me.txtxpprice.Text = "0.00"
  530.         '
  531.         'Label16
  532.         '
  533.         Me.Label16.AutoSize = True
  534.         Me.Label16.Location = New System.Drawing.Point(290, 96)
  535.         Me.Label16.Name = "Label16"
  536.         Me.Label16.Size = New System.Drawing.Size(66, 17)
  537.         Me.Label16.TabIndex = 29
  538.         Me.Label16.Text = "现批发价:"
  539.         '
  540.         'txtxsj
  541.         '
  542.         Me.txtxsj.Location = New System.Drawing.Point(200, 88)
  543.         Me.txtxsj.Name = "txtxsj"
  544.         Me.txtxsj.Size = New System.Drawing.Size(80, 21)
  545.         Me.txtxsj.TabIndex = 28
  546.         Me.txtxsj.Text = "0.00"
  547.         '
  548.         'Label17
  549.         '
  550.         Me.Label17.AutoSize = True
  551.         Me.Label17.Location = New System.Drawing.Point(150, 96)
  552.         Me.Label17.Name = "Label17"
  553.         Me.Label17.Size = New System.Drawing.Size(54, 17)
  554.         Me.Label17.TabIndex = 27
  555.         Me.Label17.Text = "现售价:"
  556.         '
  557.         'txtxjj
  558.         '
  559.         Me.txtxjj.Location = New System.Drawing.Point(56, 88)
  560.         Me.txtxjj.Name = "txtxjj"
  561.         Me.txtxjj.Size = New System.Drawing.Size(80, 21)
  562.         Me.txtxjj.TabIndex = 26
  563.         Me.txtxjj.Text = "0.00"
  564.         '
  565.         'Label18
  566.         '
  567.         Me.Label18.AutoSize = True
  568.         Me.Label18.Location = New System.Drawing.Point(8, 96)
  569.         Me.Label18.Name = "Label18"
  570.         Me.Label18.Size = New System.Drawing.Size(54, 17)
  571.         Me.Label18.TabIndex = 25
  572.         Me.Label18.Text = "现进价:"
  573.         '
  574.         'txtzprice
  575.         '
  576.         Me.txtzprice.Location = New System.Drawing.Point(800, 56)
  577.         Me.txtzprice.Name = "txtzprice"
  578.         Me.txtzprice.ReadOnly = True
  579.         Me.txtzprice.Size = New System.Drawing.Size(80, 21)
  580.         Me.txtzprice.TabIndex = 24
  581.         Me.txtzprice.Text = ""
  582.         '
  583.         'Label12
  584.         '
  585.         Me.Label12.AutoSize = True
  586.         Me.Label12.Location = New System.Drawing.Point(752, 64)
  587.         Me.Label12.Name = "Label12"
  588.         Me.Label12.Size = New System.Drawing.Size(54, 17)
  589.         Me.Label12.TabIndex = 23
  590.         Me.Label12.Text = "最低价:"
  591.         '
  592.         'txtjprice
  593.         '
  594.         Me.txtjprice.Location = New System.Drawing.Point(656, 56)
  595.         Me.txtjprice.Name = "txtjprice"
  596.         Me.txtjprice.ReadOnly = True
  597.         Me.txtjprice.Size = New System.Drawing.Size(80, 21)
  598.         Me.txtjprice.TabIndex = 22
  599.         Me.txtjprice.Text = ""
  600.         '
  601.         'Label11
  602.         '
  603.         Me.Label11.AutoSize = True
  604.         Me.Label11.Location = New System.Drawing.Point(606, 64)
  605.         Me.Label11.Name = "Label11"
  606.         Me.Label11.Size = New System.Drawing.Size(54, 17)
  607.         Me.Label11.TabIndex = 21
  608.         Me.Label11.Text = "建议价:"
  609.         '
  610.         'txtlprice
  611.         '
  612.         Me.txtlprice.Location = New System.Drawing.Point(504, 56)
  613.         Me.txtlprice.Name = "txtlprice"
  614.         Me.txtlprice.ReadOnly = True
  615.         Me.txtlprice.Size = New System.Drawing.Size(80, 21)
  616.         Me.txtlprice.TabIndex = 20
  617.         Me.txtlprice.Text = ""
  618.         '
  619.         'TextBox14
  620.         '
  621.         Me.TextBox14.Location = New System.Drawing.Point(352, 56)
  622.         Me.TextBox14.Name = "TextBox14"
  623.         Me.TextBox14.ReadOnly = True
  624.         Me.TextBox14.Size = New System.Drawing.Size(80, 21)
  625.         Me.TextBox14.TabIndex = 18
  626.         Me.TextBox14.Text = ""
  627.         '
  628.         'TextBox15
  629.         '
  630.         Me.TextBox15.Location = New System.Drawing.Point(656, 56)
  631.         Me.TextBox15.Name = "TextBox15"
  632.         Me.TextBox15.ReadOnly = True
  633.         Me.TextBox15.Size = New System.Drawing.Size(80, 21)
  634.         Me.TextBox15.TabIndex = 22
  635.         Me.TextBox15.Text = ""
  636.         '
  637.         'TextBox16
  638.         '
  639.         Me.TextBox16.Location = New System.Drawing.Point(504, 56)
  640.         Me.TextBox16.Name = "TextBox16"
  641.         Me.TextBox16.ReadOnly = True
  642.         Me.TextBox16.Size = New System.Drawing.Size(80, 21)
  643.         Me.TextBox16.TabIndex = 20
  644.         Me.TextBox16.Text = ""
  645.         '
  646.         'TextBox17
  647.         '
  648.         Me.TextBox17.Location = New System.Drawing.Point(200, 56)
  649.         Me.TextBox17.Name = "TextBox17"
  650.         Me.TextBox17.ReadOnly = True
  651.         Me.TextBox17.Size = New System.Drawing.Size(80, 21)
  652.         Me.TextBox17.TabIndex = 16
  653.         Me.TextBox17.Text = ""
  654.         '
  655.         'TextBox18
  656.         '
  657.         Me.TextBox18.Location = New System.Drawing.Point(800, 56)
  658.         Me.TextBox18.Name = "TextBox18"
  659.         Me.TextBox18.ReadOnly = True
  660.         Me.TextBox18.Size = New System.Drawing.Size(80, 21)
  661.         Me.TextBox18.TabIndex = 24
  662.         Me.TextBox18.Text = ""
  663.         '
  664.         'dgview
  665.         '
  666.         Me.dgview.DataMember = ""
  667.         Me.dgview.Dock = System.Windows.Forms.DockStyle.Fill
  668.         Me.dgview.HeaderForeColor = System.Drawing.SystemColors.ControlText
  669.         Me.dgview.Location = New System.Drawing.Point(0, 199)
  670.         Me.dgview.Name = "dgview"
  671.         Me.dgview.Size = New System.Drawing.Size(896, 277)
  672.         Me.dgview.TabIndex = 2
  673.         '
  674.         'ErrorProvider1
  675.         '
  676.         Me.ErrorProvider1.ContainerControl = Me
  677.         '
  678.         'frmTj
  679.         '
  680.         Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
  681.         Me.ClientSize = New System.Drawing.Size(896, 476)
  682.         Me.Controls.Add(Me.dgview)
  683.         Me.Controls.Add(Me.GroupBox1)
  684.         Me.Controls.Add(Me.tbntj)
  685.         Me.Name = "frmTj"
  686.         Me.Text = "frmTj"
  687.         Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
  688.         Me.GroupBox1.ResumeLayout(False)
  689.         CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
  690.         Me.ResumeLayout(False)
  691.     End Sub
  692. #End Region
  693.     Public lsweb As New jxcmanage
  694.     Public dslocals As DataSet = lsweb.returndataset("select 序号,药品编号,药品名称,药品规格,单位,进价,售价,批发价,零售价,建议价,最低价,现进价,现售价,现批发价,现零售价,现建议价,现最低价,票号,摘要,经手人,业务 from wz_tj", "wz_tj")
  695.     Private Sub txtmednumber_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtmednumber.TextChanged
  696.     End Sub
  697.     Public Function getinfo(ByVal strqueryid As String) As String
  698.         Dim strOrderId As String
  699.         strOrderId = strqueryid
  700.         Return strOrderId
  701.     End Function
  702.     Private Sub txtmednumber_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtmednumber.KeyDown
  703.         If e.KeyCode = Keys.Enter Then
  704.             Dim dlg As frmMedQuery = New frmMedQuery
  705.             dlg.PYM = Me.getinfo(txtmednumber.Text)
  706.             If dlg.PYM = "" Then
  707.                 ErrorProvider1.SetError(txtmednumber, "不能为空,请输入查询码!")
  708.             Else
  709.                 dlg.ShowDialog()
  710.                 ErrorProvider1.SetError(txtmednumber, "")
  711.             End If
  712.             Dim medIdvalue As String
  713.             medIdvalue = dlg.GetInfo("药品编号")
  714.             If medIdvalue Is Nothing Then
  715.                 ErrorProvider1.SetError(txtmednumber, "不能为空,请输入查询码!或没有查到记录,请重新开始!")
  716.                 'txtNumber.Focus()
  717.             Else
  718.                 Dim runSqlQuery As String
  719.                 runSqlQuery = "select * from wz_cp where 药品编号='" & medIdvalue & " '"
  720.                 Dim dv As DataView
  721.                 ' Dim mOrderId As New managers
  722.                 '调用mCustomId对象的SPcustomersID函数
  723.                 Dim dtOrder As DataTable = lsweb.runSql(runSqlQuery).Tables(0)
  724.                 'bb为一随意表名
  725.                 dtOrder.TableName = "bb"
  726.                 dv = dtOrder.DefaultView
  727.                 txtmednumber.Text = dv(0)("药品编号")
  728.                 txtmedname.Text = dv(0)("药品名称")
  729.                 txtmedrule.Text = dv(0)("药品规格")
  730.                 txtunit.Text = dv(0)("单位")
  731.                 txtjj.Text = dv(0)("单价")
  732.                 txtsj.Text = dv(0)("售价")
  733.                 txtxjj.Text = dv(0)("单价")
  734.                 txtxsj.Text = dv(0)("售价")
  735.                 txtpprice.Text = dv(0)("批发价")
  736.                 txtlprice.Text = dv(0)("零售价")
  737.                 txtjprice.Text = dv(0)("建议价")
  738.                 txtzprice.Text = dv(0)("最低价")
  739.                 txtxpprice.Text = dv(0)("批发价")
  740.                 txtxlprice.Text = dv(0)("零售价")
  741.                 txtxjprice.Text = dv(0)("建议价")
  742.                 txtxzprice.Text = dv(0)("最低价")
  743.                 ErrorProvider1.SetError(txtmednumber, "")
  744.                 txtxjj.Focus()
  745.             End If
  746.         End If
  747.     End Sub
  748.     Private Sub txtxjj_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtxjj.TextChanged
  749.     End Sub
  750.     Private Sub txtxjj_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtxjj.KeyDown
  751.         If e.KeyCode = Keys.Enter Then
  752.             txtxsj.Focus()
  753.         End If
  754.     End Sub
  755.     Private Sub txtxsj_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtxsj.TextChanged
  756.     End Sub
  757.     Private Sub txtxsj_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtxsj.KeyDown
  758.         If e.KeyCode = Keys.Enter Then
  759.             txtxpprice.Focus()
  760.         End If
  761.     End Sub
  762.     Private Sub txtxpprice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtxpprice.TextChanged
  763.     End Sub
  764.     Private Sub txtxpprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtxpprice.KeyDown
  765.         If e.KeyCode = Keys.Enter Then
  766.             txtxlprice.Focus()
  767.         End If
  768.     End Sub
  769.     Private Sub txtxlprice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtxlprice.TextChanged
  770.     End Sub
  771.     Private Sub txtxlprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtxlprice.KeyDown
  772.         If e.KeyCode = Keys.Enter Then
  773.             txtxjprice.Focus()
  774.         End If
  775.     End Sub
  776.     Private Sub txtxjprice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtxjprice.TextChanged
  777.     End Sub
  778.     Private Sub txtxjprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtxjprice.KeyDown
  779.         If e.KeyCode = Keys.Enter Then
  780.             txtxzprice.Focus()
  781.         End If
  782.     End Sub
  783.     Private Sub txtxzprice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtxzprice.TextChanged
  784.     End Sub
  785.     Private Sub txtxzprice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtxzprice.KeyDown
  786.         If e.KeyCode = Keys.Enter Then
  787.             cbojsr.Focus()
  788.         End If
  789.     End Sub
  790.     Private Sub cbojsr_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbojsr.SelectedIndexChanged
  791.     End Sub
  792.     Private Sub cbojsr_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cbojsr.KeyDown
  793.         If e.KeyCode = Keys.Enter Then
  794.             txtzy.Focus()
  795.         End If
  796.     End Sub
  797.     Private Sub txtzy_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtzy.TextChanged
  798.     End Sub
  799.     Private Sub txtzy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtzy.KeyDown
  800.         If e.KeyCode = Keys.Enter Then
  801.             txtyw.Focus()
  802.         End If
  803.     End Sub
  804.     Private Sub txtxjj_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtxjj.Validating
  805.         If Not IsNumeric(txtxjj.Text) Or txtxjj.Text = String.Empty Then
  806.             ErrorProvider1.SetError(txtxjj, "不是数值类型且不能为空。")
  807.             e.Cancel = True
  808.         Else
  809.             ErrorProvider1.SetError(txtxjj, "")
  810.         End If
  811.     End Sub
  812.     Private Sub txtxsj_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtxsj.Validating
  813.         If Not IsNumeric(txtxsj.Text) Or txtxsj.Text = String.Empty Then
  814.             ErrorProvider1.SetError(txtxsj, "不是数值类型且不能为空。")
  815.             e.Cancel = True
  816.         Else
  817.             ErrorProvider1.SetError(txtxsj, "")
  818.         End If
  819.     End Sub
  820.     Private Sub txtxpprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtxpprice.Validating
  821.         If Not IsNumeric(txtxpprice.Text) Or txtxpprice.Text = String.Empty Then
  822.             ErrorProvider1.SetError(txtxpprice, "不是数值类型且不能为空。")
  823.             e.Cancel = True
  824.         Else
  825.             ErrorProvider1.SetError(txtxpprice, "")
  826.         End If
  827.     End Sub
  828.     Private Sub txtxlprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtxlprice.Validating
  829.         If Not IsNumeric(txtxlprice.Text) Or txtxlprice.Text = String.Empty Then
  830.             ErrorProvider1.SetError(txtxlprice, "不是数值类型且不能为空。")
  831.             e.Cancel = True
  832.         Else
  833.             ErrorProvider1.SetError(txtxlprice, "")
  834.         End If
  835.     End Sub
  836.     Private Sub txtxjprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtxjprice.Validating
  837.         If Not IsNumeric(txtxjprice.Text) Or txtxjprice.Text = String.Empty Then
  838.             ErrorProvider1.SetError(txtxjprice, "不是数值类型且不能为空。")
  839.             e.Cancel = True
  840.         Else
  841.             ErrorProvider1.SetError(txtxjprice, "")
  842.         End If
  843.     End Sub
  844.     Private Sub txtxzprice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtxzprice.Validating
  845.         If Not IsNumeric(txtxzprice.Text) Or txtxzprice.Text = String.Empty Then
  846.             ErrorProvider1.SetError(txtxzprice, "不是数值类型且不能为空。")
  847.             e.Cancel = True
  848.         Else
  849.             ErrorProvider1.SetError(txtxzprice, "")
  850.         End If
  851.     End Sub
  852.     Private Sub cbojsr_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles cbojsr.Validating
  853.         If cbojsr.Text = String.Empty Then
  854.             ErrorProvider1.SetError(cbojsr, "不能为空!")
  855.             e.Cancel = True
  856.         Else
  857.             ErrorProvider1.SetError(cbojsr, "")
  858.         End If
  859.     End Sub
  860.     Private Sub frmTj_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  861.         tbnsave.Enabled = False
  862.         dslocals.Clear()
  863.         dgview.DataSource = dslocals.Tables("wz_tj").DefaultView
  864.     End Sub
  865.     Public Sub add()
  866.         dslocals.Clear()
  867.         txtmednumber.Text() = ""
  868.         txtmednumber.Focus()
  869.         txtNo.Text = 1
  870.         Dim mmdr As System.Data.SqlClient.SqlDataReader
  871.         
  872.         mmdr = lsweb.returnDataReader("select 操作员 from wz_mm")
  873.         Do While mmdr.Read()
  874.             cbojsr.Items.Add(mmdr("操作员"))
  875.         Loop
  876.         txtbillnumber.Text = lsweb.selectbill("TJ").ToString
  877.         txtmedname.Text() = ""
  878.         txtmedrule.Text() = ""
  879.         txtUnit.Text() = ""
  880.         txtjj.Text() = CStr(0)
  881.         txtsj.Text() = CStr(0)
  882.         txtPprice.Text() = CStr(0)
  883.         txtLprice.Text() = CStr(0)
  884.         txtJprice.Text() = CStr(0)
  885.         txtzprice.Text() = CStr(0)
  886.         txtxjj.Text() = CStr(0)
  887.         txtxsj.Text() = CStr(0)
  888.         txtxpprice.Text() = CStr(0)
  889.         txtxlprice.Text() = CStr(0)
  890.         txtxjprice.Text() = CStr(0)
  891.         txtxzprice.Text() = CStr(0)
  892.         txtyw.Text = ""
  893.         txtzy.Text = ""
  894.     End Sub
  895.     Private Sub clear()
  896.         txtNo.ReadOnly = True
  897.         cbojsr.Enabled = False
  898.         txtmednumber.Text = ""
  899.         txtmedname.Text() = ""
  900.         txtmedrule.Text() = ""
  901.         txtUnit.Text() = ""
  902.        
  903.         txtJJ.Text() = 0.0
  904.         txtsj.Text() = 0.0
  905.         txtPprice.Text() = CStr(0.0)
  906.         txtLprice.Text() = CStr(0.0)
  907.         txtJprice.Text() = CStr(0.0)
  908.         txtzprice.Text() = CStr(0.0)
  909.         txtxjj.Text() = 0.0
  910.         txtxsj.Text() = 0.0
  911.         txtxpprice.Text() = CStr(0.0)
  912.         txtxlprice.Text() = CStr(0.0)
  913.         txtxjprice.Text() = CStr(0.0)
  914.         txtxzprice.Text() = CStr(0.0)
  915.         txtzy.Text = ""
  916.         txtyw.Text = ""
  917.     End Sub
  918.     Public Sub tbnEnable(ByVal strboolean As String, ByVal tbr As ToolBar)
  919.         If strboolean = "tbnAdd.Enabled = True" Then
  920.             tbnsave.Enabled = False
  921.             tbnprint.Enabled = False
  922.             tbnexit.Enabled = True
  923.         ElseIf strboolean = "tbnAdd.Enabled = False" Then
  924.             tbnAdd.Enabled = False
  925.             tbnsave.Enabled = True
  926.             tbnprint.Enabled = True
  927.             tbnexit.Enabled = True
  928.         ElseIf strboolean = "tbnSave.Enabled = True" Then
  929.             tbnAdd.Enabled = False
  930.             tbnprint.Enabled = True
  931.             tbnexit.Enabled = True
  932.         ElseIf strboolean = "tbnSave.Enabled = False" Then
  933.             tbnsave.Enabled = False
  934.             tbnAdd.Enabled = True
  935.             tbnprint.Enabled = True
  936.             tbnexit.Enabled = True
  937.         End If
  938.     End Sub
  939.     Private Sub save()
  940.         If lsweb.updatedataset("select 序号,药品编号,药品名称,药品规格,单位,进价,售价,批发价,零售价,建议价,最低价,现进价,现售价,现批发价,现零售价,现建议价,现最低价,票号,摘要,经手人,业务 from wz_tj", "wz_tj", dslocals, DataRowState.Added) = True Then
  941.             MessageBox.Show("信息成功保存!", "提示", MessageBoxButtons.OK)
  942.         Else
  943.             MessageBox.Show("信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
  944.         End If
  945.     End Sub
  946.     Private Sub txtyw_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtyw.KeyDown
  947.         If e.KeyCode = Keys.Enter Then
  948.             Static i As Int16
  949.             i = i + 1
  950.             txtno.Text = CStr(i)
  951.             Dim dr As DataRow = dslocals.Tables("wz_tj").NewRow()
  952.             dr("序号") = CInt(Me.txtno.Text.Trim)
  953.             dr("票号") = Me.txtbillnumber.Text.Trim
  954.             dr("药品编号") = Me.txtmednumber.Text.Trim
  955.             dr("药品名称") = Me.txtmedname.Text.Trim
  956.             dr("药品规格") = Me.txtmedrule.Text.Trim
  957.             dr("单位") = Me.txtunit.Text.Trim
  958.             dr("进价") = CDec(Me.txtjj.Text.Trim)
  959.             dr("现进价") = CDec(Me.txtxjj.Text.Trim)
  960.             dr("售价") = CDec(Me.txtsj.Text.Trim)
  961.             dr("现售价") = CDec(Me.txtxsj.Text.Trim)
  962.             dr("批发价") = CDec(Me.txtpprice.Text.Trim)
  963.             dr("零售价") = CDec(Me.txtlprice.Text.Trim)
  964.             dr("建议价") = CDec(Me.txtjprice.Text.Trim)
  965.             dr("最低价") = CDec(Me.txtzprice.Text.Trim)
  966.             dr("现批发价") = CDec(Me.txtxpprice.Text.Trim)
  967.             dr("现零售价") = CDec(Me.txtxlprice.Text.Trim)
  968.             dr("现建议价") = CDec(Me.txtxjprice.Text.Trim)
  969.             dr("现最低价") = CDec(Me.txtxzprice.Text.Trim)
  970.             dr("摘要") = Me.txtzy.Text.Trim
  971.             dr("经手人") = Me.cbojsr.Text.Trim
  972.             dr("业务") = Me.txtyw.Text.Trim
  973.             dslocals.Tables("wz_tj").Rows.Add(dr)
  974.             txtmednumber.Focus()
  975.             ' clear()
  976.         End If
  977.         dgview.DataSource = dslocals.Tables("wz_tj").DefaultView
  978.     End Sub
  979.     Private Sub tbntj_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbntj.ButtonClick
  980.         Select Case e.Button.Text
  981.             Case "添加"
  982.                 add()
  983.                 tbnEnable("tbnAdd.Enabled = False", tbntj)
  984.             Case "保存"
  985.                 save()
  986.                 tbnEnable("tbnSave.Enabled = False", tbntj)
  987.             Case "退出"
  988.                 Me.Close()
  989.         End Select
  990.     End Sub
  991. End Class