frmManageSk.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:26k
- Public Class frmManageSk
- 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 ToolBar1 As System.Windows.Forms.ToolBar
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents Label8 As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- Friend WithEvents Label10 As System.Windows.Forms.Label
- Friend WithEvents Label11 As System.Windows.Forms.Label
- Friend WithEvents Label12 As System.Windows.Forms.Label
- Friend WithEvents Label13 As System.Windows.Forms.Label
- Friend WithEvents Label14 As System.Windows.Forms.Label
- Friend WithEvents txtjs As System.Windows.Forms.TextBox
- Friend WithEvents txtdateSK As System.Windows.Forms.DateTimePicker
- Friend WithEvents txtBillnumber As System.Windows.Forms.TextBox
- Friend WithEvents txtCustName As System.Windows.Forms.TextBox
- Friend WithEvents txtCustNumber As System.Windows.Forms.TextBox
- Friend WithEvents txtMoney As System.Windows.Forms.TextBox
- Friend WithEvents txtYmoney As System.Windows.Forms.TextBox
- Friend WithEvents txtyfmoney As System.Windows.Forms.TextBox
- Friend WithEvents txtshy As System.Windows.Forms.ComboBox
- Friend WithEvents txtczy As System.Windows.Forms.ComboBox
- Friend WithEvents txtyemoney As System.Windows.Forms.TextBox
- Friend WithEvents txtdemo As System.Windows.Forms.TextBox
- Friend WithEvents txtfph As System.Windows.Forms.TextBox
- Friend WithEvents txtzy As System.Windows.Forms.TextBox
- 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 GroupBox4 As System.Windows.Forms.GroupBox
- Friend WithEvents txtdate As System.Windows.Forms.DateTimePicker
- Friend WithEvents lstview As System.Windows.Forms.ListBox
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
- 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(frmManageSk))
- 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.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtdate = New System.Windows.Forms.DateTimePicker
- Me.lstview = New System.Windows.Forms.ListBox
- Me.GroupBox4 = New System.Windows.Forms.GroupBox
- Me.txtjs = New System.Windows.Forms.TextBox
- Me.txtzy = New System.Windows.Forms.TextBox
- Me.Label14 = New System.Windows.Forms.Label
- Me.txtdemo = New System.Windows.Forms.TextBox
- Me.Label13 = 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.txtfph = New System.Windows.Forms.TextBox
- Me.Label6 = New System.Windows.Forms.Label
- Me.txtCustName = New System.Windows.Forms.TextBox
- Me.Label5 = New System.Windows.Forms.Label
- Me.txtCustNumber = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.Label3 = New System.Windows.Forms.Label
- 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.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()
- '
- '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(622, 41)
- Me.ToolBar1.TabIndex = 0
- '
- '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
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtdate)
- Me.GroupBox1.Controls.Add(Me.lstview)
- Me.GroupBox1.Controls.Add(Me.GroupBox4)
- Me.GroupBox1.Controls.Add(Me.txtjs)
- Me.GroupBox1.Controls.Add(Me.txtzy)
- Me.GroupBox1.Controls.Add(Me.Label14)
- Me.GroupBox1.Controls.Add(Me.txtdemo)
- Me.GroupBox1.Controls.Add(Me.Label13)
- 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.txtfph)
- Me.GroupBox1.Controls.Add(Me.Label6)
- Me.GroupBox1.Controls.Add(Me.txtCustName)
- Me.GroupBox1.Controls.Add(Me.Label5)
- Me.GroupBox1.Controls.Add(Me.txtCustNumber)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.GroupBox2)
- Me.GroupBox1.Controls.Add(Me.Label3)
- 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(622, 180)
- Me.GroupBox1.TabIndex = 1
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "收款信息:"
- '
- '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, 136)
- 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
- '
- 'txtjs
- '
- Me.txtjs.Location = New System.Drawing.Point(180, 24)
- Me.txtjs.Name = "txtjs"
- Me.txtjs.ReadOnly = True
- Me.txtjs.Size = New System.Drawing.Size(90, 21)
- Me.txtjs.TabIndex = 29
- Me.txtjs.Text = ""
- '
- 'txtzy
- '
- Me.txtzy.Location = New System.Drawing.Point(462, 152)
- 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, 160)
- Me.Label14.Name = "Label14"
- Me.Label14.Size = New System.Drawing.Size(42, 17)
- Me.Label14.TabIndex = 27
- Me.Label14.Text = "摘要:"
- '
- 'txtdemo
- '
- Me.txtdemo.Location = New System.Drawing.Point(462, 120)
- Me.txtdemo.Name = "txtdemo"
- Me.txtdemo.Size = New System.Drawing.Size(150, 21)
- Me.txtdemo.TabIndex = 26
- Me.txtdemo.Text = ""
- '
- 'Label13
- '
- Me.Label13.AutoSize = True
- Me.Label13.Location = New System.Drawing.Point(432, 128)
- Me.Label13.Name = "Label13"
- Me.Label13.Size = New System.Drawing.Size(42, 17)
- Me.Label13.TabIndex = 25
- Me.Label13.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(138, 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 = "金额:"
- '
- 'txtfph
- '
- Me.txtfph.Location = New System.Drawing.Point(180, 152)
- Me.txtfph.Name = "txtfph"
- Me.txtfph.Size = New System.Drawing.Size(216, 21)
- Me.txtfph.TabIndex = 12
- Me.txtfph.Text = ""
- '
- 'Label6
- '
- Me.Label6.AutoSize = True
- Me.Label6.Location = New System.Drawing.Point(138, 160)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(60, 17)
- Me.Label6.TabIndex = 11
- Me.Label6.Text = "发票号: "
- '
- 'txtCustName
- '
- Me.txtCustName.Location = New System.Drawing.Point(336, 56)
- Me.txtCustName.Name = "txtCustName"
- Me.txtCustName.ReadOnly = True
- Me.txtCustName.Size = New System.Drawing.Size(276, 21)
- Me.txtCustName.TabIndex = 10
- Me.txtCustName.Text = ""
- '
- 'Label5
- '
- Me.Label5.AutoSize = True
- Me.Label5.Location = New System.Drawing.Point(282, 62)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(66, 17)
- Me.Label5.TabIndex = 9
- Me.Label5.Text = "客户名称:"
- '
- 'txtCustNumber
- '
- Me.txtCustNumber.Location = New System.Drawing.Point(180, 56)
- Me.txtCustNumber.Name = "txtCustNumber"
- Me.txtCustNumber.ReadOnly = True
- Me.txtCustNumber.Size = New System.Drawing.Size(90, 21)
- Me.txtCustNumber.TabIndex = 8
- Me.txtCustNumber.Text = ""
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(128, 62)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(66, 17)
- Me.Label4.TabIndex = 7
- Me.Label4.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
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(128, 32)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(66, 17)
- Me.Label3.TabIndex = 4
- Me.Label3.Text = "结算方式:"
- '
- '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 = "票号:"
- '
- '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(622, 360)
- Me.Panel1.TabIndex = 2
- '
- '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(622, 360)
- Me.dgview.TabIndex = 0
- '
- 'ErrorProvider1
- '
- Me.ErrorProvider1.ContainerControl = Me
- '
- 'frmManageSk
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(622, 581)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.GroupBox1)
- Me.Controls.Add(Me.ToolBar1)
- Me.Name = "frmManageSk"
- Me.Text = "frmManageSk"
- 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 日期,票号,结算方式,客户编号,客户名称,操作员,审核员,金额,应收金额,已收金额,余额,发票号,摘要,备注 from wz_ck_sk", "wz_ck_sk")
-
- Private Sub save()
- lsweb.runSql("update wz_ck_sk set 已收金额=" & CDec(txtYmoney.Text) & ",操作员='" & txtczy.Text & "',审核员='" & txtshy.Text & "',发票号='" & txtfph.Text & "',摘要='" & txtzy.Text & "',备注='" & txtdemo.Text & "' from wz_ck_sk where 票号='" & 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 "保存"
- If txtMoney.Text = "" Then
- MessageBox.Show("信息不完整,保存失败!", "提示", MessageBoxButtons.OK)
- Else
- save()
- btnAdd.Enabled = True
- btnsave.Enabled = False
- End If
- Case "添加"
- add()
- btnAdd.Enabled = False
- btnsave.Enabled = True
- Case "退出"
- Me.Close()
- End Select
- 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.txtdemo.Focus()
- End If
- End Sub
- Private Sub txtdemo_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtdemo.KeyDown
- If e.KeyCode = Keys.Enter Then
- Me.txtFph.Focus()
- End If
- End Sub
- Private Sub txtFph_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtfph.KeyDown
- If e.KeyCode = Keys.Enter Then
- Me.txtzy.Focus()
- End If
- 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 txtczy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtczy.Validating
- If txtczy.Text = String.Empty Then
- ErrorProvider1.SetError(txtczy, "不能为空。")
- txtczy.Focus()
- Else
- ErrorProvider1.SetError(txtczy, "")
- End If
- End Sub
- Private Sub txtshy_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtshy.Validating
- If txtshy.Text = String.Empty Then
- ErrorProvider1.SetError(txtshy, "不能为空。")
- txtshy.Focus()
- Else
- ErrorProvider1.SetError(txtshy, "")
- End If
- End Sub
- Private Sub txtdate_ValueChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtdate.ValueChanged
- Dim dslocal As New DataSet
- dslocal = lsweb.runSql("select 票号 from wz_ck_sk where 日期='" & txtdate.Value & "'")
- lstview.DataSource = dslocal.Tables(0).DefaultView
- lstview.DisplayMember = "票号"
- lstview.ValueMember = "票号"
- End Sub
- Private Sub lstview_SelectedIndexChanged_1(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 日期,票号,结算方式,客户编号,客户名称,操作员,审核员,金额,应收金额,已收金额,余额,发票号,摘要,备注 from wz_ck_sk where 票号='" & strquery & "'").Tables(0)
- dv = dtQuery.DefaultView
- txtjs.Text = dv(0)("结算方式")
- txtdateSK.Text = dv(0)("日期")
- txtBillnumber.Text = dv(0)("票号")
- txtCustNumber.Text = dv(0)("客户编号")
- txtCustName.Text = dv(0)("客户名称")
- txtfph.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)("审核员")
- txtdemo.Text = dv(0)("备注")
- txtzy.Text = dv(0)("摘要")
- dtQuery = lsweb.runSql("select * from wz_ck where 票号='" & strquery & "'").Tables(0)
- dgview.DataSource = dtQuery.DefaultView
- End Sub
- Public Sub add()
- txtMoney.Text() = ""
- txtMoney.Focus()
-
- txtdemo.Text = ""
- txtfph.Text = ""
- txtzy.Text = ""
- End Sub
- Private Sub txtMoney_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMoney.TextChanged
- 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 frmManageSk_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
- End Class