www.pudn.com > SalesManager.rar > frmConModify.vb


Imports System.Data.OleDb 
 
Public Class frmConModify 
    Inherits System.Windows.Forms.Form 
 
#Region " Windows 窗体设计器生成的代码 " 
 
    Public Sub New() 
        MyBase.New() 
 
        '该调用是 Windows 窗体设计器所必需的。 
        InitializeComponent() 
 
        '在 InitializeComponent() 调用之后添加任何初始化 
 
    End Sub 
 
    '窗体重写 dispose 以清理组件列表。 
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) 
        If disposing Then 
            If Not (components Is Nothing) Then 
                components.Dispose() 
            End If 
        End If 
        MyBase.Dispose(disposing) 
    End Sub 
 
    'Windows 窗体设计器所必需的 
    Private components As System.ComponentModel.IContainer 
 
    '注意: 以下过程是 Windows 窗体设计器所必需的 
    '可以使用 Windows 窗体设计器修改此过程。 
    '不要使用代码编辑器修改它。 
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox 
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox 
    Friend WithEvents dgCon As System.Windows.Forms.DataGrid 
    Friend WithEvents btnStockTempDelete As System.Windows.Forms.Button 
    Friend WithEvents btnStockTempAdd As System.Windows.Forms.Button 
    Friend WithEvents Label56 As System.Windows.Forms.Label 
    Friend WithEvents txtConInprice As System.Windows.Forms.TextBox 
    Friend WithEvents txtConSum As System.Windows.Forms.TextBox 
    Friend WithEvents Label60 As System.Windows.Forms.Label 
    Friend WithEvents txtStockPrice As System.Windows.Forms.TextBox 
    Friend WithEvents nudStockNumber As System.Windows.Forms.NumericUpDown 
    Friend WithEvents cbStockProname As System.Windows.Forms.ComboBox 
    Friend WithEvents Label44 As System.Windows.Forms.Label 
    Friend WithEvents Label45 As System.Windows.Forms.Label 
    Friend WithEvents Label46 As System.Windows.Forms.Label 
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox 
    Friend WithEvents dtpCon As System.Windows.Forms.DateTimePicker 
    Friend WithEvents Label49 As System.Windows.Forms.Label 
    Friend WithEvents Label50 As System.Windows.Forms.Label 
    Friend WithEvents Label58 As System.Windows.Forms.Label 
    Friend WithEvents cbConCustomer As System.Windows.Forms.ComboBox 
    Friend WithEvents cbConType As System.Windows.Forms.ComboBox 
    Friend WithEvents cbConPaytype As System.Windows.Forms.ComboBox 
    Friend WithEvents Label47 As System.Windows.Forms.Label 
    Friend WithEvents Label48 As System.Windows.Forms.Label 
    Friend WithEvents btnConCustomerView As System.Windows.Forms.Button 
    Friend WithEvents labConCustomerLevel As System.Windows.Forms.Label 
    Friend WithEvents btnCancel As System.Windows.Forms.Button 
    Friend WithEvents cbConID As System.Windows.Forms.ComboBox 
    Friend WithEvents btnConDelete As System.Windows.Forms.Button 
    Friend WithEvents btnConModify As System.Windows.Forms.Button 
    Friend WithEvents dgConModify As System.Windows.Forms.DataGridTableStyle 
    Friend WithEvents proname As System.Windows.Forms.DataGridTextBoxColumn 
    Friend WithEvents snumber As System.Windows.Forms.DataGridTextBoxColumn 
    Friend WithEvents price As System.Windows.Forms.DataGridTextBoxColumn 
    Friend WithEvents dgConModifyTemp As System.Windows.Forms.DataGridTableStyle 
    Friend WithEvents pronameTemp As System.Windows.Forms.DataGridTextBoxColumn 
    Friend WithEvents priceTemp As System.Windows.Forms.DataGridTextBoxColumn 
    Friend WithEvents tnumberTemp As System.Windows.Forms.DataGridTextBoxColumn 
     Private Sub InitializeComponent() 
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmConModify)) 
        Me.PictureBox1 = New System.Windows.Forms.PictureBox 
        Me.GroupBox2 = New System.Windows.Forms.GroupBox 
        Me.dgCon = New System.Windows.Forms.DataGrid 
        Me.dgConModify = New System.Windows.Forms.DataGridTableStyle 
        Me.proname = New System.Windows.Forms.DataGridTextBoxColumn 
        Me.snumber = New System.Windows.Forms.DataGridTextBoxColumn 
        Me.price = New System.Windows.Forms.DataGridTextBoxColumn 
        Me.dgConModifyTemp = New System.Windows.Forms.DataGridTableStyle 
        Me.pronameTemp = New System.Windows.Forms.DataGridTextBoxColumn 
        Me.tnumberTemp = New System.Windows.Forms.DataGridTextBoxColumn 
        Me.priceTemp = New System.Windows.Forms.DataGridTextBoxColumn 
        Me.btnStockTempDelete = New System.Windows.Forms.Button 
        Me.btnStockTempAdd = New System.Windows.Forms.Button 
        Me.Label56 = New System.Windows.Forms.Label 
        Me.txtConInprice = New System.Windows.Forms.TextBox 
        Me.txtConSum = New System.Windows.Forms.TextBox 
        Me.Label60 = New System.Windows.Forms.Label 
        Me.txtStockPrice = New System.Windows.Forms.TextBox 
        Me.nudStockNumber = New System.Windows.Forms.NumericUpDown 
        Me.cbStockProname = New System.Windows.Forms.ComboBox 
        Me.Label44 = New System.Windows.Forms.Label 
        Me.Label45 = New System.Windows.Forms.Label 
        Me.Label46 = New System.Windows.Forms.Label 
        Me.GroupBox1 = New System.Windows.Forms.GroupBox 
        Me.cbConID = New System.Windows.Forms.ComboBox 
        Me.dtpCon = New System.Windows.Forms.DateTimePicker 
        Me.Label49 = New System.Windows.Forms.Label 
        Me.Label50 = New System.Windows.Forms.Label 
        Me.Label58 = New System.Windows.Forms.Label 
        Me.cbConCustomer = New System.Windows.Forms.ComboBox 
        Me.cbConType = New System.Windows.Forms.ComboBox 
        Me.cbConPaytype = New System.Windows.Forms.ComboBox 
        Me.Label47 = New System.Windows.Forms.Label 
        Me.Label48 = New System.Windows.Forms.Label 
        Me.btnConCustomerView = New System.Windows.Forms.Button 
        Me.labConCustomerLevel = New System.Windows.Forms.Label 
        Me.btnCancel = New System.Windows.Forms.Button 
        Me.btnConDelete = New System.Windows.Forms.Button 
        Me.btnConModify = New System.Windows.Forms.Button 
        Me.GroupBox2.SuspendLayout() 
        CType(Me.dgCon, System.ComponentModel.ISupportInitialize).BeginInit() 
        CType(Me.nudStockNumber, System.ComponentModel.ISupportInitialize).BeginInit() 
        Me.GroupBox1.SuspendLayout() 
        Me.SuspendLayout() 
        ' 
        'PictureBox1 
        ' 
        Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image) 
        Me.PictureBox1.Location = New System.Drawing.Point(12, 12) 
        Me.PictureBox1.Name = "PictureBox1" 
        Me.PictureBox1.Size = New System.Drawing.Size(140, 316) 
        Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage 
        Me.PictureBox1.TabIndex = 140 
        Me.PictureBox1.TabStop = False 
        ' 
        'GroupBox2 
        ' 
        Me.GroupBox2.Controls.Add(Me.dgCon) 
        Me.GroupBox2.Controls.Add(Me.btnStockTempDelete) 
        Me.GroupBox2.Controls.Add(Me.btnStockTempAdd) 
        Me.GroupBox2.Controls.Add(Me.Label56) 
        Me.GroupBox2.Controls.Add(Me.txtConInprice) 
        Me.GroupBox2.Controls.Add(Me.txtConSum) 
        Me.GroupBox2.Controls.Add(Me.Label60) 
        Me.GroupBox2.Controls.Add(Me.txtStockPrice) 
        Me.GroupBox2.Controls.Add(Me.nudStockNumber) 
        Me.GroupBox2.Controls.Add(Me.cbStockProname) 
        Me.GroupBox2.Controls.Add(Me.Label44) 
        Me.GroupBox2.Controls.Add(Me.Label45) 
        Me.GroupBox2.Controls.Add(Me.Label46) 
        Me.GroupBox2.Location = New System.Drawing.Point(168, 152) 
        Me.GroupBox2.Name = "GroupBox2" 
        Me.GroupBox2.Size = New System.Drawing.Size(408, 153) 
        Me.GroupBox2.TabIndex = 139 
        Me.GroupBox2.TabStop = False 
        Me.GroupBox2.Text = "订单信息修改" 
        ' 
        'dgCon 
        ' 
        Me.dgCon.BackgroundColor = System.Drawing.Color.FromArgb(CType(239, Byte), CType(243, Byte), CType(255, Byte)) 
        Me.dgCon.CaptionVisible = False 
        Me.dgCon.DataMember = "" 
        Me.dgCon.HeaderForeColor = System.Drawing.SystemColors.ControlText 
        Me.dgCon.Location = New System.Drawing.Point(8, 44) 
        Me.dgCon.Name = "dgCon" 
        Me.dgCon.ReadOnly = True 
        Me.dgCon.Size = New System.Drawing.Size(272, 100) 
        Me.dgCon.TabIndex = 123 
        Me.dgCon.TableStyles.AddRange(New System.Windows.Forms.DataGridTableStyle() {Me.dgConModify, Me.dgConModifyTemp}) 
        ' 
        'dgConModify 
        ' 
        Me.dgConModify.DataGrid = Me.dgCon 
        Me.dgConModify.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.proname, Me.snumber, Me.price}) 
        Me.dgConModify.HeaderForeColor = System.Drawing.SystemColors.ControlText 
        Me.dgConModify.MappingName = "stock" 
        ' 
        'proname 
        ' 
        Me.proname.Format = "" 
        Me.proname.FormatInfo = Nothing 
        Me.proname.HeaderText = "产品名称" 
        Me.proname.MappingName = "proname" 
        Me.proname.Width = 70 
        ' 
        'snumber 
        ' 
        Me.snumber.Format = "" 
        Me.snumber.FormatInfo = Nothing 
        Me.snumber.HeaderText = "数量" 
        Me.snumber.MappingName = "snumber" 
        Me.snumber.Width = 70 
        ' 
        'price 
        ' 
        Me.price.Format = "" 
        Me.price.FormatInfo = Nothing 
        Me.price.HeaderText = "单价" 
        Me.price.MappingName = "price" 
        Me.price.Width = 70 
        ' 
        'dgConModifyTemp 
        ' 
        Me.dgConModifyTemp.DataGrid = Me.dgCon 
        Me.dgConModifyTemp.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.pronameTemp, Me.tnumberTemp, Me.priceTemp}) 
        Me.dgConModifyTemp.HeaderForeColor = System.Drawing.SystemColors.ControlText 
        Me.dgConModifyTemp.MappingName = "stocktemp" 
        ' 
        'pronameTemp 
        ' 
        Me.pronameTemp.Format = "" 
        Me.pronameTemp.FormatInfo = Nothing 
        Me.pronameTemp.HeaderText = "产品名称" 
        Me.pronameTemp.MappingName = "proname" 
        Me.pronameTemp.Width = 70 
        ' 
        'tnumberTemp 
        ' 
        Me.tnumberTemp.Format = "" 
        Me.tnumberTemp.FormatInfo = Nothing 
        Me.tnumberTemp.HeaderText = "数量" 
        Me.tnumberTemp.MappingName = "tnumber" 
        Me.tnumberTemp.Width = 70 
        ' 
        'priceTemp 
        ' 
        Me.priceTemp.Format = "" 
        Me.priceTemp.FormatInfo = Nothing 
        Me.priceTemp.HeaderText = "单价" 
        Me.priceTemp.MappingName = "price" 
        Me.priceTemp.Width = 70 
        ' 
        'btnStockTempDelete 
        ' 
        Me.btnStockTempDelete.BackColor = System.Drawing.SystemColors.Control 
        Me.btnStockTempDelete.FlatStyle = System.Windows.Forms.FlatStyle.Popup 
        Me.btnStockTempDelete.Location = New System.Drawing.Point(344, 120) 
        Me.btnStockTempDelete.Name = "btnStockTempDelete" 
        Me.btnStockTempDelete.Size = New System.Drawing.Size(56, 24) 
        Me.btnStockTempDelete.TabIndex = 137 
        Me.btnStockTempDelete.Text = "删除(&T)" 
        ' 
        'btnStockTempAdd 
        ' 
        Me.btnStockTempAdd.BackColor = System.Drawing.SystemColors.Control 
        Me.btnStockTempAdd.FlatStyle = System.Windows.Forms.FlatStyle.Popup 
        Me.btnStockTempAdd.Location = New System.Drawing.Point(284, 120) 
        Me.btnStockTempAdd.Name = "btnStockTempAdd" 
        Me.btnStockTempAdd.Size = New System.Drawing.Size(56, 24) 
        Me.btnStockTempAdd.TabIndex = 132 
        Me.btnStockTempAdd.Text = "添加(&A)" 
        ' 
        'Label56 
        ' 
        Me.Label56.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label56.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label56.Location = New System.Drawing.Point(284, 52) 
        Me.Label56.Name = "Label56" 
        Me.Label56.Size = New System.Drawing.Size(48, 16) 
        Me.Label56.TabIndex = 125 
        Me.Label56.Text = "折扣率:" 
        ' 
        'txtConInprice 
        ' 
        Me.txtConInprice.AutoSize = False 
        Me.txtConInprice.Location = New System.Drawing.Point(352, 48) 
        Me.txtConInprice.MaxLength = 10 
        Me.txtConInprice.Name = "txtConInprice" 
        Me.txtConInprice.Size = New System.Drawing.Size(48, 18) 
        Me.txtConInprice.TabIndex = 122 
        Me.txtConInprice.Text = "" 
        Me.txtConInprice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 
        ' 
        'txtConSum 
        ' 
        Me.txtConSum.AutoSize = False 
        Me.txtConSum.Location = New System.Drawing.Point(284, 96) 
        Me.txtConSum.MaxLength = 10 
        Me.txtConSum.Name = "txtConSum" 
        Me.txtConSum.Size = New System.Drawing.Size(116, 18) 
        Me.txtConSum.TabIndex = 112 
        Me.txtConSum.Text = "" 
        Me.txtConSum.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 
        ' 
        'Label60 
        ' 
        Me.Label60.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label60.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label60.Location = New System.Drawing.Point(284, 80) 
        Me.Label60.Name = "Label60" 
        Me.Label60.Size = New System.Drawing.Size(64, 16) 
        Me.Label60.TabIndex = 135 
        Me.Label60.Text = "交易金额:" 
        ' 
        'txtStockPrice 
        ' 
        Me.txtStockPrice.AutoSize = False 
        Me.txtStockPrice.Location = New System.Drawing.Point(320, 20) 
        Me.txtStockPrice.MaxLength = 10 
        Me.txtStockPrice.Name = "txtStockPrice" 
        Me.txtStockPrice.Size = New System.Drawing.Size(80, 18) 
        Me.txtStockPrice.TabIndex = 115 
        Me.txtStockPrice.Text = "" 
        Me.txtStockPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 
        ' 
        'nudStockNumber 
        ' 
        Me.nudStockNumber.Location = New System.Drawing.Point(208, 20) 
        Me.nudStockNumber.Maximum = New Decimal(New Integer() {100000, 0, 0, 0}) 
        Me.nudStockNumber.Minimum = New Decimal(New Integer() {1, 0, 0, 0}) 
        Me.nudStockNumber.Name = "nudStockNumber" 
        Me.nudStockNumber.Size = New System.Drawing.Size(76, 21) 
        Me.nudStockNumber.TabIndex = 131 
        Me.nudStockNumber.TextAlign = System.Windows.Forms.HorizontalAlignment.Center 
        Me.nudStockNumber.ThousandsSeparator = True 
        Me.nudStockNumber.Value = New Decimal(New Integer() {1, 0, 0, 0}) 
        ' 
        'cbStockProname 
        ' 
        Me.cbStockProname.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 
        Me.cbStockProname.Location = New System.Drawing.Point(72, 20) 
        Me.cbStockProname.Name = "cbStockProname" 
        Me.cbStockProname.Size = New System.Drawing.Size(96, 20) 
        Me.cbStockProname.TabIndex = 124 
        ' 
        'Label44 
        ' 
        Me.Label44.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label44.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label44.Location = New System.Drawing.Point(284, 24) 
        Me.Label44.Name = "Label44" 
        Me.Label44.Size = New System.Drawing.Size(40, 16) 
        Me.Label44.TabIndex = 121 
        Me.Label44.Text = "单价:" 
        ' 
        'Label45 
        ' 
        Me.Label45.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label45.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label45.Location = New System.Drawing.Point(172, 24) 
        Me.Label45.Name = "Label45" 
        Me.Label45.Size = New System.Drawing.Size(36, 16) 
        Me.Label45.TabIndex = 120 
        Me.Label45.Text = "数量:" 
        ' 
        'Label46 
        ' 
        Me.Label46.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label46.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label46.Location = New System.Drawing.Point(8, 24) 
        Me.Label46.Name = "Label46" 
        Me.Label46.Size = New System.Drawing.Size(64, 16) 
        Me.Label46.TabIndex = 119 
        Me.Label46.Text = "产品名称:" 
        ' 
        'GroupBox1 
        ' 
        Me.GroupBox1.Controls.Add(Me.cbConID) 
        Me.GroupBox1.Controls.Add(Me.dtpCon) 
        Me.GroupBox1.Controls.Add(Me.Label49) 
        Me.GroupBox1.Controls.Add(Me.Label50) 
        Me.GroupBox1.Controls.Add(Me.Label58) 
        Me.GroupBox1.Controls.Add(Me.cbConCustomer) 
        Me.GroupBox1.Controls.Add(Me.cbConType) 
        Me.GroupBox1.Controls.Add(Me.cbConPaytype) 
        Me.GroupBox1.Controls.Add(Me.Label47) 
        Me.GroupBox1.Controls.Add(Me.Label48) 
        Me.GroupBox1.Controls.Add(Me.btnConCustomerView) 
        Me.GroupBox1.Controls.Add(Me.labConCustomerLevel) 
        Me.GroupBox1.Location = New System.Drawing.Point(168, 12) 
        Me.GroupBox1.Name = "GroupBox1" 
        Me.GroupBox1.Size = New System.Drawing.Size(408, 132) 
        Me.GroupBox1.TabIndex = 144 
        Me.GroupBox1.TabStop = False 
        Me.GroupBox1.Text = "基本信息修改" 
        ' 
        'cbConID 
        ' 
        Me.cbConID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 
        Me.cbConID.Location = New System.Drawing.Point(72, 16) 
        Me.cbConID.Name = "cbConID" 
        Me.cbConID.Size = New System.Drawing.Size(96, 20) 
        Me.cbConID.TabIndex = 135 
        ' 
        'dtpCon 
        ' 
        Me.dtpCon.Location = New System.Drawing.Point(236, 100) 
        Me.dtpCon.Name = "dtpCon" 
        Me.dtpCon.Size = New System.Drawing.Size(108, 21) 
        Me.dtpCon.TabIndex = 134 
        ' 
        'Label49 
        ' 
        Me.Label49.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label49.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label49.Location = New System.Drawing.Point(8, 48) 
        Me.Label49.Name = "Label49" 
        Me.Label49.Size = New System.Drawing.Size(64, 16) 
        Me.Label49.TabIndex = 116 
        Me.Label49.Text = "合同类型:" 
        ' 
        'Label50 
        ' 
        Me.Label50.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label50.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label50.Location = New System.Drawing.Point(8, 20) 
        Me.Label50.Name = "Label50" 
        Me.Label50.Size = New System.Drawing.Size(64, 16) 
        Me.Label50.TabIndex = 110 
        Me.Label50.Text = "合同编号:" 
        ' 
        'Label58 
        ' 
        Me.Label58.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label58.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label58.Location = New System.Drawing.Point(176, 104) 
        Me.Label58.Name = "Label58" 
        Me.Label58.Size = New System.Drawing.Size(64, 16) 
        Me.Label58.TabIndex = 133 
        Me.Label58.Text = "签订日期:" 
        ' 
        'cbConCustomer 
        ' 
        Me.cbConCustomer.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 
        Me.cbConCustomer.Location = New System.Drawing.Point(72, 72) 
        Me.cbConCustomer.Name = "cbConCustomer" 
        Me.cbConCustomer.Size = New System.Drawing.Size(96, 20) 
        Me.cbConCustomer.TabIndex = 129 
        ' 
        'cbConType 
        ' 
        Me.cbConType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 
        Me.cbConType.Items.AddRange(New Object() {"采购", "销售"}) 
        Me.cbConType.Location = New System.Drawing.Point(72, 44) 
        Me.cbConType.Name = "cbConType" 
        Me.cbConType.Size = New System.Drawing.Size(96, 20) 
        Me.cbConType.TabIndex = 128 
        ' 
        'cbConPaytype 
        ' 
        Me.cbConPaytype.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList 
        Me.cbConPaytype.Items.AddRange(New Object() {"现金支付", "银行转帐", "股权转让", "其他方式"}) 
        Me.cbConPaytype.Location = New System.Drawing.Point(72, 100) 
        Me.cbConPaytype.Name = "cbConPaytype" 
        Me.cbConPaytype.Size = New System.Drawing.Size(96, 20) 
        Me.cbConPaytype.TabIndex = 127 
        ' 
        'Label47 
        ' 
        Me.Label47.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label47.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label47.Location = New System.Drawing.Point(8, 76) 
        Me.Label47.Name = "Label47" 
        Me.Label47.Size = New System.Drawing.Size(64, 16) 
        Me.Label47.TabIndex = 118 
        Me.Label47.Text = "合同对象:" 
        ' 
        'Label48 
        ' 
        Me.Label48.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.Label48.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.Label48.Location = New System.Drawing.Point(8, 104) 
        Me.Label48.Name = "Label48" 
        Me.Label48.Size = New System.Drawing.Size(64, 16) 
        Me.Label48.TabIndex = 117 
        Me.Label48.Text = "付款方式:" 
        ' 
        'btnConCustomerView 
        ' 
        Me.btnConCustomerView.BackColor = System.Drawing.SystemColors.Control 
        Me.btnConCustomerView.FlatStyle = System.Windows.Forms.FlatStyle.Popup 
        Me.btnConCustomerView.Location = New System.Drawing.Point(244, 68) 
        Me.btnConCustomerView.Name = "btnConCustomerView" 
        Me.btnConCustomerView.Size = New System.Drawing.Size(88, 24) 
        Me.btnConCustomerView.TabIndex = 130 
        Me.btnConCustomerView.Text = "查看客户信息" 
        ' 
        'labConCustomerLevel 
        ' 
        Me.labConCustomerLevel.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte)) 
        Me.labConCustomerLevel.ForeColor = System.Drawing.SystemColors.ControlText 
        Me.labConCustomerLevel.Location = New System.Drawing.Point(176, 76) 
        Me.labConCustomerLevel.Name = "labConCustomerLevel" 
        Me.labConCustomerLevel.Size = New System.Drawing.Size(60, 16) 
        Me.labConCustomerLevel.TabIndex = 126 
        Me.labConCustomerLevel.Text = "★★☆☆" 
        ' 
        'btnCancel 
        ' 
        Me.btnCancel.Location = New System.Drawing.Point(512, 312) 
        Me.btnCancel.Name = "btnCancel" 
        Me.btnCancel.Size = New System.Drawing.Size(60, 24) 
        Me.btnCancel.TabIndex = 145 
        Me.btnCancel.Text = "关闭(&C)" 
        ' 
        'btnConDelete 
        ' 
        Me.btnConDelete.Location = New System.Drawing.Point(440, 312) 
        Me.btnConDelete.Name = "btnConDelete" 
        Me.btnConDelete.Size = New System.Drawing.Size(60, 24) 
        Me.btnConDelete.TabIndex = 146 
        Me.btnConDelete.Text = "删除(&D)" 
        ' 
        'btnConModify 
        ' 
        Me.btnConModify.Location = New System.Drawing.Point(372, 312) 
        Me.btnConModify.Name = "btnConModify" 
        Me.btnConModify.Size = New System.Drawing.Size(56, 24) 
        Me.btnConModify.TabIndex = 147 
        Me.btnConModify.Text = "修改(&M)" 
        ' 
        'frmConModify 
        ' 
        Me.AcceptButton = Me.btnCancel 
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14) 
        Me.ClientSize = New System.Drawing.Size(590, 343) 
        Me.Controls.Add(Me.btnConDelete) 
        Me.Controls.Add(Me.btnCancel) 
        Me.Controls.Add(Me.PictureBox1) 
        Me.Controls.Add(Me.GroupBox2) 
        Me.Controls.Add(Me.GroupBox1) 
        Me.Controls.Add(Me.btnConModify) 
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog 
        Me.MaximizeBox = False 
        Me.MinimizeBox = False 
        Me.Name = "frmConModify" 
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent 
        Me.Text = "合同信息管理" 
        Me.GroupBox2.ResumeLayout(False) 
        CType(Me.dgCon, System.ComponentModel.ISupportInitialize).EndInit() 
        CType(Me.nudStockNumber, System.ComponentModel.ISupportInitialize).EndInit() 
        Me.GroupBox1.ResumeLayout(False) 
        Me.ResumeLayout(False) 
 
    End Sub 
 
#End Region 
 
    Private Sub frmConModify_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
 
        '删除临时库存记录 
        Dim tmyConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim tmyComm As OleDbCommand = New OleDbCommand 
        tmyComm.Connection = tmyConn 
        tmyComm.CommandText = "delete * from stocktemp" 
        tmyConn.Open() 
        tmyComm.ExecuteNonQuery() 
        tmyConn.Close() 
 
        Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim myComm As OleDbCommand = New OleDbCommand 
        myComm.Connection = myConn 
        myComm.CommandText = "select id from contract where factor = false" 
        Dim myReader As OleDbDataReader 
        myConn.Open() 
        myReader = myComm.ExecuteReader() 
        While myReader.Read 
            cbConID.Items.Add(myReader.GetInt32(0)) 
        End While 
        myConn.Close() 
        Me.txtConSum.Enabled = False 
        Me.labConCustomerLevel.Text = "" 
        Me.txtConInprice.Enabled = False 
 
        '获取客户信息 
        Dim cmyComm As OleDbCommand = New OleDbCommand 
        cmyComm.Connection = myConn 
        cmyComm.CommandText = "select name from customer" 
        Dim cmyReader As OleDbDataReader 
        myConn.Open() 
        cmyReader = cmyComm.ExecuteReader() 
        While cmyReader.Read 
            cbConCustomer.Items.Add(cmyReader.GetString(0)) 
        End While 
        myConn.Close() 
 
        '获取成品名称 
        Dim pmyConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim pmyComm As OleDbCommand = New OleDbCommand 
        pmyComm.Connection = pmyConn 
        pmyComm.CommandText = "select name from product" 
        Dim pmyReader As OleDbDataReader 
        pmyConn.Open() 
        pmyReader = pmyComm.ExecuteReader() 
        While pmyReader.Read 
            cbStockProname.Items.Add(pmyReader.GetString(0)) 
        End While 
        pmyConn.Close() 
 
 
    End Sub 
 
    Private Sub cbConID_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbConID.SelectedIndexChanged 
        If cbConID.SelectedIndex = -1 Then 
            Exit Sub 
        End If 
 
        '删除临时库存记录 
        Dim tmyConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim tmyComm As OleDbCommand = New OleDbCommand 
        tmyComm.Connection = tmyConn 
        tmyComm.CommandText = "delete * from stocktemp" 
        tmyConn.Open() 
        tmyComm.ExecuteNonQuery() 
        tmyConn.Close() 
 
        Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim myComm As OleDbCommand = New OleDbCommand 
        myComm.Connection = myConn 
        myComm.CommandText = "select * from contract where id = " & cbConID.SelectedItem 
        Dim myReader As OleDbDataReader 
        myConn.Open() 
        myReader = myComm.ExecuteReader() 
        While myReader.Read 
            cbConType.SelectedItem = myReader.GetString(1) 
            cbConCustomer.SelectedItem = myReader.GetString(2) 
            txtConSum.Text = myReader.GetDouble(3) 
            cbConPaytype.SelectedItem = myReader.GetString(4) 
            dtpCon.Text = myReader.GetDateTime(6) 
        End While 
        myConn.Close() 
 
 
        '订单信息 
        Dim sqlStr As String = "select proname,snumber,price from stock where contract = " & "'" & Me.cbConID.SelectedItem & "'" 
        Dim conConn As New OleDbConnection(strConn) 
        Dim conComm As New OleDbCommand(sqlStr, conConn) 
        Dim myDa As New OleDbDataAdapter 
        myDa.SelectCommand = conComm 
        Dim myDs As New DataSet 
        myDa.Fill(myDs, "stock") 
        dgCon.DataSource = myDs.Tables("stock") 
        conConn.Close() 
 
        '将订单信息加入临时库存 
        Dim tProname As String 
        Dim tNumber As Long 
        Dim tPrice As Double 
        Dim i As Integer 
        Dim g As Integer 
        Dim stockTempComm As OleDbCommand = New OleDbCommand 
        stockTempComm.Connection = myConn 
        stockTempComm.CommandText = "select count(proname) from stock where contract = " & "'" & Me.cbConID.SelectedItem & "'" 
        myConn.Open() 
 
        Dim count As Object = stockTempComm.ExecuteScalar() 
        g = CInt(count) 
        myConn.Close() 
 
        Dim stockComm As OleDbCommand = New OleDbCommand 
        stockComm.Connection = myConn 
        stockComm.CommandText = "insert into stocktemp (tindex,proname,tnumber,price) values (@tindex,@proname,@tnumber,@price)" 
        myConn.Open() 
 
 
        For i = 0 To g - 1 
            stockTemp = stockTemp + 1 
            tProname = CStr(dgCon.Item(i, 0)) 
            tNumber = CLng(dgCon.Item(i, 1)) 
            tPrice = CSng(dgCon.Item(i, 2)) 
            stockComm.Parameters.Add("@tindex", stockTemp) 
            stockComm.Parameters.Add("@proname", tProname) 
            stockComm.Parameters.Add("@tnumber", tNumber) 
            stockComm.Parameters.Add("@price", tPrice) 
            Try 
                stockComm.ExecuteNonQuery() 
            Catch ex As Exception 
                MsgBox(Err.Description) 
            End Try 
            stockComm.Parameters.Clear() 
        Next 
        myConn.Close() 
 
    End Sub 
 
    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click 
 
        '删除临时库存记录 
        Dim tmyConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim tmyComm As OleDbCommand = New OleDbCommand 
        tmyComm.Connection = tmyConn 
        tmyComm.CommandText = "delete * from stocktemp" 
        tmyConn.Open() 
        tmyComm.ExecuteNonQuery() 
        tmyConn.Close() 
 
        Me.Close() 
    End Sub 
 
    Private Sub btnConDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConDelete.Click 
        If cbConID.SelectedIndex = -1 Then 
            Exit Sub 
        End If 
        Dim t As String 
 
        Dim temp As MsgBoxResult 
        temp = MsgBox("确实要删除此条记录吗?", MsgBoxStyle.YesNo, "提示信息:") 
        If temp = MsgBoxResult.Yes Then 
            Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
            Dim myComm As OleDbCommand = New OleDbCommand 
            myComm.Connection = myConn 
            myComm.CommandText = "delete from contract where id =@id" 
            myComm.Parameters.Add("@id", CLng(cbConID.SelectedItem)) 
            t = cbConID.SelectedItem 
            cbConID.Items.RemoveAt(cbConID.SelectedIndex) 
            myConn.Open() 
            myComm.ExecuteNonQuery() 
            myConn.Close() 
            cbConID.SelectedIndex = -1 
            cbConCustomer.SelectedIndex = -1 
            cbConType.SelectedIndex = -1 
            cbConPaytype.SelectedIndex = -1 
            Me.dtpCon.Value = DateTime.Today 
            Me.labConCustomerLevel.Text = "" 
 
            '订单信息 
            Dim sqlStr As String = "delete * from stock where contract = " & "'" & t & "'" 
            Dim conConn As New OleDbConnection(strConn) 
            Dim conComm As New OleDbCommand 
            conComm.Connection = conConn 
            conComm.CommandText = sqlStr 
            conConn.Open() 
            conComm.ExecuteNonQuery() 
            conConn.Close() 
 
            '订单信息 
            Dim asqlStr As String = "select proname,snumber,price from stock where contract = " & "'" & Me.cbConID.SelectedItem & "'" 
            Dim aconConn As New OleDbConnection(strConn) 
            Dim aconComm As New OleDbCommand(asqlStr, aconConn) 
            Dim myDa As New OleDbDataAdapter 
            myDa.SelectCommand = aconComm 
            Dim myDs As New DataSet 
            myDa.Fill(myDs, "stock") 
            dgCon.DataSource = myDs.Tables("stock") 
            aconConn.Close() 
 
            '删除临时库存记录 
            Dim tmyConn As OleDbConnection = New OleDbConnection(strConn) 
            Dim tmyComm As OleDbCommand = New OleDbCommand 
            tmyComm.Connection = tmyConn 
            tmyComm.CommandText = "delete * from stocktemp" 
            tmyConn.Open() 
            tmyComm.ExecuteNonQuery() 
            tmyConn.Close() 
 
        Else 
            Exit Sub 
        End If 
    End Sub 
 
    Private Sub cbConCustomer_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbConCustomer.SelectedIndexChanged 
        If Me.cbConCustomer.SelectedIndex = -1 Then 
            Exit Sub 
        End If 
        Try 
            Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
            Dim myComm As OleDbCommand = New OleDbCommand 
            myComm.Connection = myConn 
            myComm.CommandText = "select clevel from customer where name = @name" 
            Dim myReader As OleDbDataReader 
            myConn.Open() 
            myComm.Parameters.Add("@name", cbConCustomer.SelectedItem) 
            myReader = myComm.ExecuteReader() 
            While myReader.Read 
                Me.labConCustomerLevel.Text = myReader.GetString(0) 
            End While 
            myConn.Close() 
        Catch ex As Exception 
            MsgBox(Err.Description) 
        End Try 
 
        If Me.labConCustomerLevel.Text = "★☆☆☆" Then 
            Me.txtConInprice.Text = "0.05" 
        ElseIf Me.labConCustomerLevel.Text = "★★☆☆" Then 
            Me.txtConInprice.Text = "0.1" 
        ElseIf Me.labConCustomerLevel.Text = "★★★☆" Then 
            Me.txtConInprice.Text = "0.15" 
        ElseIf Me.labConCustomerLevel.Text = "★★★★" Then 
            Me.txtConInprice.Text = "0.2" 
        End If 
 
    End Sub 
 
    Private Sub btnConCustomerView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConCustomerView.Click 
        If Me.cbConCustomer.SelectedIndex = -1 Then 
            Exit Sub 
        End If 
        Try 
 
            Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
            Dim myComm As OleDbCommand = New OleDbCommand 
            myComm.Connection = myConn 
            myComm.CommandText = "select id,address,phone,banknumber from customer where name = @name" 
            myComm.Parameters.Add("@name", Me.cbConCustomer.SelectedItem) 
            Dim myReader As OleDbDataReader 
            myConn.Open() 
            Dim tID As Long 
            Dim tPhone As String 
            Dim tAddress As String 
            Dim tBankNumber 
            myReader = myComm.ExecuteReader() 
            While myReader.Read 
                tID = myReader.GetInt32(0) 
                tAddress = myReader.GetString(1) 
                tPhone = myReader.GetString(2) 
                tBankNumber = myReader.GetString(3) 
            End While 
            myConn.Close() 
            MsgBox("客户编号: " & tID & Chr(10) & "客户姓名: " & Me.cbConCustomer.SelectedItem & Chr(10) & "客户电话: " & tPhone & Chr(10) & "客户地址: " & tAddress & Chr(10) & "银行帐号: " & tBankNumber, MsgBoxStyle.Information, "提示信息") 
        Catch ex As Exception 
            MsgBox(Err.Description) 
        End Try 
    End Sub 
 
    Private Sub btnStockTempAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStockTempAdd.Click 
        If Me.cbStockProname.SelectedIndex = -1 Then 
            MsgBox("产品名称不能为空!", MsgBoxStyle.Information, "提示信息") 
            Exit Sub 
        End If 
        If Me.txtStockPrice.Text = "" Then 
            MsgBox("产品单价不能为空!", MsgBoxStyle.Information, "提示信息") 
            Exit Sub 
        End If 
        stockTemp = stockTemp + 1 
        Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim myComm As OleDbCommand = New OleDbCommand 
        myComm.Connection = myConn 
        myComm.CommandText = "insert into stocktemp (tindex,proname,tnumber,price) values (@tindex,@proname,@tnumber,@price)" 
 
        myComm.Parameters.Add("@tindex", stockTemp) 
        myComm.Parameters.Add("@proname", cbStockProname.SelectedItem) 
        myComm.Parameters.Add("@tnumber", CLng(nudStockNumber.Value)) 
        myComm.Parameters.Add("@price", CSng(txtStockPrice.Text)) 
        myConn.Open() 
        Try 
            myComm.ExecuteNonQuery() 
        Catch ex As Exception 
            MsgBox("产品重复添加,请查看您输入的信息!", MsgBoxStyle.Information, "提示信息") 
        End Try 
 
        myConn.Close() 
 
        '计算交易金额 
        Dim tNumber As Long 
        Dim tPrice As Single 
        Dim tSum As Double = 0 
        Dim tConn As New OleDbConnection(strConn) 
        Dim tComm As New OleDbCommand 
        tComm.Connection = tConn 
        tComm.CommandText = "select tnumber,price from stocktemp" 
        Dim tReader As OleDbDataReader 
        tConn.Open() 
        tReader = tComm.ExecuteReader 
        While tReader.Read 
            tNumber = tReader.GetInt32(0) 
            tPrice = tReader.GetFloat(1) 
            tSum = tSum + tNumber * tPrice 
        End While 
        Dim tDou As Double = (1 - CSng(txtConInprice.Text)) * tSum 
        txtConSum.Text = Format(tDou, "0.00") 
        tConn.Close() 
 
        '更新订单信息 
 
        Dim sqlStr As String = "select proname,tnumber,price from stocktemp" 
        Dim conConn As New OleDbConnection(strConn) 
        Dim conComm As New OleDbCommand(sqlStr, conConn) 
        Dim myDa As New OleDbDataAdapter 
        myDa.SelectCommand = conComm 
        Dim myDs As New DataSet 
        myDa.Fill(myDs, "stocktemp") 
        dgCon.DataSource = myDs.Tables("stocktemp") 
        conConn.Close() 
    End Sub 
 
    Private Sub btnConModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConModify.Click 
 
        If CDbl(Me.txtConSum.Text) = 0 Then 
            MsgBox("订单信息不能为空!", MsgBoxStyle.Information, "提示信息") 
            Exit Sub 
        End If 
 
        '删除原有合同库存 
        Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim myComm As OleDbCommand = New OleDbCommand 
        myComm.Connection = myConn 
        myComm.CommandText = "delete from stock where contract = " & "'" & Me.cbConID.SelectedItem & "'" 
        myConn.Open() 
        myComm.ExecuteNonQuery() 
        myConn.Close() 
 
        '更新合同表 
        Dim saveComm As OleDbCommand = New OleDbCommand 
        saveComm.CommandText = "update contract set ctype= @ctype,customer = @customer,csum = @csum, paytype = @paytype,signdate=@signdate where id=" & Me.cbConID.SelectedItem 
        saveComm.Connection = myConn 
        saveComm.Parameters.Add("@ctype", Me.cbConType.SelectedItem) 
        saveComm.Parameters.Add("@customer", Me.cbConCustomer.SelectedItem) 
        saveComm.Parameters.Add("@csum", CDbl(Me.txtConSum.Text)) 
        saveComm.Parameters.Add("@paytype", Me.cbConPaytype.SelectedItem) 
        saveComm.Parameters.Add("@signdate", Me.dtpCon.Text) 
        myConn.Open() 
        Try 
            saveComm.ExecuteNonQuery() 
        Catch ex As Exception 
            MsgBox(Err.Description, MsgBoxStyle.Information) 
        End Try 
        myConn.Close() 
 
        '更新库存表 
        Dim tProname As String 
        Dim tNumber As Long 
        Dim tPrice As Double 
        Dim i As Integer 
        Dim g As Integer 
        Dim stockTempComm As OleDbCommand = New OleDbCommand 
        stockTempComm.Connection = myConn 
        stockTempComm.CommandText = "select count(proname) from stocktemp" 
        myConn.Open() 
        Dim count As Object = stockTempComm.ExecuteScalar() 
        g = CInt(count) 
        myConn.Close() 
 
        Dim stockComm As OleDbCommand = New OleDbCommand 
        stockComm.Connection = myConn 
        stockComm.CommandText = "insert into stock (contract,stype,proname,snumber,price) values (@contract,@stype,@proname,@snumber,@price)" 
        myConn.Open() 
 
        For i = 0 To g - 1 
 
            tProname = CStr(dgCon.Item(i, 0)) 
            tNumber = CLng(dgCon.Item(i, 1)) 
            tPrice = CSng(dgCon.Item(i, 2)) 
            stockComm.Parameters.Add("@contract", cbConID.SelectedItem) 
            stockComm.Parameters.Add("@stype", Me.cbConType.SelectedItem) 
            stockComm.Parameters.Add("@proname", tProname) 
            stockComm.Parameters.Add("@snumber", tNumber) 
            stockComm.Parameters.Add("@price", tPrice) 
            Try 
                stockComm.ExecuteNonQuery() 
            Catch ex As Exception 
                MsgBox(Err.Description) 
            End Try 
            stockComm.Parameters.Clear() 
        Next 
        myConn.Close() 
        MsgBox("合同修改成功!", MsgBoxStyle.Information, "提示信息") 
 
    End Sub 
 
    Private Sub btnStockTempDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStockTempDelete.Click 
        If dgCon.CurrentRowIndex = -1 Then 
            Exit Sub 
        End If 
        Dim tMsg As MsgBoxResult 
        Dim numTemp As Integer 
        Dim pronameTemp As String 
        numTemp = dgCon.CurrentRowIndex 
        Dim numTemp2 As Integer 
        pronameTemp = dgCon.Item(numTemp, 0) 
 
        tMsg = MsgBox("确实要删除产品名称为 < " & pronameTemp & " > 的订单记录?", MsgBoxStyle.YesNo, "提示信息") 
        If tMsg = MsgBoxResult.No Then 
            Exit Sub 
        End If 
 
        Dim myConn As OleDbConnection = New OleDbConnection(strConn) 
        Dim myComm As OleDbCommand = New OleDbCommand 
        myComm.Connection = myConn 
        myComm.CommandText = "delete from stocktemp where proname = @proname" 
        myComm.Parameters.Add("proname", pronameTemp) 
        myConn.Open() 
        myComm.ExecuteNonQuery() 
        myConn.Close() 
 
        '计算交易金额 
        Dim tNumber As Long 
        Dim tPrice As Single 
        Dim tSum As Double = 0 
        Dim tConn As New OleDbConnection(strConn) 
        Dim tComm As New OleDbCommand 
        tComm.Connection = tConn 
        tComm.CommandText = "select tnumber,price from stocktemp" 
        Dim tReader As OleDbDataReader 
        tConn.Open() 
        tReader = tComm.ExecuteReader 
        While tReader.Read 
            tNumber = tReader.GetInt32(0) 
            tPrice = tReader.GetFloat(1) 
            tSum = tSum + tNumber * tPrice 
        End While 
        Dim tDou As Double = (1 - CSng(txtConInprice.Text)) * tSum 
        txtConSum.Text = Format(tDou, "0.00") 
        tConn.Close() 
 
 
        '更新订单信息 
        Dim sqlStr As String = "select tindex,proname,tnumber,price from stocktemp" 
        Dim conConn As New OleDbConnection(strConn) 
        Dim conComm As New OleDbCommand(sqlStr, conConn) 
        Dim myDa As New OleDbDataAdapter 
        myDa.SelectCommand = conComm 
        Dim myDs As New DataSet 
        myDa.Fill(myDs, "stocktemp") 
        dgCon.DataSource = myDs.Tables("stocktemp") 
        conConn.Close() 
 
    End Sub 
 
    Private Sub txtStockPrice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtStockPrice.TextChanged 
        modMain.checkNum(txtStockPrice) 
    End Sub 
 
    Private Sub nudStockNumber_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nudStockNumber.ValueChanged 
        If nudStockNumber.Value > 100000 Then 
            MsgBox("超出数量限定!", MsgBoxStyle.Information, "提示信息") 
            nudStockNumber.Value = 100000 
        Else 
            If nudStockNumber.Value < 1 Then 
                MsgBox("低于数量限定!", MsgBoxStyle.Information, "提示信息") 
                nudStockNumber.Value = 1 
            End If 
        End If 
    End Sub 
End Class