frmCkQuery.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:14k
- Public Class frmCkQuery
- Inherits System.Windows.Forms.Form
- Public lsweb As New jxcmanage
- Public dslocals As New DataSet
- #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 yy As System.Windows.Forms.GroupBox
- Friend WithEvents btnQueryProduct As System.Windows.Forms.Button
- Friend WithEvents txtProduct As System.Windows.Forms.TextBox
- Friend WithEvents dgCk As System.Windows.Forms.DataGrid
- Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
- Friend WithEvents btnExit As System.Windows.Forms.Button
- Friend WithEvents btnPrint As System.Windows.Forms.Button
- Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
- Friend WithEvents btnQueryCustom As System.Windows.Forms.Button
- Friend WithEvents txtCustom As System.Windows.Forms.TextBox
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents btnQueryPym As System.Windows.Forms.Button
- Friend WithEvents txtQueryPym As System.Windows.Forms.TextBox
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents btnQueryTime As System.Windows.Forms.Button
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents dtEnd As System.Windows.Forms.DateTimePicker
- Friend WithEvents dtStart As System.Windows.Forms.DateTimePicker
- Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.yy = New System.Windows.Forms.GroupBox
- Me.btnQueryProduct = New System.Windows.Forms.Button
- Me.txtProduct = New System.Windows.Forms.TextBox
- Me.dgCk = New System.Windows.Forms.DataGrid
- Me.GroupBox4 = New System.Windows.Forms.GroupBox
- Me.btnExit = New System.Windows.Forms.Button
- Me.btnPrint = New System.Windows.Forms.Button
- Me.GroupBox3 = New System.Windows.Forms.GroupBox
- Me.btnQueryCustom = New System.Windows.Forms.Button
- Me.txtCustom = New System.Windows.Forms.TextBox
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnQueryPym = New System.Windows.Forms.Button
- Me.txtQueryPym = New System.Windows.Forms.TextBox
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.btnQueryTime = New System.Windows.Forms.Button
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.dtEnd = New System.Windows.Forms.DateTimePicker
- Me.dtStart = New System.Windows.Forms.DateTimePicker
- Me.StatusBar1 = New System.Windows.Forms.StatusBar
- Me.yy.SuspendLayout()
- CType(Me.dgCk, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.GroupBox4.SuspendLayout()
- Me.GroupBox3.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'yy
- '
- Me.yy.Controls.Add(Me.btnQueryProduct)
- Me.yy.Controls.Add(Me.txtProduct)
- Me.yy.Location = New System.Drawing.Point(456, 8)
- Me.yy.Name = "yy"
- Me.yy.Size = New System.Drawing.Size(112, 128)
- Me.yy.TabIndex = 9
- Me.yy.TabStop = False
- Me.yy.Text = "按产地"
- '
- 'btnQueryProduct
- '
- Me.btnQueryProduct.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btnQueryProduct.Location = New System.Drawing.Point(16, 87)
- Me.btnQueryProduct.Name = "btnQueryProduct"
- Me.btnQueryProduct.Size = New System.Drawing.Size(80, 33)
- Me.btnQueryProduct.TabIndex = 8
- Me.btnQueryProduct.Text = "查询(&Q)"
- Me.btnQueryProduct.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'txtProduct
- '
- Me.txtProduct.Location = New System.Drawing.Point(16, 57)
- Me.txtProduct.Name = "txtProduct"
- Me.txtProduct.Size = New System.Drawing.Size(80, 25)
- Me.txtProduct.TabIndex = 7
- Me.txtProduct.Text = ""
- '
- 'dgCk
- '
- Me.dgCk.DataMember = ""
- Me.dgCk.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgCk.Location = New System.Drawing.Point(16, 152)
- Me.dgCk.Name = "dgCk"
- Me.dgCk.Size = New System.Drawing.Size(672, 272)
- Me.dgCk.TabIndex = 11
- '
- 'GroupBox4
- '
- Me.GroupBox4.Controls.Add(Me.btnExit)
- Me.GroupBox4.Controls.Add(Me.btnPrint)
- Me.GroupBox4.Location = New System.Drawing.Point(576, 8)
- Me.GroupBox4.Name = "GroupBox4"
- Me.GroupBox4.Size = New System.Drawing.Size(112, 128)
- Me.GroupBox4.TabIndex = 10
- Me.GroupBox4.TabStop = False
- Me.GroupBox4.Text = "命令"
- '
- 'btnExit
- '
- Me.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btnExit.Location = New System.Drawing.Point(16, 87)
- Me.btnExit.Name = "btnExit"
- Me.btnExit.Size = New System.Drawing.Size(80, 33)
- Me.btnExit.TabIndex = 10
- Me.btnExit.Text = "退出(&E)"
- Me.btnExit.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'btnPrint
- '
- Me.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btnPrint.Location = New System.Drawing.Point(16, 48)
- Me.btnPrint.Name = "btnPrint"
- Me.btnPrint.Size = New System.Drawing.Size(80, 32)
- Me.btnPrint.TabIndex = 9
- Me.btnPrint.Text = "打印(&P)"
- Me.btnPrint.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'GroupBox3
- '
- Me.GroupBox3.Controls.Add(Me.btnQueryCustom)
- Me.GroupBox3.Controls.Add(Me.txtCustom)
- Me.GroupBox3.Location = New System.Drawing.Point(336, 8)
- Me.GroupBox3.Name = "GroupBox3"
- Me.GroupBox3.Size = New System.Drawing.Size(112, 128)
- Me.GroupBox3.TabIndex = 8
- Me.GroupBox3.TabStop = False
- Me.GroupBox3.Text = "按客户编号"
- '
- 'btnQueryCustom
- '
- Me.btnQueryCustom.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btnQueryCustom.Location = New System.Drawing.Point(16, 87)
- Me.btnQueryCustom.Name = "btnQueryCustom"
- Me.btnQueryCustom.Size = New System.Drawing.Size(80, 33)
- Me.btnQueryCustom.TabIndex = 6
- Me.btnQueryCustom.Text = "查询(&Q)"
- Me.btnQueryCustom.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'txtCustom
- '
- Me.txtCustom.Location = New System.Drawing.Point(16, 57)
- Me.txtCustom.Name = "txtCustom"
- Me.txtCustom.Size = New System.Drawing.Size(80, 25)
- Me.txtCustom.TabIndex = 0
- Me.txtCustom.Text = ""
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnQueryPym)
- Me.GroupBox2.Controls.Add(Me.txtQueryPym)
- Me.GroupBox2.Location = New System.Drawing.Point(216, 8)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(112, 128)
- Me.GroupBox2.TabIndex = 7
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "按拼音码"
- '
- 'btnQueryPym
- '
- Me.btnQueryPym.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btnQueryPym.Location = New System.Drawing.Point(16, 87)
- Me.btnQueryPym.Name = "btnQueryPym"
- Me.btnQueryPym.Size = New System.Drawing.Size(80, 33)
- Me.btnQueryPym.TabIndex = 5
- Me.btnQueryPym.Text = "查询(&Q)"
- Me.btnQueryPym.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'txtQueryPym
- '
- Me.txtQueryPym.Location = New System.Drawing.Point(16, 57)
- Me.txtQueryPym.Name = "txtQueryPym"
- Me.txtQueryPym.Size = New System.Drawing.Size(80, 25)
- Me.txtQueryPym.TabIndex = 0
- Me.txtQueryPym.Text = ""
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.btnQueryTime)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Controls.Add(Me.dtEnd)
- Me.GroupBox1.Controls.Add(Me.dtStart)
- Me.GroupBox1.Location = New System.Drawing.Point(16, 8)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(192, 128)
- Me.GroupBox1.TabIndex = 6
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "按时间区段"
- '
- 'btnQueryTime
- '
- Me.btnQueryTime.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btnQueryTime.Location = New System.Drawing.Point(40, 87)
- Me.btnQueryTime.Name = "btnQueryTime"
- Me.btnQueryTime.Size = New System.Drawing.Size(136, 33)
- Me.btnQueryTime.TabIndex = 4
- Me.btnQueryTime.Text = "查询(&Q)"
- Me.btnQueryTime.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(16, 64)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(21, 21)
- Me.Label2.TabIndex = 3
- Me.Label2.Text = "到"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(16, 32)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(21, 21)
- Me.Label1.TabIndex = 2
- Me.Label1.Text = "从"
- '
- 'dtEnd
- '
- Me.dtEnd.Location = New System.Drawing.Point(40, 57)
- Me.dtEnd.Name = "dtEnd"
- Me.dtEnd.Size = New System.Drawing.Size(136, 25)
- Me.dtEnd.TabIndex = 1
- '
- 'dtStart
- '
- Me.dtStart.Location = New System.Drawing.Point(40, 24)
- Me.dtStart.Name = "dtStart"
- Me.dtStart.Size = New System.Drawing.Size(136, 25)
- Me.dtStart.TabIndex = 0
- '
- 'StatusBar1
- '
- Me.StatusBar1.Location = New System.Drawing.Point(0, 439)
- Me.StatusBar1.Name = "StatusBar1"
- Me.StatusBar1.Size = New System.Drawing.Size(701, 22)
- Me.StatusBar1.TabIndex = 12
- '
- 'frmCkQuery
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(701, 461)
- Me.ControlBox = False
- Me.Controls.Add(Me.StatusBar1)
- Me.Controls.Add(Me.yy)
- Me.Controls.Add(Me.dgCk)
- Me.Controls.Add(Me.GroupBox4)
- Me.Controls.Add(Me.GroupBox3)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
- Me.Name = "frmCkQuery"
- Me.Text = "销售查询"
- Me.yy.ResumeLayout(False)
- CType(Me.dgCk, System.ComponentModel.ISupportInitialize).EndInit()
- Me.GroupBox4.ResumeLayout(False)
- Me.GroupBox3.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox1.ResumeLayout(False)
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Private Sub btnQueryTime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQueryTime.Click
-
- dslocals = lsweb.returndataset("select * from wz_ck where 日期 BETWEEN '" & dtStart.Text & "' and '" & dtEnd.Text & "'", "wz_ck")
- dgCk.DataSource = dslocals.Tables("wz_ck").DefaultView
- End Sub
- Private Sub btnQueryPym_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQueryPym.Click
- If txtQueryPym.Text = "" Then
- dslocals = lsweb.returndataset("select * from wz_ck", "wz_ck")
- dgCk.DataSource = dslocals.Tables("wz_ck").DefaultView
- Else
- dslocals = lsweb.returndataset("select * from wz_ck where 药品编号='" & txtQueryPym.Text.Trim & "'", "wz_ck")
- dgCk.DataSource = dslocals.Tables("wz_ck").DefaultView
- End If
- End Sub
- Private Sub btnQueryCustom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQueryCustom.Click
- If txtCustom.Text = "" Then
- dslocals = lsweb.returndataset("select * from wz_ck", "wz_ck")
- dgCk.DataSource = dslocals.Tables("wz_ck").DefaultView
- Else
- dslocals = lsweb.returndataset("select * from wz_ck where 客户编号='" & txtCustom.Text.Trim & "'", "wz_ck")
- dgCk.DataSource = dslocals.Tables("wz_ck").DefaultView
- End If
- End Sub
- Private Sub btnQueryProduct_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQueryProduct.Click
- If txtProduct.Text = "" Then
- dslocals = lsweb.returndataset("select * from wz_ck", "wz_ck")
- dgCk.DataSource = dslocals.Tables("wz_ck").DefaultView
- Else
- dslocals = lsweb.returndataset("select * from wz_ck where 产地 like '%" & txtProduct.Text.Trim & "%'", "wz_ck")
- dgCk.DataSource = dslocals.Tables("wz_ck").DefaultView
- End If
- End Sub
-
- Private Sub frmCkQuery_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- End Sub
- Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
- End Sub
-
- Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
- Me.Close()
- End Sub
- End Class