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

医药行业

开发平台:

Visual Basic

  1. Public Class frmCk
  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 Label7 As System.Windows.Forms.Label
  34.     Friend WithEvents Label8 As System.Windows.Forms.Label
  35.     Friend WithEvents tbrAdd As System.Windows.Forms.ToolBarButton
  36.     Friend WithEvents tbrSave As System.Windows.Forms.ToolBarButton
  37.     Friend WithEvents tbrPrint As System.Windows.Forms.ToolBarButton
  38.     Friend WithEvents tbrQuery As System.Windows.Forms.ToolBarButton
  39.     Friend WithEvents tbrSeparator As System.Windows.Forms.ToolBarButton
  40.     Friend WithEvents tbrExit As System.Windows.Forms.ToolBarButton
  41.     Friend WithEvents Label9 As System.Windows.Forms.Label
  42.     Friend WithEvents Label10 As System.Windows.Forms.Label
  43.     Friend WithEvents Label11 As System.Windows.Forms.Label
  44.     Friend WithEvents Label12 As System.Windows.Forms.Label
  45.     Friend WithEvents Label13 As System.Windows.Forms.Label
  46.     Friend WithEvents Label14 As System.Windows.Forms.Label
  47.     Friend WithEvents Label15 As System.Windows.Forms.Label
  48.     Friend WithEvents Label16 As System.Windows.Forms.Label
  49.     Friend WithEvents Label17 As System.Windows.Forms.Label
  50.     Friend WithEvents Label18 As System.Windows.Forms.Label
  51.     Friend WithEvents Label19 As System.Windows.Forms.Label
  52.     Friend WithEvents Label20 As System.Windows.Forms.Label
  53.     Friend WithEvents Label21 As System.Windows.Forms.Label
  54.     Friend WithEvents Label22 As System.Windows.Forms.Label
  55.     Friend WithEvents Label23 As System.Windows.Forms.Label
  56.     Friend WithEvents Label24 As System.Windows.Forms.Label
  57.     Friend WithEvents txtCustNumber As System.Windows.Forms.TextBox
  58.     Friend WithEvents txtCustName As System.Windows.Forms.TextBox
  59.     Friend WithEvents txtBillnumber As System.Windows.Forms.TextBox
  60.     Friend WithEvents txtNo As System.Windows.Forms.TextBox
  61.     Friend WithEvents cboJs As System.Windows.Forms.ComboBox
  62.     Friend WithEvents txtMedNumber As System.Windows.Forms.TextBox
  63.     Friend WithEvents txtmedName As System.Windows.Forms.TextBox
  64.     Friend WithEvents txtMedRule As System.Windows.Forms.TextBox
  65.     Friend WithEvents txtUnit As System.Windows.Forms.TextBox
  66.     Friend WithEvents txtCount As System.Windows.Forms.TextBox
  67.     Friend WithEvents txtPrice As System.Windows.Forms.TextBox
  68.     Friend WithEvents txtMoney As System.Windows.Forms.TextBox
  69.     Friend WithEvents txtPackage As System.Windows.Forms.TextBox
  70.     Friend WithEvents txtBatch As System.Windows.Forms.TextBox
  71.     Friend WithEvents txtAvaid As System.Windows.Forms.TextBox
  72.     Friend WithEvents txtProduct As System.Windows.Forms.TextBox
  73.     Friend WithEvents txtHw As System.Windows.Forms.TextBox
  74.     Friend WithEvents txtPprice As System.Windows.Forms.TextBox
  75.     Friend WithEvents txtLprice As System.Windows.Forms.TextBox
  76.     Friend WithEvents txtJprice As System.Windows.Forms.TextBox
  77.     Friend WithEvents txtZprice As System.Windows.Forms.TextBox
  78.     Friend WithEvents txtSum As System.Windows.Forms.TextBox
  79.     Friend WithEvents dgck As System.Windows.Forms.DataGrid
  80.     Friend WithEvents txtDate As System.Windows.Forms.DateTimePicker
  81.     Friend WithEvents tbrCk As System.Windows.Forms.ToolBar
  82.     Friend WithEvents MsdnTextboxValidator1 As MSDNTextboxValidator.MSDNTextboxValidator
  83.     Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
  84.     Friend WithEvents txtXsy As System.Windows.Forms.TextBox
  85.     Friend WithEvents tbrth As System.Windows.Forms.ToolBarButton
  86.     Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
  87.     Friend WithEvents txtID As System.Windows.Forms.Label
  88.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  89.         Me.components = New System.ComponentModel.Container
  90.         Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmCk))
  91.         Me.tbrCk = New System.Windows.Forms.ToolBar
  92.         Me.tbrAdd = New System.Windows.Forms.ToolBarButton
  93.         Me.tbrSave = New System.Windows.Forms.ToolBarButton
  94.         Me.tbrPrint = New System.Windows.Forms.ToolBarButton
  95.         Me.tbrQuery = New System.Windows.Forms.ToolBarButton
  96.         Me.tbrSeparator = New System.Windows.Forms.ToolBarButton
  97.         Me.tbrth = New System.Windows.Forms.ToolBarButton
  98.         Me.tbrExit = New System.Windows.Forms.ToolBarButton
  99.         Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
  100.         Me.StatusBar1 = New System.Windows.Forms.StatusBar
  101.         Me.GroupBox1 = New System.Windows.Forms.GroupBox
  102.         Me.txtXsy = New System.Windows.Forms.TextBox
  103.         Me.txtDate = New System.Windows.Forms.DateTimePicker
  104.         Me.txtSum = New System.Windows.Forms.TextBox
  105.         Me.Label24 = New System.Windows.Forms.Label
  106.         Me.cboJs = New System.Windows.Forms.ComboBox
  107.         Me.txtNo = New System.Windows.Forms.TextBox
  108.         Me.txtBillnumber = New System.Windows.Forms.TextBox
  109.         Me.txtCustName = New System.Windows.Forms.TextBox
  110.         Me.txtCustNumber = New System.Windows.Forms.TextBox
  111.         Me.Label7 = New System.Windows.Forms.Label
  112.         Me.Label6 = New System.Windows.Forms.Label
  113.         Me.Label5 = New System.Windows.Forms.Label
  114.         Me.Label4 = New System.Windows.Forms.Label
  115.         Me.Label3 = New System.Windows.Forms.Label
  116.         Me.Label2 = New System.Windows.Forms.Label
  117.         Me.Label1 = New System.Windows.Forms.Label
  118.         Me.GroupBox2 = New System.Windows.Forms.GroupBox
  119.         Me.txtID = New System.Windows.Forms.Label
  120.         Me.txtZprice = New System.Windows.Forms.TextBox
  121.         Me.txtJprice = New System.Windows.Forms.TextBox
  122.         Me.txtLprice = New System.Windows.Forms.TextBox
  123.         Me.txtPprice = New System.Windows.Forms.TextBox
  124.         Me.txtHw = New System.Windows.Forms.TextBox
  125.         Me.txtProduct = New System.Windows.Forms.TextBox
  126.         Me.txtAvaid = New System.Windows.Forms.TextBox
  127.         Me.txtBatch = New System.Windows.Forms.TextBox
  128.         Me.txtPackage = New System.Windows.Forms.TextBox
  129.         Me.txtMoney = New System.Windows.Forms.TextBox
  130.         Me.txtPrice = New System.Windows.Forms.TextBox
  131.         Me.txtCount = New System.Windows.Forms.TextBox
  132.         Me.txtUnit = New System.Windows.Forms.TextBox
  133.         Me.txtMedRule = New System.Windows.Forms.TextBox
  134.         Me.txtmedName = New System.Windows.Forms.TextBox
  135.         Me.txtMedNumber = New System.Windows.Forms.TextBox
  136.         Me.Label23 = New System.Windows.Forms.Label
  137.         Me.Label22 = New System.Windows.Forms.Label
  138.         Me.Label21 = New System.Windows.Forms.Label
  139.         Me.Label20 = New System.Windows.Forms.Label
  140.         Me.Label19 = New System.Windows.Forms.Label
  141.         Me.Label18 = New System.Windows.Forms.Label
  142.         Me.Label17 = New System.Windows.Forms.Label
  143.         Me.Label16 = New System.Windows.Forms.Label
  144.         Me.Label15 = New System.Windows.Forms.Label
  145.         Me.Label14 = New System.Windows.Forms.Label
  146.         Me.Label13 = New System.Windows.Forms.Label
  147.         Me.Label12 = New System.Windows.Forms.Label
  148.         Me.Label11 = New System.Windows.Forms.Label
  149.         Me.Label10 = New System.Windows.Forms.Label
  150.         Me.Label9 = New System.Windows.Forms.Label
  151.         Me.Label8 = New System.Windows.Forms.Label
  152.         Me.dgck = New System.Windows.Forms.DataGrid
  153.         Me.MsdnTextboxValidator1 = New MSDNTextboxValidator.MSDNTextboxValidator(Me.components)
  154.         Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
  155.         Me.GroupBox1.SuspendLayout()
  156.         Me.GroupBox2.SuspendLayout()
  157.         CType(Me.dgck, System.ComponentModel.ISupportInitialize).BeginInit()
  158.         Me.SuspendLayout()
  159.         '
  160.         'tbrCk
  161.         '
  162.         Me.tbrCk.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
  163.         Me.tbrCk.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbrAdd, Me.tbrSave, Me.tbrPrint, Me.tbrQuery, Me.tbrSeparator, Me.tbrth, Me.tbrExit})
  164.         Me.tbrCk.DropDownArrows = True
  165.         Me.tbrCk.ImageList = Me.ImageList2
  166.         Me.tbrCk.Location = New System.Drawing.Point(0, 0)
  167.         Me.tbrCk.Name = "tbrCk"
  168.         Me.tbrCk.ShowToolTips = True
  169.         Me.tbrCk.Size = New System.Drawing.Size(678, 41)
  170.         Me.tbrCk.TabIndex = 0
  171.         '
  172.         'tbrAdd
  173.         '
  174.         Me.tbrAdd.ImageIndex = 7
  175.         Me.tbrAdd.Text = "添加"
  176.         '
  177.         'tbrSave
  178.         '
  179.         Me.tbrSave.ImageIndex = 4
  180.         Me.tbrSave.Text = "保存"
  181.         '
  182.         'tbrPrint
  183.         '
  184.         Me.tbrPrint.ImageIndex = 12
  185.         Me.tbrPrint.Text = "打印"
  186.         '
  187.         'tbrQuery
  188.         '
  189.         Me.tbrQuery.ImageIndex = 13
  190.         Me.tbrQuery.Text = "查询"
  191.         '
  192.         'tbrSeparator
  193.         '
  194.         Me.tbrSeparator.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
  195.         '
  196.         'tbrth
  197.         '
  198.         Me.tbrth.ImageIndex = 9
  199.         Me.tbrth.Text = "退货"
  200.         '
  201.         'tbrExit
  202.         '
  203.         Me.tbrExit.ImageIndex = 11
  204.         Me.tbrExit.Text = "退出"
  205.         '
  206.         'ImageList2
  207.         '
  208.         Me.ImageList2.ImageSize = New System.Drawing.Size(16, 16)
  209.         Me.ImageList2.ImageStream = CType(resources.GetObject("ImageList2.ImageStream"), System.Windows.Forms.ImageListStreamer)
  210.         Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
  211.         '
  212.         'StatusBar1
  213.         '
  214.         Me.StatusBar1.Location = New System.Drawing.Point(0, 427)
  215.         Me.StatusBar1.Name = "StatusBar1"
  216.         Me.StatusBar1.Size = New System.Drawing.Size(678, 21)
  217.         Me.StatusBar1.TabIndex = 1
  218.         '
  219.         'GroupBox1
  220.         '
  221.         Me.GroupBox1.Controls.Add(Me.txtXsy)
  222.         Me.GroupBox1.Controls.Add(Me.txtDate)
  223.         Me.GroupBox1.Controls.Add(Me.txtSum)
  224.         Me.GroupBox1.Controls.Add(Me.Label24)
  225.         Me.GroupBox1.Controls.Add(Me.cboJs)
  226.         Me.GroupBox1.Controls.Add(Me.txtNo)
  227.         Me.GroupBox1.Controls.Add(Me.txtBillnumber)
  228.         Me.GroupBox1.Controls.Add(Me.txtCustName)
  229.         Me.GroupBox1.Controls.Add(Me.txtCustNumber)
  230.         Me.GroupBox1.Controls.Add(Me.Label7)
  231.         Me.GroupBox1.Controls.Add(Me.Label6)
  232.         Me.GroupBox1.Controls.Add(Me.Label5)
  233.         Me.GroupBox1.Controls.Add(Me.Label4)
  234.         Me.GroupBox1.Controls.Add(Me.Label3)
  235.         Me.GroupBox1.Controls.Add(Me.Label2)
  236.         Me.GroupBox1.Controls.Add(Me.Label1)
  237.         Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
  238.         Me.GroupBox1.Location = New System.Drawing.Point(0, 41)
  239.         Me.GroupBox1.Name = "GroupBox1"
  240.         Me.GroupBox1.Size = New System.Drawing.Size(678, 74)
  241.         Me.GroupBox1.TabIndex = 2
  242.         Me.GroupBox1.TabStop = False
  243.         Me.GroupBox1.Text = "票据信息"
  244.         '
  245.         'txtXsy
  246.         '
  247.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtXsy, True)
  248.         Me.MsdnTextboxValidator1.SetDataType(Me.txtXsy, MSDNTextboxValidator.DataTypeConstants.StringType)
  249.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtXsy, "")
  250.         Me.txtXsy.Location = New System.Drawing.Point(390, 44)
  251.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtXsy, "")
  252.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtXsy, "")
  253.         Me.txtXsy.Name = "txtXsy"
  254.         Me.txtXsy.ReadOnly = True
  255.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtXsy, "")
  256.         Me.MsdnTextboxValidator1.SetRequired(Me.txtXsy, False)
  257.         Me.txtXsy.Size = New System.Drawing.Size(102, 21)
  258.         Me.txtXsy.TabIndex = 17
  259.         Me.txtXsy.Text = ""
  260.         '
  261.         'txtDate
  262.         '
  263.         Me.txtDate.Location = New System.Drawing.Point(390, 19)
  264.         Me.txtDate.Name = "txtDate"
  265.         Me.txtDate.Size = New System.Drawing.Size(102, 21)
  266.         Me.txtDate.TabIndex = 16
  267.         Me.txtDate.Value = New Date(2006, 3, 28, 0, 0, 0, 0)
  268.         '
  269.         'txtSum
  270.         '
  271.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtSum, True)
  272.         Me.MsdnTextboxValidator1.SetDataType(Me.txtSum, MSDNTextboxValidator.DataTypeConstants.StringType)
  273.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtSum, "")
  274.         Me.txtSum.Location = New System.Drawing.Point(552, 44)
  275.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtSum, "")
  276.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtSum, "")
  277.         Me.txtSum.Name = "txtSum"
  278.         Me.txtSum.ReadOnly = True
  279.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtSum, "")
  280.         Me.MsdnTextboxValidator1.SetRequired(Me.txtSum, False)
  281.         Me.txtSum.Size = New System.Drawing.Size(114, 21)
  282.         Me.txtSum.TabIndex = 15
  283.         Me.txtSum.Text = ""
  284.         '
  285.         'Label24
  286.         '
  287.         Me.Label24.AutoSize = True
  288.         Me.Label24.ForeColor = System.Drawing.Color.Red
  289.         Me.Label24.Location = New System.Drawing.Point(498, 50)
  290.         Me.Label24.Name = "Label24"
  291.         Me.Label24.Size = New System.Drawing.Size(66, 17)
  292.         Me.Label24.TabIndex = 14
  293.         Me.Label24.Text = "合计金额:"
  294.         '
  295.         'cboJs
  296.         '
  297.         Me.cboJs.Items.AddRange(New Object() {"现金", "支票", "记账"})
  298.         Me.cboJs.Location = New System.Drawing.Point(210, 44)
  299.         Me.cboJs.Name = "cboJs"
  300.         Me.cboJs.Size = New System.Drawing.Size(72, 20)
  301.         Me.cboJs.TabIndex = 12
  302.         '
  303.         'txtNo
  304.         '
  305.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtNo, True)
  306.         Me.MsdnTextboxValidator1.SetDataType(Me.txtNo, MSDNTextboxValidator.DataTypeConstants.StringType)
  307.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtNo, "")
  308.         Me.txtNo.Location = New System.Drawing.Point(60, 44)
  309.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtNo, "")
  310.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtNo, "")
  311.         Me.txtNo.Name = "txtNo"
  312.         Me.txtNo.ReadOnly = True
  313.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtNo, "")
  314.         Me.MsdnTextboxValidator1.SetRequired(Me.txtNo, False)
  315.         Me.txtNo.Size = New System.Drawing.Size(78, 21)
  316.         Me.txtNo.TabIndex = 11
  317.         Me.txtNo.Text = ""
  318.         '
  319.         'txtBillnumber
  320.         '
  321.         Me.txtBillnumber.BackColor = System.Drawing.SystemColors.Control
  322.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtBillnumber, True)
  323.         Me.MsdnTextboxValidator1.SetDataType(Me.txtBillnumber, MSDNTextboxValidator.DataTypeConstants.StringType)
  324.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtBillnumber, "")
  325.         Me.txtBillnumber.Location = New System.Drawing.Point(552, 19)
  326.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtBillnumber, "")
  327.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtBillnumber, "")
  328.         Me.txtBillnumber.Name = "txtBillnumber"
  329.         Me.txtBillnumber.ReadOnly = True
  330.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtBillnumber, "")
  331.         Me.MsdnTextboxValidator1.SetRequired(Me.txtBillnumber, False)
  332.         Me.txtBillnumber.Size = New System.Drawing.Size(114, 21)
  333.         Me.txtBillnumber.TabIndex = 10
  334.         Me.txtBillnumber.Text = ""
  335.         '
  336.         'txtCustName
  337.         '
  338.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtCustName, True)
  339.         Me.MsdnTextboxValidator1.SetDataType(Me.txtCustName, MSDNTextboxValidator.DataTypeConstants.StringType)
  340.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtCustName, "")
  341.         Me.txtCustName.Location = New System.Drawing.Point(210, 19)
  342.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtCustName, "")
  343.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtCustName, "")
  344.         Me.txtCustName.Name = "txtCustName"
  345.         Me.txtCustName.ReadOnly = True
  346.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtCustName, "")
  347.         Me.MsdnTextboxValidator1.SetRequired(Me.txtCustName, False)
  348.         Me.txtCustName.Size = New System.Drawing.Size(126, 21)
  349.         Me.txtCustName.TabIndex = 8
  350.         Me.txtCustName.Text = ""
  351.         '
  352.         'txtCustNumber
  353.         '
  354.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtCustNumber, True)
  355.         Me.MsdnTextboxValidator1.SetDataType(Me.txtCustNumber, MSDNTextboxValidator.DataTypeConstants.StringType)
  356.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtCustNumber, "sorry")
  357.         Me.txtCustNumber.Location = New System.Drawing.Point(60, 19)
  358.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtCustNumber, "")
  359.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtCustNumber, "")
  360.         Me.txtCustNumber.Name = "txtCustNumber"
  361.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtCustNumber, "<>""""")
  362.         Me.MsdnTextboxValidator1.SetRequired(Me.txtCustNumber, True)
  363.         Me.txtCustNumber.Size = New System.Drawing.Size(78, 21)
  364.         Me.txtCustNumber.TabIndex = 7
  365.         Me.txtCustNumber.Text = ""
  366.         '
  367.         'Label7
  368.         '
  369.         Me.Label7.AutoSize = True
  370.         Me.Label7.Location = New System.Drawing.Point(348, 50)
  371.         Me.Label7.Name = "Label7"
  372.         Me.Label7.Size = New System.Drawing.Size(54, 17)
  373.         Me.Label7.TabIndex = 6
  374.         Me.Label7.Text = "销售员:"
  375.         '
  376.         'Label6
  377.         '
  378.         Me.Label6.AutoSize = True
  379.         Me.Label6.Location = New System.Drawing.Point(156, 50)
  380.         Me.Label6.Name = "Label6"
  381.         Me.Label6.Size = New System.Drawing.Size(66, 17)
  382.         Me.Label6.TabIndex = 5
  383.         Me.Label6.Text = "结算方式:"
  384.         '
  385.         'Label5
  386.         '
  387.         Me.Label5.AutoSize = True
  388.         Me.Label5.Location = New System.Drawing.Point(30, 50)
  389.         Me.Label5.Name = "Label5"
  390.         Me.Label5.Size = New System.Drawing.Size(42, 17)
  391.         Me.Label5.TabIndex = 4
  392.         Me.Label5.Text = "序号:"
  393.         '
  394.         'Label4
  395.         '
  396.         Me.Label4.AutoSize = True
  397.         Me.Label4.Location = New System.Drawing.Point(522, 25)
  398.         Me.Label4.Name = "Label4"
  399.         Me.Label4.Size = New System.Drawing.Size(42, 17)
  400.         Me.Label4.TabIndex = 3
  401.         Me.Label4.Text = "票号:"
  402.         '
  403.         'Label3
  404.         '
  405.         Me.Label3.AutoSize = True
  406.         Me.Label3.Location = New System.Drawing.Point(360, 25)
  407.         Me.Label3.Name = "Label3"
  408.         Me.Label3.Size = New System.Drawing.Size(42, 17)
  409.         Me.Label3.TabIndex = 2
  410.         Me.Label3.Text = "日期:"
  411.         '
  412.         'Label2
  413.         '
  414.         Me.Label2.AutoSize = True
  415.         Me.Label2.Location = New System.Drawing.Point(156, 25)
  416.         Me.Label2.Name = "Label2"
  417.         Me.Label2.Size = New System.Drawing.Size(66, 17)
  418.         Me.Label2.TabIndex = 1
  419.         Me.Label2.Text = "客户名称:"
  420.         '
  421.         'Label1
  422.         '
  423.         Me.Label1.AutoSize = True
  424.         Me.Label1.Location = New System.Drawing.Point(6, 25)
  425.         Me.Label1.Name = "Label1"
  426.         Me.Label1.Size = New System.Drawing.Size(66, 17)
  427.         Me.Label1.TabIndex = 0
  428.         Me.Label1.Text = "客户编号:"
  429.         '
  430.         'GroupBox2
  431.         '
  432.         Me.GroupBox2.Controls.Add(Me.txtID)
  433.         Me.GroupBox2.Controls.Add(Me.txtZprice)
  434.         Me.GroupBox2.Controls.Add(Me.txtJprice)
  435.         Me.GroupBox2.Controls.Add(Me.txtLprice)
  436.         Me.GroupBox2.Controls.Add(Me.txtPprice)
  437.         Me.GroupBox2.Controls.Add(Me.txtHw)
  438.         Me.GroupBox2.Controls.Add(Me.txtProduct)
  439.         Me.GroupBox2.Controls.Add(Me.txtAvaid)
  440.         Me.GroupBox2.Controls.Add(Me.txtBatch)
  441.         Me.GroupBox2.Controls.Add(Me.txtPackage)
  442.         Me.GroupBox2.Controls.Add(Me.txtMoney)
  443.         Me.GroupBox2.Controls.Add(Me.txtPrice)
  444.         Me.GroupBox2.Controls.Add(Me.txtCount)
  445.         Me.GroupBox2.Controls.Add(Me.txtUnit)
  446.         Me.GroupBox2.Controls.Add(Me.txtMedRule)
  447.         Me.GroupBox2.Controls.Add(Me.txtmedName)
  448.         Me.GroupBox2.Controls.Add(Me.txtMedNumber)
  449.         Me.GroupBox2.Controls.Add(Me.Label23)
  450.         Me.GroupBox2.Controls.Add(Me.Label22)
  451.         Me.GroupBox2.Controls.Add(Me.Label21)
  452.         Me.GroupBox2.Controls.Add(Me.Label20)
  453.         Me.GroupBox2.Controls.Add(Me.Label19)
  454.         Me.GroupBox2.Controls.Add(Me.Label18)
  455.         Me.GroupBox2.Controls.Add(Me.Label17)
  456.         Me.GroupBox2.Controls.Add(Me.Label16)
  457.         Me.GroupBox2.Controls.Add(Me.Label15)
  458.         Me.GroupBox2.Controls.Add(Me.Label14)
  459.         Me.GroupBox2.Controls.Add(Me.Label13)
  460.         Me.GroupBox2.Controls.Add(Me.Label12)
  461.         Me.GroupBox2.Controls.Add(Me.Label11)
  462.         Me.GroupBox2.Controls.Add(Me.Label10)
  463.         Me.GroupBox2.Controls.Add(Me.Label9)
  464.         Me.GroupBox2.Controls.Add(Me.Label8)
  465.         Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Top
  466.         Me.GroupBox2.Location = New System.Drawing.Point(0, 115)
  467.         Me.GroupBox2.Name = "GroupBox2"
  468.         Me.GroupBox2.Size = New System.Drawing.Size(678, 131)
  469.         Me.GroupBox2.TabIndex = 3
  470.         Me.GroupBox2.TabStop = False
  471.         Me.GroupBox2.Text = "药品信息"
  472.         '
  473.         'txtID
  474.         '
  475.         Me.txtID.Location = New System.Drawing.Point(630, 25)
  476.         Me.txtID.Name = "txtID"
  477.         Me.txtID.Size = New System.Drawing.Size(36, 18)
  478.         Me.txtID.TabIndex = 31
  479.         '
  480.         'txtZprice
  481.         '
  482.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtZprice, True)
  483.         Me.MsdnTextboxValidator1.SetDataType(Me.txtZprice, MSDNTextboxValidator.DataTypeConstants.StringType)
  484.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtZprice, "")
  485.         Me.txtZprice.Location = New System.Drawing.Point(552, 100)
  486.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtZprice, "")
  487.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtZprice, "")
  488.         Me.txtZprice.Name = "txtZprice"
  489.         Me.txtZprice.ReadOnly = True
  490.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtZprice, "")
  491.         Me.MsdnTextboxValidator1.SetRequired(Me.txtZprice, False)
  492.         Me.txtZprice.Size = New System.Drawing.Size(114, 21)
  493.         Me.txtZprice.TabIndex = 30
  494.         Me.txtZprice.Text = ""
  495.         '
  496.         'txtJprice
  497.         '
  498.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtJprice, True)
  499.         Me.MsdnTextboxValidator1.SetDataType(Me.txtJprice, MSDNTextboxValidator.DataTypeConstants.StringType)
  500.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtJprice, "")
  501.         Me.txtJprice.Location = New System.Drawing.Point(402, 100)
  502.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtJprice, "")
  503.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtJprice, "")
  504.         Me.txtJprice.Name = "txtJprice"
  505.         Me.txtJprice.ReadOnly = True
  506.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtJprice, "")
  507.         Me.MsdnTextboxValidator1.SetRequired(Me.txtJprice, False)
  508.         Me.txtJprice.Size = New System.Drawing.Size(96, 21)
  509.         Me.txtJprice.TabIndex = 29
  510.         Me.txtJprice.Text = "0.00"
  511.         '
  512.         'txtLprice
  513.         '
  514.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtLprice, True)
  515.         Me.MsdnTextboxValidator1.SetDataType(Me.txtLprice, MSDNTextboxValidator.DataTypeConstants.StringType)
  516.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtLprice, "")
  517.         Me.txtLprice.Location = New System.Drawing.Point(210, 100)
  518.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtLprice, "")
  519.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtLprice, "")
  520.         Me.txtLprice.Name = "txtLprice"
  521.         Me.txtLprice.ReadOnly = True
  522.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtLprice, "")
  523.         Me.MsdnTextboxValidator1.SetRequired(Me.txtLprice, False)
  524.         Me.txtLprice.Size = New System.Drawing.Size(72, 21)
  525.         Me.txtLprice.TabIndex = 28
  526.         Me.txtLprice.Text = "0.00"
  527.         '
  528.         'txtPprice
  529.         '
  530.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtPprice, True)
  531.         Me.MsdnTextboxValidator1.SetDataType(Me.txtPprice, MSDNTextboxValidator.DataTypeConstants.StringType)
  532.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtPprice, "")
  533.         Me.txtPprice.Location = New System.Drawing.Point(60, 100)
  534.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtPprice, "")
  535.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtPprice, "")
  536.         Me.txtPprice.Name = "txtPprice"
  537.         Me.txtPprice.ReadOnly = True
  538.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtPprice, "")
  539.         Me.MsdnTextboxValidator1.SetRequired(Me.txtPprice, False)
  540.         Me.txtPprice.Size = New System.Drawing.Size(78, 21)
  541.         Me.txtPprice.TabIndex = 27
  542.         Me.txtPprice.Text = ""
  543.         '
  544.         'txtHw
  545.         '
  546.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtHw, True)
  547.         Me.MsdnTextboxValidator1.SetDataType(Me.txtHw, MSDNTextboxValidator.DataTypeConstants.StringType)
  548.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtHw, "")
  549.         Me.txtHw.Location = New System.Drawing.Point(552, 75)
  550.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtHw, "")
  551.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtHw, "")
  552.         Me.txtHw.Name = "txtHw"
  553.         Me.txtHw.ReadOnly = True
  554.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtHw, "")
  555.         Me.MsdnTextboxValidator1.SetRequired(Me.txtHw, False)
  556.         Me.txtHw.Size = New System.Drawing.Size(114, 21)
  557.         Me.txtHw.TabIndex = 26
  558.         Me.txtHw.Text = ""
  559.         '
  560.         'txtProduct
  561.         '
  562.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtProduct, True)
  563.         Me.MsdnTextboxValidator1.SetDataType(Me.txtProduct, MSDNTextboxValidator.DataTypeConstants.StringType)
  564.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtProduct, "")
  565.         Me.txtProduct.Location = New System.Drawing.Point(402, 75)
  566.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtProduct, "")
  567.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtProduct, "")
  568.         Me.txtProduct.Name = "txtProduct"
  569.         Me.txtProduct.ReadOnly = True
  570.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtProduct, "")
  571.         Me.MsdnTextboxValidator1.SetRequired(Me.txtProduct, False)
  572.         Me.txtProduct.Size = New System.Drawing.Size(96, 21)
  573.         Me.txtProduct.TabIndex = 25
  574.         Me.txtProduct.Text = ""
  575.         '
  576.         'txtAvaid
  577.         '
  578.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtAvaid, True)
  579.         Me.MsdnTextboxValidator1.SetDataType(Me.txtAvaid, MSDNTextboxValidator.DataTypeConstants.StringType)
  580.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtAvaid, "")
  581.         Me.txtAvaid.Location = New System.Drawing.Point(210, 75)
  582.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtAvaid, "")
  583.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtAvaid, "")
  584.         Me.txtAvaid.Name = "txtAvaid"
  585.         Me.txtAvaid.ReadOnly = True
  586.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtAvaid, "")
  587.         Me.MsdnTextboxValidator1.SetRequired(Me.txtAvaid, False)
  588.         Me.txtAvaid.Size = New System.Drawing.Size(72, 21)
  589.         Me.txtAvaid.TabIndex = 24
  590.         Me.txtAvaid.Text = ""
  591.         '
  592.         'txtBatch
  593.         '
  594.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtBatch, True)
  595.         Me.MsdnTextboxValidator1.SetDataType(Me.txtBatch, MSDNTextboxValidator.DataTypeConstants.StringType)
  596.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtBatch, "")
  597.         Me.txtBatch.Location = New System.Drawing.Point(60, 75)
  598.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtBatch, "")
  599.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtBatch, "")
  600.         Me.txtBatch.Name = "txtBatch"
  601.         Me.txtBatch.ReadOnly = True
  602.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtBatch, "")
  603.         Me.MsdnTextboxValidator1.SetRequired(Me.txtBatch, False)
  604.         Me.txtBatch.Size = New System.Drawing.Size(78, 21)
  605.         Me.txtBatch.TabIndex = 23
  606.         Me.txtBatch.Text = ""
  607.         '
  608.         'txtPackage
  609.         '
  610.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtPackage, True)
  611.         Me.MsdnTextboxValidator1.SetDataType(Me.txtPackage, MSDNTextboxValidator.DataTypeConstants.StringType)
  612.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtPackage, "")
  613.         Me.txtPackage.Location = New System.Drawing.Point(552, 50)
  614.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtPackage, "")
  615.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtPackage, "")
  616.         Me.txtPackage.Name = "txtPackage"
  617.         Me.txtPackage.ReadOnly = True
  618.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtPackage, "")
  619.         Me.MsdnTextboxValidator1.SetRequired(Me.txtPackage, False)
  620.         Me.txtPackage.Size = New System.Drawing.Size(114, 21)
  621.         Me.txtPackage.TabIndex = 22
  622.         Me.txtPackage.Text = ""
  623.         '
  624.         'txtMoney
  625.         '
  626.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtMoney, True)
  627.         Me.MsdnTextboxValidator1.SetDataType(Me.txtMoney, MSDNTextboxValidator.DataTypeConstants.StringType)
  628.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtMoney, "")
  629.         Me.txtMoney.Location = New System.Drawing.Point(402, 50)
  630.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtMoney, "")
  631.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtMoney, "")
  632.         Me.txtMoney.Name = "txtMoney"
  633.         Me.txtMoney.ReadOnly = True
  634.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtMoney, "")
  635.         Me.MsdnTextboxValidator1.SetRequired(Me.txtMoney, False)
  636.         Me.txtMoney.Size = New System.Drawing.Size(96, 21)
  637.         Me.txtMoney.TabIndex = 21
  638.         Me.txtMoney.Text = "0.00"
  639.         '
  640.         'txtPrice
  641.         '
  642.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtPrice, True)
  643.         Me.MsdnTextboxValidator1.SetDataType(Me.txtPrice, MSDNTextboxValidator.DataTypeConstants.DoubleType)
  644.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtPrice, "")
  645.         Me.txtPrice.Location = New System.Drawing.Point(210, 50)
  646.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtPrice, "")
  647.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtPrice, "")
  648.         Me.txtPrice.Name = "txtPrice"
  649.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtPrice, "")
  650.         Me.MsdnTextboxValidator1.SetRequired(Me.txtPrice, False)
  651.         Me.txtPrice.Size = New System.Drawing.Size(72, 21)
  652.         Me.txtPrice.TabIndex = 20
  653.         Me.txtPrice.Text = "0.00"
  654.         '
  655.         'txtCount
  656.         '
  657.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtCount, True)
  658.         Me.MsdnTextboxValidator1.SetDataType(Me.txtCount, MSDNTextboxValidator.DataTypeConstants.Int16Type)
  659.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtCount, "")
  660.         Me.txtCount.Location = New System.Drawing.Point(60, 50)
  661.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtCount, "")
  662.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtCount, "")
  663.         Me.txtCount.Name = "txtCount"
  664.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtCount, "")
  665.         Me.MsdnTextboxValidator1.SetRequired(Me.txtCount, False)
  666.         Me.txtCount.Size = New System.Drawing.Size(78, 21)
  667.         Me.txtCount.TabIndex = 19
  668.         Me.txtCount.Text = ""
  669.         '
  670.         'txtUnit
  671.         '
  672.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtUnit, True)
  673.         Me.MsdnTextboxValidator1.SetDataType(Me.txtUnit, MSDNTextboxValidator.DataTypeConstants.StringType)
  674.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtUnit, "")
  675.         Me.txtUnit.Location = New System.Drawing.Point(552, 25)
  676.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtUnit, "")
  677.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtUnit, "")
  678.         Me.txtUnit.Name = "txtUnit"
  679.         Me.txtUnit.ReadOnly = True
  680.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtUnit, "")
  681.         Me.MsdnTextboxValidator1.SetRequired(Me.txtUnit, False)
  682.         Me.txtUnit.Size = New System.Drawing.Size(56, 21)
  683.         Me.txtUnit.TabIndex = 18
  684.         Me.txtUnit.Text = ""
  685.         '
  686.         'txtMedRule
  687.         '
  688.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtMedRule, True)
  689.         Me.MsdnTextboxValidator1.SetDataType(Me.txtMedRule, MSDNTextboxValidator.DataTypeConstants.StringType)
  690.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtMedRule, "")
  691.         Me.txtMedRule.Location = New System.Drawing.Point(402, 25)
  692.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtMedRule, "")
  693.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtMedRule, "")
  694.         Me.txtMedRule.Name = "txtMedRule"
  695.         Me.txtMedRule.ReadOnly = True
  696.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtMedRule, "")
  697.         Me.MsdnTextboxValidator1.SetRequired(Me.txtMedRule, False)
  698.         Me.txtMedRule.Size = New System.Drawing.Size(96, 21)
  699.         Me.txtMedRule.TabIndex = 17
  700.         Me.txtMedRule.Text = ""
  701.         '
  702.         'txtmedName
  703.         '
  704.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtmedName, True)
  705.         Me.MsdnTextboxValidator1.SetDataType(Me.txtmedName, MSDNTextboxValidator.DataTypeConstants.StringType)
  706.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtmedName, "")
  707.         Me.txtmedName.Location = New System.Drawing.Point(210, 24)
  708.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtmedName, "")
  709.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtmedName, "")
  710.         Me.txtmedName.Name = "txtmedName"
  711.         Me.txtmedName.ReadOnly = True
  712.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtmedName, "")
  713.         Me.MsdnTextboxValidator1.SetRequired(Me.txtmedName, False)
  714.         Me.txtmedName.Size = New System.Drawing.Size(126, 21)
  715.         Me.txtmedName.TabIndex = 16
  716.         Me.txtmedName.Text = ""
  717.         '
  718.         'txtMedNumber
  719.         '
  720.         Me.MsdnTextboxValidator1.SetCustomValidationEnabled(Me.txtMedNumber, True)
  721.         Me.MsdnTextboxValidator1.SetDataType(Me.txtMedNumber, MSDNTextboxValidator.DataTypeConstants.StringType)
  722.         Me.MsdnTextboxValidator1.SetDisplayName(Me.txtMedNumber, "")
  723.         Me.txtMedNumber.Location = New System.Drawing.Point(60, 24)
  724.         Me.MsdnTextboxValidator1.SetMaxValue(Me.txtMedNumber, "")
  725.         Me.MsdnTextboxValidator1.SetMinValue(Me.txtMedNumber, "")
  726.         Me.txtMedNumber.Name = "txtMedNumber"
  727.         Me.MsdnTextboxValidator1.SetRegularExpression(Me.txtMedNumber, "")
  728.         Me.MsdnTextboxValidator1.SetRequired(Me.txtMedNumber, False)
  729.         Me.txtMedNumber.Size = New System.Drawing.Size(78, 21)
  730.         Me.txtMedNumber.TabIndex = 15
  731.         Me.txtMedNumber.Text = ""
  732.         '
  733.         'Label23
  734.         '
  735.         Me.Label23.AutoSize = True
  736.         Me.Label23.Location = New System.Drawing.Point(360, 106)
  737.         Me.Label23.Name = "Label23"
  738.         Me.Label23.Size = New System.Drawing.Size(54, 17)
  739.         Me.Label23.TabIndex = 14
  740.         Me.Label23.Text = "建议价:"
  741.         '
  742.         'Label22
  743.         '
  744.         Me.Label22.AutoSize = True
  745.         Me.Label22.Location = New System.Drawing.Point(168, 106)
  746.         Me.Label22.Name = "Label22"
  747.         Me.Label22.Size = New System.Drawing.Size(54, 17)
  748.         Me.Label22.TabIndex = 13
  749.         Me.Label22.Text = "零售价:"
  750.         '
  751.         'Label21
  752.         '
  753.         Me.Label21.AutoSize = True
  754.         Me.Label21.Location = New System.Drawing.Point(18, 106)
  755.         Me.Label21.Name = "Label21"
  756.         Me.Label21.Size = New System.Drawing.Size(54, 17)
  757.         Me.Label21.TabIndex = 12
  758.         Me.Label21.Text = "批发价:"
  759.         '
  760.         'Label20
  761.         '
  762.         Me.Label20.AutoSize = True
  763.         Me.Label20.Location = New System.Drawing.Point(522, 81)
  764.         Me.Label20.Name = "Label20"
  765.         Me.Label20.Size = New System.Drawing.Size(42, 17)
  766.         Me.Label20.TabIndex = 11
  767.         Me.Label20.Text = "货位:"
  768.         '
  769.         'Label19
  770.         '
  771.         Me.Label19.AutoSize = True
  772.         Me.Label19.Location = New System.Drawing.Point(372, 81)
  773.         Me.Label19.Name = "Label19"
  774.         Me.Label19.Size = New System.Drawing.Size(42, 17)
  775.         Me.Label19.TabIndex = 10
  776.         Me.Label19.Text = "产地:"
  777.         '
  778.         'Label18
  779.         '
  780.         Me.Label18.AutoSize = True
  781.         Me.Label18.Location = New System.Drawing.Point(168, 81)
  782.         Me.Label18.Name = "Label18"
  783.         Me.Label18.Size = New System.Drawing.Size(54, 17)
  784.         Me.Label18.TabIndex = 9
  785.         Me.Label18.Text = "有效期:"
  786.         '
  787.         'Label17
  788.         '
  789.         Me.Label17.AutoSize = True
  790.         Me.Label17.Location = New System.Drawing.Point(30, 81)
  791.         Me.Label17.Name = "Label17"
  792.         Me.Label17.Size = New System.Drawing.Size(42, 17)
  793.         Me.Label17.TabIndex = 8
  794.         Me.Label17.Text = "批号:"
  795.         '
  796.         'Label16
  797.         '
  798.         Me.Label16.AutoSize = True
  799.         Me.Label16.Location = New System.Drawing.Point(522, 56)
  800.         Me.Label16.Name = "Label16"
  801.         Me.Label16.Size = New System.Drawing.Size(42, 17)
  802.         Me.Label16.TabIndex = 7
  803.         Me.Label16.Text = "包装:"
  804.         '
  805.         'Label15
  806.         '
  807.         Me.Label15.AutoSize = True
  808.         Me.Label15.ForeColor = System.Drawing.Color.Red
  809.         Me.Label15.Location = New System.Drawing.Point(372, 56)
  810.         Me.Label15.Name = "Label15"
  811.         Me.Label15.Size = New System.Drawing.Size(42, 17)
  812.         Me.Label15.TabIndex = 6
  813.         Me.Label15.Text = "金额:"
  814.         '
  815.         'Label14
  816.         '
  817.         Me.Label14.AutoSize = True
  818.         Me.Label14.Location = New System.Drawing.Point(180, 56)
  819.         Me.Label14.Name = "Label14"
  820.         Me.Label14.Size = New System.Drawing.Size(42, 17)
  821.         Me.Label14.TabIndex = 5
  822.         Me.Label14.Text = "单价:"
  823.         '
  824.         'Label13
  825.         '
  826.         Me.Label13.AutoSize = True
  827.         Me.Label13.Location = New System.Drawing.Point(30, 56)
  828.         Me.Label13.Name = "Label13"
  829.         Me.Label13.Size = New System.Drawing.Size(42, 17)
  830.         Me.Label13.TabIndex = 4
  831.         Me.Label13.Text = "数量:"
  832.         '
  833.         'Label12
  834.         '
  835.         Me.Label12.AutoSize = True
  836.         Me.Label12.Location = New System.Drawing.Point(522, 31)
  837.         Me.Label12.Name = "Label12"
  838.         Me.Label12.Size = New System.Drawing.Size(42, 17)
  839.         Me.Label12.TabIndex = 3
  840.         Me.Label12.Text = "单位:"
  841.         '
  842.         'Label11
  843.         '
  844.         Me.Label11.AutoSize = True
  845.         Me.Label11.Location = New System.Drawing.Point(348, 31)
  846.         Me.Label11.Name = "Label11"
  847.         Me.Label11.Size = New System.Drawing.Size(66, 17)
  848.         Me.Label11.TabIndex = 2
  849.         Me.Label11.Text = "药品规格:"
  850.         '
  851.         'Label10
  852.         '
  853.         Me.Label10.AutoSize = True
  854.         Me.Label10.Location = New System.Drawing.Point(156, 31)
  855.         Me.Label10.Name = "Label10"
  856.         Me.Label10.Size = New System.Drawing.Size(66, 17)
  857.         Me.Label10.TabIndex = 1
  858.         Me.Label10.Text = "药品名称:"
  859.         '
  860.         'Label9
  861.         '
  862.         Me.Label9.AutoSize = True
  863.         Me.Label9.Location = New System.Drawing.Point(6, 31)
  864.         Me.Label9.Name = "Label9"
  865.         Me.Label9.Size = New System.Drawing.Size(66, 17)
  866.         Me.Label9.TabIndex = 0
  867.         Me.Label9.Text = "药品编号:"
  868.         '
  869.         'Label8
  870.         '
  871.         Me.Label8.AutoSize = True
  872.         Me.Label8.Location = New System.Drawing.Point(510, 106)
  873.         Me.Label8.Name = "Label8"
  874.         Me.Label8.Size = New System.Drawing.Size(54, 17)
  875.         Me.Label8.TabIndex = 7
  876.         Me.Label8.Text = "最低价:"
  877.         '
  878.         'dgck
  879.         '
  880.         Me.dgck.AlternatingBackColor = System.Drawing.Color.Gainsboro
  881.         Me.dgck.BackColor = System.Drawing.Color.Silver
  882.         Me.dgck.BackgroundColor = System.Drawing.Color.Silver
  883.         Me.dgck.CaptionBackColor = System.Drawing.Color.DarkSlateBlue
  884.         Me.dgck.CaptionFont = New System.Drawing.Font("Tahoma", 8.0!)
  885.         Me.dgck.CaptionForeColor = System.Drawing.Color.White
  886.         Me.dgck.CaptionVisible = False
  887.         Me.dgck.DataMember = ""
  888.         Me.dgck.Dock = System.Windows.Forms.DockStyle.Fill
  889.         Me.dgck.FlatMode = True
  890.         Me.dgck.ForeColor = System.Drawing.Color.Black
  891.         Me.dgck.GridLineColor = System.Drawing.Color.White
  892.         Me.dgck.HeaderBackColor = System.Drawing.Color.DarkGray
  893.         Me.dgck.HeaderForeColor = System.Drawing.Color.Black
  894.         Me.dgck.LinkColor = System.Drawing.Color.DarkSlateBlue
  895.         Me.dgck.Location = New System.Drawing.Point(0, 246)
  896.         Me.dgck.Name = "dgck"
  897.         Me.dgck.ParentRowsBackColor = System.Drawing.Color.Black
  898.         Me.dgck.ParentRowsForeColor = System.Drawing.Color.White
  899.         Me.dgck.RowHeadersVisible = False
  900.         Me.dgck.SelectionBackColor = System.Drawing.Color.DarkSlateBlue
  901.         Me.dgck.SelectionForeColor = System.Drawing.Color.White
  902.         Me.dgck.Size = New System.Drawing.Size(678, 181)
  903.         Me.dgck.TabIndex = 4
  904.         '
  905.         'MsdnTextboxValidator1
  906.         '
  907.         Me.MsdnTextboxValidator1.DisplayControl = Nothing
  908.         Me.MsdnTextboxValidator1.ErrorProvider = Nothing
  909.         Me.MsdnTextboxValidator1.InvalidBackColor = System.Drawing.Color.Empty
  910.         Me.MsdnTextboxValidator1.TooltipProvider = Nothing
  911.         '
  912.         'ErrorProvider1
  913.         '
  914.         Me.ErrorProvider1.ContainerControl = Me
  915.         '
  916.         'frmCk
  917.         '
  918.         Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
  919.         Me.ClientSize = New System.Drawing.Size(678, 448)
  920.         Me.Controls.Add(Me.dgck)
  921.         Me.Controls.Add(Me.GroupBox2)
  922.         Me.Controls.Add(Me.GroupBox1)
  923.         Me.Controls.Add(Me.StatusBar1)
  924.         Me.Controls.Add(Me.tbrCk)
  925.         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
  926.         Me.Name = "frmCk"
  927.         Me.Text = "销售开单"
  928.         Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
  929.         Me.GroupBox1.ResumeLayout(False)
  930.         Me.GroupBox2.ResumeLayout(False)
  931.         CType(Me.dgck, System.ComponentModel.ISupportInitialize).EndInit()
  932.         Me.ResumeLayout(False)
  933.     End Sub
  934. #End Region
  935.     Public bl As Boolean
  936.     Public lsweb As New jxcmanage
  937.     Public dslocals As DataSet = lsweb.returndataset("select 日期,票号,结算方式,客户编号,客户名称,金额,应收金额,操作员 from wz_ck_sk", "wz_ck_sk")
  938.     Public dslocal As DataSet = lsweb.returndataset("select 序号,药品编号,药品名称,药品规格,单位,单价,数量,金额,批号,有效期,包装,产地,货位,批发价,零售价,建议价,最低价,日期,票号,客户编号,客户名称,结算,销售员,库存ID from wz_ck", "wz_ck")
  939.     Public Function getinfo(ByVal strqueryid As String) As String
  940.         Dim strOrderId As String
  941.         strOrderId = strqueryid
  942.         Return strOrderId
  943.     End Function
  944.     Private Sub txtCustNumber_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtCustNumber.KeyDown
  945.         If e.KeyCode = Keys.Enter Then
  946.             Dim dlg As frmQuery = New frmQuery
  947.             dlg.PYM = Me.getinfo(txtCustNumber.Text)
  948.             If dlg.PYM = String.Empty Then
  949.                 ErrorProvider1.SetError(txtCustNumber, "不能为空,请输入查询码!")
  950.             Else
  951.                 dlg.ShowDialog()
  952.                 ErrorProvider1.SetError(txtCustNumber, "")
  953.             End If
  954.             Dim CustIdvalue As String
  955.             CustIdvalue = dlg.GetInfo("客户编号")
  956.             If CustIdvalue Is Nothing Then
  957.                 ErrorProvider1.SetError(txtCustNumber, "或没有查到记录,请重新开始!")
  958.             Else
  959.                 Dim runSqlQuery As String
  960.                 runSqlQuery = "select * from wz_kh where 客户编号='" & CustIdvalue & " '"
  961.                 Dim dv As DataView
  962.                 ' Dim mOrderId As New managers
  963.                 '调用mCustomId对象的SPcustomersID函数
  964.                 Dim dtOrder As DataTable = lsweb.runSql(runSqlQuery).Tables(0)
  965.                 'bb为一随意表名
  966.                 dtOrder.TableName = "bb"
  967.                 dv = dtOrder.DefaultView
  968.                 txtCustNumber.Text = dv(0)("客户编号")
  969.                 txtCustName.Text = dv(0)("客户名称")
  970.                 cboJs.Focus()
  971.                 ErrorProvider1.SetError(txtCustNumber, "")
  972.             End If
  973.         End If
  974.     End Sub
  975.     Public Sub add()
  976.         dslocal.Clear()
  977.         txtCustNumber.Text() = ""
  978.         txtCustNumber.Enabled = True
  979.         txtCustNumber.ReadOnly = False
  980.         cboJs.Enabled = True
  981.         txtDate.Enabled = True
  982.         txtCustNumber.Focus()
  983.         txtCustName.Text() = ""
  984.         If tbrth.Enabled = False Then
  985.             txtBillnumber.Text = lsweb.selectbill("TH").ToString
  986.             txtBillnumber.ForeColor = System.Drawing.Color.Red
  987.             txtCount.ForeColor = System.Drawing.Color.Red
  988.         Else
  989.             txtBillnumber.Text = lsweb.selectbill("CK").ToString
  990.             txtBillnumber.ForeColor = System.Drawing.Color.Black
  991.             txtCount.ForeColor = System.Drawing.Color.Black
  992.         End If
  993.         txtDate.Value = Today.ToString
  994.         txtNo.Text = 1
  995.         cboJs.Text = ""
  996.         txtMedNumber.Text = ""
  997.         txtmedName.Text() = ""
  998.         txtMedRule.Text() = ""
  999.         txtUnit.Text() = ""
  1000.         txtPrice.Text() = 0.0
  1001.         txtCount.Text() = 0
  1002.         'txtMoney.Text() = 0.0
  1003.         txtPackage.Text() = ""
  1004.         txtBatch.Text() = ""
  1005.         txtAvaid.Text() = ""
  1006.         txtProduct.Text() = ""
  1007.         txtPprice.Text() = 0.0
  1008.         txtLprice.Text() = 0.0
  1009.         txtJprice.Text() = 0.0
  1010.         txtZprice.Text() = 0.0
  1011.     End Sub
  1012.     Public Sub tbnEnable(ByVal strboolean As String, ByVal tbr As ToolBar)
  1013.         If strboolean = "tbrAdd.Enabled = True" Then
  1014.             tbrSave.Enabled = False
  1015.             tbrPrint.Enabled = False
  1016.             tbrExit.Enabled = True
  1017.             tbrTh.Enabled = True
  1018.         ElseIf strboolean = "tbrAdd.Enabled = False" Then
  1019.             tbrAdd.Enabled = False
  1020.             tbrSave.Enabled = True
  1021.             tbrPrint.Enabled = False
  1022.             tbrExit.Enabled = True
  1023.             tbrth.Enabled = False
  1024.         ElseIf strboolean = "tbrSave.Enabled = True" Then
  1025.             tbrAdd.Enabled = False
  1026.             tbrPrint.Enabled = False
  1027.             tbrExit.Enabled = True
  1028.             tbrTh.Enabled = True
  1029.         ElseIf strboolean = "tbrSave.Enabled = False" Then
  1030.             tbrSave.Enabled = False
  1031.             tbrAdd.Enabled = True
  1032.             tbrPrint.Enabled = True
  1033.             tbrExit.Enabled = True
  1034.             tbrth.Enabled = True
  1035.         ElseIf strboolean = "tbrTh.Enabled = True" Then
  1036.             tbrSave.Enabled = True
  1037.             tbrAdd.Enabled = True
  1038.             tbrPrint.Enabled = True
  1039.             tbrExit.Enabled = True
  1040.         ElseIf strboolean = "tbrTh.Enabled = False" Then
  1041.             tbrTh.Enabled = False
  1042.             tbrSave.Enabled = False
  1043.             tbrAdd.Enabled = True
  1044.             tbrPrint.Enabled = False
  1045.             tbrExit.Enabled = True
  1046.         End If
  1047.     End Sub
  1048.     Private Sub frmCk_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  1049.         dslocal.Clear()
  1050.         dgck.DataSource = dslocal.Tables("wz_ck").DefaultView
  1051.         Dim dslocalmm As DataSet = lsweb.returndataset("select 操作员 from wz_mm", "wz_mm")
  1052.         tbrAdd.Enabled = True
  1053.         tbrSave.Enabled = False
  1054.         tbrPrint.Enabled = False
  1055.         tbrQuery.Enabled = True
  1056.         tbrExit.Enabled = True
  1057.         Dim frmloginer As New frmLogin
  1058.         txtXsy.Text = frmloginer.struser
  1059.         txtDate.Value = Today.ToString
  1060.     End Sub
  1061.     Private Sub save()
  1062.         Dim dr As DataRow = dslocals.Tables("wz_ck_sk").NewRow()
  1063.         dr("票号") = Me.txtBillnumber.Text.Trim
  1064.         dr("客户编号") = Me.txtCustNumber.Text.Trim
  1065.         dr("客户名称") = Me.txtCustName.Text.Trim
  1066.         dr("日期") = Me.txtDate.Value
  1067.         dr("结算方式") = Me.cboJs.Text.Trim
  1068.         dr("操作员") = Me.txtXsy.Text.Trim
  1069.         dr("金额") = Me.txtSum.Text.Trim
  1070.         If Me.cboJs.Text = "记账" Or Me.cboJs.Text = "支票" Then
  1071.             dr("应收金额") = Me.txtSum.Text.Trim
  1072.         Else
  1073.             dr("应收金额") = 0
  1074.         End If
  1075.         dslocals.Tables("wz_ck_sk").Rows.Add(dr)
  1076.         If lsweb.updatedataset("select 序号,药品编号,药品名称,药品规格,单位,单价,数量,金额,批号,有效期,包装,产地,货位,批发价,零售价,建议价,最低价,日期,票号,客户编号,客户名称,结算,销售员,库存ID from wz_ck", "wz_ck", dslocal, DataRowState.Added) = True And lsweb.updatedataset("select 日期,票号,结算方式,客户编号,客户名称,金额,应收金额,操作员 from wz_ck_sk", "wz_ck_sk", dslocals, DataRowState.Added) = True Then
  1077.             MessageBox.Show("销售信息成功保存!", "提示", MessageBoxButtons.OK)
  1078.         Else
  1079.             MessageBox.Show("销售信息保存失败!", "提示", MessageBoxButtons.AbortRetryIgnore)
  1080.         End If
  1081.         txtCustNumber.ReadOnly = False
  1082.         txtCustNumber.Text() = ""
  1083.         txtCustNumber.Focus()
  1084.         txtCustName.ReadOnly = False
  1085.         txtDate.Enabled = True
  1086.         txtBillnumber.ReadOnly = True
  1087.         txtNo.ReadOnly = True
  1088.         cboJs.Enabled = True
  1089.     End Sub
  1090.     Private Sub clear()
  1091.         txtCustNumber.ReadOnly = True
  1092.         txtCustName.ReadOnly = True
  1093.         txtDate.Enabled = False
  1094.         txtBillnumber.ReadOnly = True
  1095.         txtNo.ReadOnly = True
  1096.         cboJs.Enabled = False
  1097.         txtMedNumber.Text = ""
  1098.         txtmedName.Text() = ""
  1099.         txtMedRule.Text() = ""
  1100.         txtUnit.Text() = ""
  1101.         txtPrice.Text() = 0.0
  1102.         txtCount.Text() = 0
  1103.         txtMoney.Text() = 0.0
  1104.         txtPackage.Text() = ""
  1105.         txtBatch.Text() = ""
  1106.         txtAvaid.Text() = ""
  1107.         txtProduct.Text() = ""
  1108.         txtPprice.Text() = 0.0
  1109.         txtLprice.Text() = 0.0
  1110.         txtJprice.Text() = 0.0
  1111.         txtZprice.Text() = 0.0
  1112.     End Sub
  1113.     Private Sub clearAll()
  1114.         txtCustNumber.ReadOnly = True
  1115.         txtCustName.ReadOnly = True
  1116.         txtCustName.Text = ""
  1117.         txtSum.Text = ""
  1118.         txtdate.Enabled = False
  1119.         txtBillNumber.ReadOnly = True
  1120.         txtNo.ReadOnly = True
  1121.         cboJs.Enabled = False
  1122.         cboJs.Text = ""
  1123.         txtHw.Enabled = False
  1124.         txtMedNumber.Text = ""
  1125.         txtmedName.Text() = ""
  1126.         txtMedRule.Text() = ""
  1127.         txtUnit.Text() = ""
  1128.         txtPrice.Text() = 0.0
  1129.         txtCount.Text() = 0
  1130.         txtMoney.Text() = 0.0
  1131.         txtPackage.Text() = ""
  1132.         txtBatch.Text() = ""
  1133.         txtAvaid.Text() = ""
  1134.         txtProduct.Text() = ""
  1135.         txtPprice.Text() = CStr(0.0)
  1136.         txtLprice.Text() = CStr(0.0)
  1137.         txtJprice.Text() = CStr(0.0)
  1138.         txtZprice.Text() = CStr(0.0)
  1139.     End Sub
  1140.     Private Sub CalTotalMoney()
  1141.         If dslocal.Tables("wz_ck").Rows.Count = 0 Then
  1142.             Me.txtMoney.Text = 0
  1143.         End If
  1144.         Dim money As String = ""
  1145.         Dim dtotal As Double = 0
  1146.         For Each dr As DataRow In dslocal.Tables("wz_ck").Rows
  1147.             money = dr("金额")
  1148.             dtotal = dtotal + CType(money.Trim, Double)
  1149.         Next
  1150.         Me.txtSum.Text = dtotal.ToString
  1151.     End Sub
  1152.     Private Sub CalMxMoney()
  1153.         Dim price As Double = CType(txtPrice.Text, Double)
  1154.         Dim count As Int16 = CInt(txtCount.Text)
  1155.         Me.txtMoney.Text = (price * count).ToString
  1156.     End Sub
  1157.     Private Sub txtMedNumber_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMedNumber.KeyDown
  1158.         If e.KeyCode = Keys.Enter Then
  1159.             Dim dlgs As frmMedKcQuery = New frmMedKcQuery
  1160.             dlgs.PYMs = Me.getinfo(txtMedNumber.Text)
  1161.             If dlgs.PYMs = String.Empty Then
  1162.                 ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!")
  1163.             Else
  1164.                 dlgs.ShowDialog()
  1165.                 ErrorProvider1.SetError(txtMedNumber, "")
  1166.             End If
  1167.             Dim medIdvalue, medbatch, product, avaid, hw, package As String
  1168.             medIdvalue = dlgs.GetInfo("药品编号")
  1169.             medbatch = dlgs.GetInfo("批号")
  1170.             product = dlgs.GetInfo("产地")
  1171.             avaid = dlgs.GetInfo("有效期")
  1172.             hw = dlgs.GetInfo("货位")
  1173.             package = dlgs.GetInfo("包装")
  1174.             If medIdvalue Is Nothing Then
  1175.                 ErrorProvider1.SetError(txtMedNumber, "不能为空,请输入查询码!或没有查到记录,请重新开始!")
  1176.             Else
  1177.                 Dim runSqlQuery As String
  1178.                 runSqlQuery = "select * from wz_kc where 药品编号='" & medIdvalue & "'and 批号 ='" & medbatch & "' and 产地='" & product & "' and 有效期='" & avaid & "' and 货位='" & hw & "' and 包装='" & package & "'"
  1179.                 Dim dv As DataView
  1180.                 ' Dim mOrderId As New managers
  1181.                 '调用mCustomId对象的SPcustomersID函数
  1182.                 Dim dtOrder As DataTable = lsweb.runSql(runSqlQuery).Tables(0)
  1183.                 'bb为一随意表名
  1184.                 dtOrder.TableName = "bb"
  1185.                 dv = dtOrder.DefaultView
  1186.                 txtMedNumber.Text = dv(0)("药品编号")
  1187.                 txtmedName.Text = dv(0)("药品名称")
  1188.                 txtMedRule.Text = dv(0)("药品规格")
  1189.                 txtUnit.Text = dv(0)("单位")
  1190.                 txtPrice.Text = dv(0)("零售价")
  1191.                 txtProduct.Text = dv(0)("产地")
  1192.                 txtPprice.Text = dv(0)("批发价")
  1193.                 txtLprice.Text = dv(0)("零售价")
  1194.                 txtBatch.Text = dv(0)("批号")
  1195.                 txtHw.Text = dv(0)("货位")
  1196.                 txtPackage.Text = dv(0)("包装")
  1197.                 txtAvaid.Text = dv(0)("有效期")
  1198.                 txtJprice.Text = dv(0)("建议价")
  1199.                 txtZprice.Text = dv(0)("最低价")
  1200.                 txtID.Text = dv(0)("库存ID")
  1201.                 ErrorProvider1.SetError(txtMedNumber, "")
  1202.                 txtCount.Focus()
  1203.             End If
  1204.         End If
  1205.     End Sub
  1206.     Private Sub txtPrice_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPrice.KeyDown
  1207.         If e.KeyCode = Keys.Enter Then
  1208.             If txtPrice.Text = String.Empty Then
  1209.                 txtPrice_Validating(Nothing, Nothing)
  1210.             Else
  1211.                 Static i As Int16
  1212.                 If dslocal.Tables("wz_ck").Rows.Count < 1 Then
  1213.                     i = 1
  1214.                 Else
  1215.                     i = i + 1
  1216.                 End If
  1217.                 txtNo.Text = CStr(i)
  1218.                 Dim dr As DataRow = dslocal.Tables("wz_ck").NewRow()
  1219.                 dr("序号") = CInt(Me.txtNo.Text.Trim)
  1220.                 dr("药品编号") = Me.txtMedNumber.Text.Trim
  1221.                 dr("药品名称") = Me.txtmedName.Text.Trim
  1222.                 dr("药品规格") = Me.txtMedRule.Text.Trim
  1223.                 dr("单位") = Me.txtUnit.Text.Trim
  1224.                 dr("单价") = CDec(Me.txtPrice.Text.Trim)
  1225.                 dr("数量") = Me.txtCount.Text.Trim
  1226.                 dr("金额") = CDec(Me.txtPrice.Text.Trim) * CInt(Me.txtCount.Text.Trim)
  1227.                 dr("批号") = Me.txtBatch.Text.Trim
  1228.                 dr("有效期") = Me.txtAvaid.Text.Trim
  1229.                 dr("包装") = Me.txtPackage.Text.Trim
  1230.                 dr("产地") = Me.txtProduct.Text.Trim
  1231.                 dr("货位") = Me.txtHw.Text.Trim
  1232.                 dr("批发价") = Me.txtPprice.Text.Trim
  1233.                 dr("零售价") = Me.txtLprice.Text.Trim
  1234.                 dr("建议价") = CInt(Me.txtJprice.Text.Trim)
  1235.                 dr("最低价") = CInt(Me.txtZprice.Text.Trim)
  1236.                 dr("日期") = Me.txtDate.Text.Trim
  1237.                 dr("票号") = Me.txtBillnumber.Text.Trim
  1238.                 dr("客户编号") = Me.txtCustNumber.Text.Trim
  1239.                 dr("客户名称") = Me.txtCustName.Text.Trim
  1240.                 dr("结算") = Me.cboJs.Text.Trim
  1241.                 dr("销售员") = Me.txtXsy.Text.Trim
  1242.                 dr("库存ID") = Me.txtID.Text.Trim
  1243.                 dslocal.Tables("wz_ck").Rows.Add(dr)
  1244.                 CalMxMoney()
  1245.                 CalTotalMoney()
  1246.                 clear()
  1247.                 Me.txtMedNumber.Focus()
  1248.             End If
  1249.         End If
  1250.         dgck.DataSource = dslocal.Tables("wz_ck").DefaultView
  1251.     End Sub
  1252.     Private Sub cboJs_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboJs.KeyDown
  1253.         If e.KeyCode = Keys.Enter Then
  1254.             Me.txtMedNumber.Focus()
  1255.         End If
  1256.     End Sub
  1257.     Private Sub txtCount_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtCount.KeyDown
  1258.         If e.KeyCode = Keys.Enter Then
  1259.             If txtCount.Text = String.Empty Then
  1260.                 txtCount_Validating(Nothing, Nothing)
  1261.             Else
  1262.                 CalMxMoney()
  1263.             End If
  1264.             Me.txtPrice.Focus()
  1265.         End If
  1266.     End Sub
  1267.     Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbrCk.ButtonClick
  1268.         Select Case e.Button.Text
  1269.             Case "添加"
  1270.                 'Dim frminstancer As New frmCk
  1271.                 'Dim FrmMainStarter As New FrmMainStart
  1272.                 'frminstancer.MdiParent = FrmMainStarter
  1273.                 'frminstancer.Show()
  1274.                 'Me.Hide()
  1275.                 add()
  1276.                 tbnEnable("tbrAdd.Enabled = False", tbrCk)
  1277.             Case "保存"
  1278.                 If Me.txtSum.Text = String.Empty Then
  1279.                     MessageBox.Show("不能保存记录,数据不完整!", "提示:", MessageBoxButtons.OK)
  1280.                 Else
  1281.                     save()
  1282.                     tbnEnable("tbrSave.Enabled = False", tbrCk)
  1283.                     clearAll()
  1284.                     bl = False
  1285.                 End If
  1286.             Case "打印"
  1287.                 Dim frmviewcker As New frmviewck
  1288.                 frmviewcker.ckbillnumber = txtBillnumber.Text.Trim
  1289.                 frmviewcker.Show()
  1290.             Case "查询"
  1291.                 Dim frmckqueryer As New frmCkQuery
  1292.                 frmckqueryer.Show()
  1293.             Case "退货"
  1294.                 bl = True
  1295.                 tbnEnable("tbrTh.Enabled = False", tbrCk)
  1296.             Case "退出"
  1297.                 Me.Close()
  1298.         End Select
  1299.     End Sub
  1300.     Private Sub txtCount_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtCount.Validating
  1301.         If bl = True Then
  1302.             If Not IsNumeric(txtCount.Text) Or txtCount.Text = String.Empty Or CDec(txtCount.Text) > 0 Then
  1303.                 ErrorProvider1.SetError(txtCount, "不是数值类型且不能为空,数量不能大于零!")
  1304.                 txtCount.Focus()
  1305.             Else
  1306.                 ErrorProvider1.SetError(txtCount, "")
  1307.             End If
  1308.         Else
  1309.             If Not IsNumeric(txtCount.Text) Or txtCount.Text = String.Empty Or CDec(txtCount.Text) < 0 Then
  1310.                 ErrorProvider1.SetError(txtCount, "不是数值类型且不能为空,数量不能小于零!")
  1311.                 txtCount.Focus()
  1312.             Else
  1313.                 ErrorProvider1.SetError(txtCount, "")
  1314.             End If
  1315.         End If
  1316.     End Sub
  1317.     Private Sub txtPrice_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPrice.Validating
  1318.         If Not IsNumeric(txtPrice.Text) Or txtPrice.Text = String.Empty Then
  1319.             ErrorProvider1.SetError(txtPrice, "不是数值类型且不能为空。")
  1320.             txtPrice.Focus()
  1321.         Else
  1322.             ErrorProvider1.SetError(txtPrice, "")
  1323.         End If
  1324.     End Sub
  1325.     Private Sub frmCk_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
  1326.         If txtBillnumber.Text <> String.Empty And tbrSave.Enabled = True Then
  1327.             lsweb.cancelbill(txtBillnumber.Text.Trim)
  1328.         End If
  1329.     End Sub
  1330. End Class