frmPsSk.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:24k
- Public Class frmPsSk
- Inherits System.Windows.Forms.Form
- #Region " Windows 窗体设计器生成的代码 "
- Public Sub New()
- MyBase.New()
- '该调用是 Windows 窗体设计器所必需的。
- InitializeComponent()
- '在 InitializeComponent() 调用之后添加任何初始化
- End Sub
- '窗体重写 dispose 以清理组件列表。
- Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing Then
- If Not (components Is Nothing) Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(disposing)
- End Sub
- 'Windows 窗体设计器所必需的
- Private components As System.ComponentModel.IContainer
- '注意: 以下过程是 Windows 窗体设计器所必需的
- '可以使用 Windows 窗体设计器修改此过程。
- '不要使用代码编辑器修改它。
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents txtdate As System.Windows.Forms.DateTimePicker
- Friend WithEvents lstview As System.Windows.Forms.ListBox
- Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
- Friend WithEvents txtzy As System.Windows.Forms.TextBox
- Friend WithEvents Label14 As System.Windows.Forms.Label
- Friend WithEvents txtshy As System.Windows.Forms.ComboBox
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents txtczy As System.Windows.Forms.ComboBox
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents txtyemoney As System.Windows.Forms.TextBox
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents txtYmoney As System.Windows.Forms.TextBox
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents txtyfmoney As System.Windows.Forms.TextBox
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents txtMoney As System.Windows.Forms.TextBox
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents txtdateSK As System.Windows.Forms.DateTimePicker
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents txtBillnumber As System.Windows.Forms.TextBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
- Friend WithEvents btnAdd As System.Windows.Forms.ToolBarButton
- Friend WithEvents btnsave As System.Windows.Forms.ToolBarButton
- Friend WithEvents btnprint As System.Windows.Forms.ToolBarButton
- Friend WithEvents btnexit As System.Windows.Forms.ToolBarButton
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents txtbhnumber As System.Windows.Forms.TextBox
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
- Friend WithEvents txtpscenter As System.Windows.Forms.TextBox
- Friend WithEvents txtpsmedname As System.Windows.Forms.TextBox
- Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container
- Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmPsSk))
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtpsmedname = New System.Windows.Forms.TextBox
- Me.txtpscenter = New System.Windows.Forms.TextBox
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtbhnumber = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.Label3 = New System.Windows.Forms.Label
- Me.txtdate = New System.Windows.Forms.DateTimePicker
- Me.lstview = New System.Windows.Forms.ListBox
- Me.GroupBox4 = New System.Windows.Forms.GroupBox
- Me.txtzy = New System.Windows.Forms.TextBox
- Me.Label14 = New System.Windows.Forms.Label
- Me.txtshy = New System.Windows.Forms.ComboBox
- Me.Label12 = New System.Windows.Forms.Label
- Me.txtczy = New System.Windows.Forms.ComboBox
- Me.Label11 = New System.Windows.Forms.Label
- Me.txtyemoney = New System.Windows.Forms.TextBox
- Me.Label10 = New System.Windows.Forms.Label
- Me.txtYmoney = New System.Windows.Forms.TextBox
- Me.Label9 = New System.Windows.Forms.Label
- Me.txtyfmoney = New System.Windows.Forms.TextBox
- Me.Label8 = New System.Windows.Forms.Label
- Me.txtMoney = New System.Windows.Forms.TextBox
- Me.Label7 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.txtdateSK = New System.Windows.Forms.DateTimePicker
- Me.Label2 = New System.Windows.Forms.Label
- Me.txtBillnumber = New System.Windows.Forms.TextBox
- Me.Label1 = New System.Windows.Forms.Label
- Me.ToolBar1 = New System.Windows.Forms.ToolBar
- Me.btnAdd = New System.Windows.Forms.ToolBarButton
- Me.btnsave = New System.Windows.Forms.ToolBarButton
- Me.btnprint = New System.Windows.Forms.ToolBarButton
- Me.btnexit = New System.Windows.Forms.ToolBarButton
- Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
- Me.Panel1 = New System.Windows.Forms.Panel
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
- Me.GroupBox1.SuspendLayout()
- Me.Panel1.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtpsmedname)
- Me.GroupBox1.Controls.Add(Me.txtpscenter)
- Me.GroupBox1.Controls.Add(Me.Label5)
- Me.GroupBox1.Controls.Add(Me.txtbhnumber)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.txtdate)
- Me.GroupBox1.Controls.Add(Me.lstview)
- Me.GroupBox1.Controls.Add(Me.GroupBox4)
- Me.GroupBox1.Controls.Add(Me.txtzy)
- Me.GroupBox1.Controls.Add(Me.Label14)
- Me.GroupBox1.Controls.Add(Me.txtshy)
- Me.GroupBox1.Controls.Add(Me.Label12)
- Me.GroupBox1.Controls.Add(Me.txtczy)
- Me.GroupBox1.Controls.Add(Me.Label11)
- Me.GroupBox1.Controls.Add(Me.txtyemoney)
- Me.GroupBox1.Controls.Add(Me.Label10)
- Me.GroupBox1.Controls.Add(Me.txtYmoney)
- Me.GroupBox1.Controls.Add(Me.Label9)
- Me.GroupBox1.Controls.Add(Me.txtyfmoney)
- Me.GroupBox1.Controls.Add(Me.Label8)
- Me.GroupBox1.Controls.Add(Me.txtMoney)
- Me.GroupBox1.Controls.Add(Me.Label7)
- Me.GroupBox1.Controls.Add(Me.GroupBox2)
- Me.GroupBox1.Controls.Add(Me.txtdateSK)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.txtBillnumber)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox1.Location = New System.Drawing.Point(0, 41)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(658, 180)
- Me.GroupBox1.TabIndex = 4
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "补货票号:"
- '
- 'txtpsmedname
- '
- Me.txtpsmedname.Location = New System.Drawing.Point(462, 56)
- Me.txtpsmedname.Name = "txtpsmedname"
- Me.txtpsmedname.ReadOnly = True
- Me.txtpsmedname.Size = New System.Drawing.Size(150, 21)
- Me.txtpsmedname.TabIndex = 43
- Me.txtpsmedname.Text = ""
- '
- 'txtpscenter
- '
- Me.txtpscenter.Location = New System.Drawing.Point(180, 56)
- Me.txtpscenter.Name = "txtpscenter"
- Me.txtpscenter.ReadOnly = True
- Me.txtpscenter.Size = New System.Drawing.Size(216, 21)
- Me.txtpscenter.TabIndex = 42
- Me.txtpscenter.Text = ""
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(126, 62)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(66, 17)
- Me.Label5.TabIndex = 41
- Me.Label5.Text = "配送中心:"
- Me.Label5.TextAlign = System.Drawing.ContentAlignment.TopRight
- '
- 'txtbhnumber
- '
- Me.txtbhnumber.Location = New System.Drawing.Point(180, 25)
- Me.txtbhnumber.Name = "txtbhnumber"
- Me.txtbhnumber.ReadOnly = True
- Me.txtbhnumber.Size = New System.Drawing.Size(120, 21)
- Me.txtbhnumber.TabIndex = 40
- Me.txtbhnumber.Text = ""
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(126, 31)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(66, 17)
- Me.Label4.TabIndex = 39
- Me.Label4.Text = "补货票号:"
- Me.Label4.TextAlign = System.Drawing.ContentAlignment.TopRight
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(408, 62)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(66, 17)
- Me.Label3.TabIndex = 38
- Me.Label3.Text = "配送对象:"
- Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopRight
- '
- 'txtdate
- '
- Me.txtdate.Location = New System.Drawing.Point(6, 16)
- Me.txtdate.Name = "txtdate"
- Me.txtdate.Size = New System.Drawing.Size(102, 21)
- Me.txtdate.TabIndex = 32
- Me.txtdate.Value = New Date(2006, 2, 20, 0, 0, 0, 0)
- '
- 'lstview
- '
- Me.lstview.ItemHeight = 12
- Me.lstview.Location = New System.Drawing.Point(6, 40)
- Me.lstview.Name = "lstview"
- Me.lstview.Size = New System.Drawing.Size(102, 112)
- Me.lstview.TabIndex = 31
- '
- 'GroupBox4
- '
- Me.GroupBox4.Location = New System.Drawing.Point(112, 0)
- Me.GroupBox4.Name = "GroupBox4"
- Me.GroupBox4.Size = New System.Drawing.Size(8, 184)
- Me.GroupBox4.TabIndex = 30
- Me.GroupBox4.TabStop = False
- '
- 'txtzy
- '
- Me.txtzy.Location = New System.Drawing.Point(462, 118)
- Me.txtzy.Name = "txtzy"
- Me.txtzy.Size = New System.Drawing.Size(150, 21)
- Me.txtzy.TabIndex = 28
- Me.txtzy.Text = ""
- '
- 'Label14
- '
- Me.Label14.AutoSize = True
- Me.Label14.Location = New System.Drawing.Point(432, 124)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(42, 17)
- Me.Label14.TabIndex = 27
- Me.Label14.Text = "摘要:"
- '
- 'txtshy
- '
- Me.txtshy.Location = New System.Drawing.Point(336, 120)
- Me.txtshy.Name = "txtshy"
- Me.txtshy.Size = New System.Drawing.Size(60, 20)
- Me.txtshy.TabIndex = 24
- '
- 'Label12
- '
- Me.Label12.AutoSize = True
- Me.Label12.Location = New System.Drawing.Point(296, 128)
- Me.Label12.Name = "Label12"
- Me.Label12.Size = New System.Drawing.Size(54, 17)
- Me.Label12.TabIndex = 23
- Me.Label12.Text = "审核员:"
- '
- 'txtczy
- '
- Me.txtczy.Location = New System.Drawing.Point(180, 120)
- Me.txtczy.Name = "txtczy"
- Me.txtczy.Size = New System.Drawing.Size(88, 20)
- Me.txtczy.TabIndex = 22
- '
- 'Label11
- '
- Me.Label11.AutoSize = True
- Me.Label11.Location = New System.Drawing.Point(142, 128)
- Me.Label11.Name = "Label11"
- Me.Label11.Size = New System.Drawing.Size(54, 17)
- Me.Label11.TabIndex = 21
- Me.Label11.Text = "配送员:"
- '
- 'txtyemoney
- '
- Me.txtyemoney.Location = New System.Drawing.Point(558, 88)
- Me.txtyemoney.Name = "txtyemoney"
- Me.txtyemoney.ReadOnly = True
- Me.txtyemoney.Size = New System.Drawing.Size(54, 21)
- Me.txtyemoney.TabIndex = 20
- Me.txtyemoney.Text = ""
- '
- 'Label10
- '
- Me.Label10.AutoSize = True
- Me.Label10.Location = New System.Drawing.Point(528, 96)
- Me.Label10.Name = "Label10"
- Me.Label10.Size = New System.Drawing.Size(42, 17)
- Me.Label10.TabIndex = 19
- Me.Label10.Text = "余额:"
- '
- 'txtYmoney
- '
- Me.txtYmoney.Location = New System.Drawing.Point(336, 88)
- Me.txtYmoney.Name = "txtYmoney"
- Me.txtYmoney.ReadOnly = True
- Me.txtYmoney.Size = New System.Drawing.Size(60, 21)
- Me.txtYmoney.TabIndex = 18
- Me.txtYmoney.Text = ""
- '
- 'Label9
- '
- Me.Label9.AutoSize = True
- Me.Label9.Location = New System.Drawing.Point(282, 96)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(66, 17)
- Me.Label9.TabIndex = 17
- Me.Label9.Text = "已收金额:"
- '
- 'txtyfmoney
- '
- Me.txtyfmoney.Location = New System.Drawing.Point(462, 88)
- Me.txtyfmoney.Name = "txtyfmoney"
- Me.txtyfmoney.ReadOnly = True
- Me.txtyfmoney.Size = New System.Drawing.Size(60, 21)
- Me.txtyfmoney.TabIndex = 16
- Me.txtyfmoney.Text = ""
- '
- 'Label8
- '
- Me.Label8.AutoSize = True
- Me.Label8.Location = New System.Drawing.Point(408, 96)
- Me.Label8.Name = "Label8"
- Me.Label8.Size = New System.Drawing.Size(66, 17)
- Me.Label8.TabIndex = 15
- Me.Label8.Text = "应收金额:"
- '
- 'txtMoney
- '
- Me.txtMoney.Location = New System.Drawing.Point(180, 88)
- Me.txtMoney.Name = "txtMoney"
- Me.txtMoney.Size = New System.Drawing.Size(88, 21)
- Me.txtMoney.TabIndex = 14
- Me.txtMoney.Text = ""
- '
- 'Label7
- '
- Me.Label7.AutoSize = True
- Me.Label7.Location = New System.Drawing.Point(152, 96)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(42, 17)
- Me.Label7.TabIndex = 13
- Me.Label7.Text = "金额:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Location = New System.Drawing.Point(120, 48)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(492, 6)
- Me.GroupBox2.TabIndex = 6
- Me.GroupBox2.TabStop = False
- '
- 'txtdateSK
- '
- Me.txtdateSK.Location = New System.Drawing.Point(336, 24)
- Me.txtdateSK.Name = "txtdateSK"
- Me.txtdateSK.Size = New System.Drawing.Size(102, 21)
- Me.txtdateSK.TabIndex = 3
- Me.txtdateSK.Value = New Date(2006, 4, 15, 0, 0, 0, 0)
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(306, 32)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(42, 17)
- Me.Label2.TabIndex = 2
- Me.Label2.Text = "日期:"
- '
- 'txtBillnumber
- '
- Me.txtBillnumber.Location = New System.Drawing.Point(486, 24)
- Me.txtBillnumber.Name = "txtBillnumber"
- Me.txtBillnumber.ReadOnly = True
- Me.txtBillnumber.Size = New System.Drawing.Size(126, 21)
- Me.txtBillnumber.TabIndex = 1
- Me.txtBillnumber.Text = ""
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(456, 32)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(42, 17)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "票号:"
- '
- 'ToolBar1
- '
- Me.ToolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat
- Me.ToolBar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.btnAdd, Me.btnsave, Me.btnprint, Me.btnexit})
- Me.ToolBar1.DropDownArrows = True
- Me.ToolBar1.ImageList = Me.ImageList2
- Me.ToolBar1.Location = New System.Drawing.Point(0, 0)
- Me.ToolBar1.Name = "ToolBar1"
- Me.ToolBar1.ShowToolTips = True
- Me.ToolBar1.Size = New System.Drawing.Size(658, 41)
- Me.ToolBar1.TabIndex = 3
- '
- 'btnAdd
- '
- Me.btnAdd.ImageIndex = 7
- Me.btnAdd.Text = "添加"
- '
- 'btnsave
- '
- Me.btnsave.ImageIndex = 4
- Me.btnsave.Text = "保存"
- '
- 'btnprint
- '
- Me.btnprint.ImageIndex = 12
- Me.btnprint.Text = "打印"
- '
- 'btnexit
- '
- Me.btnexit.ImageIndex = 11
- Me.btnexit.Text = "退出"
- '
- 'ImageList2
- '
- Me.ImageList2.ImageSize = New System.Drawing.Size(16, 16)
- Me.ImageList2.ImageStream = CType(resources.GetObject("ImageList2.ImageStream"), System.Windows.Forms.ImageListStreamer)
- Me.ImageList2.TransparentColor = System.Drawing.Color.Transparent
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.dgview)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel1.Location = New System.Drawing.Point(0, 221)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(658, 200)
- Me.Panel1.TabIndex = 5
- '
- 'dgview
- '
- Me.dgview.DataMember = ""
- Me.dgview.Dock = System.Windows.Forms.DockStyle.Fill
- Me.dgview.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgview.Location = New System.Drawing.Point(0, 0)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(658, 200)
- Me.dgview.TabIndex = 3
- '
- 'ErrorProvider1
- '
- Me.ErrorProvider1.ContainerControl = Me
- '
- 'frmPsSk
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(658, 421)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.ToolBar1)
- Me.Name = "frmPsSk"
- Me.Text = "frmPsSk"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public strquery As String
- Public lsweb As New jxcmanage
- Public dslocal As DataSet = lsweb.returndataset("select BhDate as 日期,BillNumber as 票号,PsMedName as 配送门店,PsCenter as 配送中心,Psy as 配送员,Shy as 审核员,money as 金额,ysmoney as 应收金额,yymoney as 已收金额,ymoney as 余额,zy as 摘要,BhNumber as 补货票号 from pspsdj", "pspsdj")
-
- Private Sub txtdate_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtdate.ValueChanged
- Dim dslocal As New DataSet
- dslocal = lsweb.runSql("select BillNumber as 票号 from pspsdj where BhDate='" & txtdate.Value & "'")
- lstview.DataSource = dslocal.Tables(0).DefaultView
- lstview.DisplayMember = "票号"
- lstview.ValueMember = "票号"
- End Sub
- Private Sub lstview_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstview.SelectedIndexChanged
- strquery = lstview.SelectedValue.ToString()
- Dim dv As New DataView
- Dim dtQuery As New DataTable
- dtQuery = lsweb.runSql("select BhDate as 日期,BillNumber as 票号,PsMedName as 配送门店,PsCenter as 配送中心,Psy as 配送员,Shy as 审核员,money as 金额,ysmoney as 应收金额,yymoney as 已收金额,ymoney as 余额,zy as 摘要,BhNumber as 补货票号 from pspsdj where BillNumber='" & strquery & "'").Tables(0)
- dv = dtQuery.DefaultView
- txtdateSK.Text = dv(0)("日期")
- txtBillnumber.Text = dv(0)("票号")
- txtpsmedname.Text = dv(0)("配送门店")
- txtpscenter.Text = dv(0)("配送中心")
- txtbhnumber.Text = dv(0)("补货票号")
- txtMoney.Text = dv(0)("金额")
- txtYmoney.Text = dv(0)("应收金额")
- txtyfmoney.Text = dv(0)("已收金额")
- txtyemoney.Text = dv(0)("余额")
- txtczy.Text = dv(0)("配送员")
- txtshy.Text = dv(0)("审核员")
- 'txtzy.Text = dv(0)("摘要")
- dtQuery = lsweb.runSql("select BhDate as 日期,BillNumber as 票号,PsMedName as 配送门店,PsCenter as 配送中心,Psy as 配送员,Shy as 审核员,money as 金额,ysmoney as 应收金额,yymoney as 已收金额,ymoney as 余额,zy as 摘要,BhNumber as 补货票号 from pspsdj where BillNumber='" & strquery & "'").Tables(0)
- dgview.DataSource = dtQuery.DefaultView
- End Sub
- Private Sub save()
- lsweb.runSql("update pspsdj set yymoney=" & CDec(txtYmoney.Text) & ",psy='" & txtczy.Text & "',shy='" & txtshy.Text & "',zy='" & txtzy.Text & "' from pspsdj where billnumber='" & strquery & "'")
- MessageBox.Show("信息成功保存!", "提示", MessageBoxButtons.OK)
- End Sub
- Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
- Select Case e.Button.Text
- Case "添加"
- txtMoney.Focus()
- btnAdd.Enabled = False
- btnsave.Enabled = True
- Case "保存"
- If txtMoney.Text = "" Then
- MessageBox.Show("信息不完整,保存失败!", "提示", MessageBoxButtons.OK)
- Else
- save()
- btnAdd.Enabled = True
- btnsave.Enabled = False
- End If
- Case "退出"
- Me.Close()
- End Select
- End Sub
-
- Private Sub txtMoney_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMoney.KeyUp
- txtYmoney.Text = txtMoney.Text
- End Sub
- Private Sub frmPsSk_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- txtdateSK.Value = Today.ToString
- txtdate.Value = Today.ToString
- Dim hwdr As System.Data.SqlClient.SqlDataReader
- hwdr = lsweb.returnDataReader("select 操作员 from wz_mm")
- Do While hwdr.Read()
- txtczy.Items.Add(hwdr("操作员"))
- txtshy.Items.Add(hwdr("操作员"))
- Loop
- btnsave.Enabled = False
- End Sub
-
- Private Sub txtMoney_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtMoney.Validating
- If Not IsNumeric(txtMoney.Text) Or txtMoney.Text = String.Empty Then
- ErrorProvider1.SetError(txtMoney, "不是数值类型且不能为空。")
- txtMoney.Focus()
- Else
- ErrorProvider1.SetError(txtMoney, "")
- End If
- End Sub
- Private Sub txtMoney_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMoney.KeyDown
- If e.KeyCode = Keys.Enter Then
- Me.txtczy.Focus()
- End If
- End Sub
-
- Private Sub txtczy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtczy.KeyDown
- If e.KeyCode = Keys.Enter Then
- Me.txtshy.Focus()
- End If
- End Sub
-
- Private Sub txtshy_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtshy.KeyDown
- If e.KeyCode = Keys.Enter Then
- Me.txtzy.Focus()
- End If
- End Sub
- End Class