FrmJxcTotal.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:7k
- Public Class FrmJxcTotal
- 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 GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents btnQuery As System.Windows.Forms.Button
- Friend WithEvents btnPrint As System.Windows.Forms.Button
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents txtBeginTime As System.Windows.Forms.DateTimePicker
- Friend WithEvents txtEndTime As System.Windows.Forms.DateTimePicker
- Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtEndTime = New System.Windows.Forms.DateTimePicker
- Me.txtBeginTime = New System.Windows.Forms.DateTimePicker
- Me.Label2 = New System.Windows.Forms.Label
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnPrint = New System.Windows.Forms.Button
- Me.btnQuery = New System.Windows.Forms.Button
- Me.GroupBox3 = New System.Windows.Forms.GroupBox
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox3.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtEndTime)
- Me.GroupBox1.Controls.Add(Me.txtBeginTime)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(788, 62)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- '
- 'txtEndTime
- '
- Me.txtEndTime.Location = New System.Drawing.Point(363, 21)
- Me.txtEndTime.Name = "txtEndTime"
- Me.txtEndTime.Size = New System.Drawing.Size(149, 25)
- Me.txtEndTime.TabIndex = 3
- Me.txtEndTime.Value = New Date(2006, 2, 21, 0, 0, 0, 0)
- '
- 'txtBeginTime
- '
- Me.txtBeginTime.Location = New System.Drawing.Point(107, 22)
- Me.txtBeginTime.Name = "txtBeginTime"
- Me.txtBeginTime.Size = New System.Drawing.Size(149, 25)
- Me.txtBeginTime.TabIndex = 2
- Me.txtBeginTime.Value = New Date(2006, 2, 21, 0, 0, 0, 0)
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(277, 31)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(83, 21)
- Me.Label2.TabIndex = 1
- Me.Label2.Text = "结束日期:"
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(21, 31)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(83, 21)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "开始日期:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnPrint)
- Me.GroupBox2.Controls.Add(Me.btnQuery)
- Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Right
- Me.GroupBox2.Location = New System.Drawing.Point(692, 62)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(96, 416)
- Me.GroupBox2.TabIndex = 1
- Me.GroupBox2.TabStop = False
- '
- 'btnPrint
- '
- Me.btnPrint.Dock = System.Windows.Forms.DockStyle.Top
- Me.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.btnPrint.Location = New System.Drawing.Point(3, 50)
- Me.btnPrint.Name = "btnPrint"
- Me.btnPrint.Size = New System.Drawing.Size(90, 30)
- Me.btnPrint.TabIndex = 1
- Me.btnPrint.Text = "打印"
- '
- 'btnQuery
- '
- Me.btnQuery.Dock = System.Windows.Forms.DockStyle.Top
- Me.btnQuery.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.btnQuery.Location = New System.Drawing.Point(3, 21)
- Me.btnQuery.Name = "btnQuery"
- Me.btnQuery.Size = New System.Drawing.Size(90, 29)
- Me.btnQuery.TabIndex = 0
- Me.btnQuery.Text = "统计"
- '
- 'GroupBox3
- '
- Me.GroupBox3.Controls.Add(Me.dgview)
- Me.GroupBox3.Dock = System.Windows.Forms.DockStyle.Fill
- Me.GroupBox3.Location = New System.Drawing.Point(0, 62)
- Me.GroupBox3.Name = "GroupBox3"
- Me.GroupBox3.Size = New System.Drawing.Size(692, 416)
- Me.GroupBox3.TabIndex = 2
- Me.GroupBox3.TabStop = False
- '
- '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(3, 21)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(686, 392)
- Me.dgview.TabIndex = 4
- '
- 'FrmJxcTotal
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(788, 478)
- Me.Controls.Add(Me.GroupBox3)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Name = "FrmJxcTotal"
- Me.Text = "进销存综合报表"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox3.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Private Sub FrmJxcTotal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- txtBeginTime.Value = Today.ToString
- txtEndTime.Value = Today.ToString
- End Sub
- Private Sub btnQuery_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuery.Click
- If txtBeginTime.Value > txtEndTime.Value Then
- MessageBox.Show("结束日期不能小于开始日期", "提示", MessageBoxButtons.OK)
- End If
- Dim dslocal As DataSet
- dslocal = lsweb.runSql("exec sp_JxcTotal '" & txtBeginTime.Value & "','" & txtEndTime.Value & "'")
- dgview.DataSource = dslocal.Tables(0).DefaultView
- End Sub
- End Class