frmMedKcBatchTotal.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:9k
源码类别:
医药行业
开发平台:
Visual Basic
- Public Class frmMedKcBatchTotal
- 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 Label1 As System.Windows.Forms.Label
- Friend WithEvents txtBeginTime As System.Windows.Forms.DateTimePicker
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents txtendtime As System.Windows.Forms.DateTimePicker
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents txtMedName As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents txtBatch As System.Windows.Forms.TextBox
- Friend WithEvents txtQuery As System.Windows.Forms.Button
- Friend WithEvents txtPrint As System.Windows.Forms.Button
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtBatch = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.txtMedName = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.txtendtime = New System.Windows.Forms.DateTimePicker
- Me.Label2 = New System.Windows.Forms.Label
- Me.txtBeginTime = New System.Windows.Forms.DateTimePicker
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.txtPrint = New System.Windows.Forms.Button
- Me.txtQuery = New System.Windows.Forms.Button
- Me.Panel1 = New System.Windows.Forms.Panel
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.Panel1.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtBatch)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.txtMedName)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.txtendtime)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.txtBeginTime)
- 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(495, 80)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- '
- 'txtBatch
- '
- Me.txtBatch.Location = New System.Drawing.Point(256, 48)
- Me.txtBatch.Name = "txtBatch"
- Me.txtBatch.Size = New System.Drawing.Size(112, 21)
- Me.txtBatch.TabIndex = 7
- Me.txtBatch.Text = ""
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(224, 56)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(35, 17)
- Me.Label4.TabIndex = 6
- Me.Label4.Text = "批号:"
- '
- 'txtMedName
- '
- Me.txtMedName.Location = New System.Drawing.Point(64, 48)
- Me.txtMedName.Name = "txtMedName"
- Me.txtMedName.Size = New System.Drawing.Size(112, 21)
- Me.txtMedName.TabIndex = 5
- Me.txtMedName.Text = ""
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(8, 56)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(60, 17)
- Me.Label3.TabIndex = 4
- Me.Label3.Text = "药品名称:"
- '
- 'txtendtime
- '
- Me.txtendtime.Location = New System.Drawing.Point(256, 16)
- Me.txtendtime.Name = "txtendtime"
- Me.txtendtime.Size = New System.Drawing.Size(112, 21)
- Me.txtendtime.TabIndex = 3
- Me.txtendtime.Value = New Date(2006, 2, 22, 0, 0, 0, 0)
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(200, 24)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(60, 17)
- Me.Label2.TabIndex = 2
- Me.Label2.Text = "结束日期:"
- '
- 'txtBeginTime
- '
- Me.txtBeginTime.Location = New System.Drawing.Point(64, 16)
- Me.txtBeginTime.Name = "txtBeginTime"
- Me.txtBeginTime.Size = New System.Drawing.Size(112, 21)
- Me.txtBeginTime.TabIndex = 1
- Me.txtBeginTime.Value = New Date(2006, 2, 22, 0, 0, 0, 0)
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(8, 24)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(60, 17)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "开始日期:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.txtPrint)
- Me.GroupBox2.Controls.Add(Me.txtQuery)
- Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Right
- Me.GroupBox2.Location = New System.Drawing.Point(415, 80)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(80, 268)
- Me.GroupBox2.TabIndex = 1
- Me.GroupBox2.TabStop = False
- '
- 'txtPrint
- '
- Me.txtPrint.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.txtPrint.Location = New System.Drawing.Point(0, 32)
- Me.txtPrint.Name = "txtPrint"
- Me.txtPrint.TabIndex = 1
- Me.txtPrint.Text = "打印"
- '
- 'txtQuery
- '
- Me.txtQuery.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.txtQuery.Location = New System.Drawing.Point(0, 8)
- Me.txtQuery.Name = "txtQuery"
- Me.txtQuery.TabIndex = 0
- Me.txtQuery.Text = "统计"
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.dgview)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel1.Location = New System.Drawing.Point(0, 80)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(415, 268)
- 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(415, 268)
- Me.dgview.TabIndex = 3
- '
- 'frmMedKcBatchTotal
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
- Me.ClientSize = New System.Drawing.Size(495, 348)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Name = "frmMedKcBatchTotal"
- Me.Text = "药品批号进销存汇总"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Private Sub txtQuery_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtQuery.Click
- If txtBeginTime.Value > txtendtime.Value Or txtMedName.Text = String.Empty Or txtBatch.Text = String.Empty Then
- MessageBox.Show("开始时间不能大于结束时间,不能为空,请输入查询值!", "提示", MessageBoxButtons.OK)
- Else
- Dim dslocal As DataSet
- dslocal = lsweb.runSql("exec sp_JxcbatchTotal '" & txtBeginTime.Value & "','" & txtendtime.Value & "','" & txtMedName.Text & "','" & txtBatch.Text & "'")
- dgview.DataSource = dslocal.Tables(0).DefaultView
- End If
- End Sub
- Private Sub frmMedKcBatchTotal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- txtBeginTime.Value = Today.ToString
- txtendtime.Value = Today.ToString
- End Sub
- End Class