⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmfndsup.vb

📁 超市进销存管理系统的源码。基于.NET平台
💻 VB
字号:
Imports SCMAPP.Print
Public Class frmFndSup
    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 btnPrt As System.Windows.Forms.Button
    Friend WithEvents btnExt As System.Windows.Forms.Button
    Friend WithEvents btnFnd As System.Windows.Forms.Button
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents txtVal2 As System.Windows.Forms.TextBox
    Friend WithEvents txtVal1 As System.Windows.Forms.TextBox
    Friend WithEvents cmbRel2 As System.Windows.Forms.ComboBox
    Friend WithEvents cmbField2 As System.Windows.Forms.ComboBox
    Friend WithEvents cmbRel3 As System.Windows.Forms.ComboBox
    Friend WithEvents cmbRel1 As System.Windows.Forms.ComboBox
    Friend WithEvents cmbField1 As System.Windows.Forms.ComboBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents dgdSup As System.Windows.Forms.DataGrid
    Friend WithEvents grbSup As System.Windows.Forms.GroupBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmFndSup))
        Me.btnPrt = New System.Windows.Forms.Button
        Me.btnExt = New System.Windows.Forms.Button
        Me.btnFnd = New System.Windows.Forms.Button
        Me.dgdSup = New System.Windows.Forms.DataGrid
        Me.grbSup = New System.Windows.Forms.GroupBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.txtVal2 = New System.Windows.Forms.TextBox
        Me.txtVal1 = New System.Windows.Forms.TextBox
        Me.cmbRel2 = New System.Windows.Forms.ComboBox
        Me.cmbField2 = New System.Windows.Forms.ComboBox
        Me.cmbRel3 = New System.Windows.Forms.ComboBox
        Me.cmbRel1 = New System.Windows.Forms.ComboBox
        Me.cmbField1 = New System.Windows.Forms.ComboBox
        Me.Label1 = New System.Windows.Forms.Label
        CType(Me.dgdSup, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.grbSup.SuspendLayout()
        Me.SuspendLayout()
        '
        'btnPrt
        '
        Me.btnPrt.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.btnPrt.ForeColor = System.Drawing.Color.Teal
        Me.btnPrt.Location = New System.Drawing.Point(320, 464)
        Me.btnPrt.Name = "btnPrt"
        Me.btnPrt.Size = New System.Drawing.Size(88, 40)
        Me.btnPrt.TabIndex = 33
        Me.btnPrt.Text = "打  印"
        '
        'btnExt
        '
        Me.btnExt.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.btnExt.ForeColor = System.Drawing.Color.Teal
        Me.btnExt.Location = New System.Drawing.Point(520, 464)
        Me.btnExt.Name = "btnExt"
        Me.btnExt.Size = New System.Drawing.Size(88, 40)
        Me.btnExt.TabIndex = 31
        Me.btnExt.Text = "退  出"
        '
        'btnFnd
        '
        Me.btnFnd.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.btnFnd.ForeColor = System.Drawing.Color.Teal
        Me.btnFnd.Location = New System.Drawing.Point(112, 464)
        Me.btnFnd.Name = "btnFnd"
        Me.btnFnd.Size = New System.Drawing.Size(88, 40)
        Me.btnFnd.TabIndex = 32
        Me.btnFnd.Text = "查  找"
        '
        'dgdSup
        '
        Me.dgdSup.AlternatingBackColor = System.Drawing.Color.GhostWhite
        Me.dgdSup.BackColor = System.Drawing.Color.GhostWhite
        Me.dgdSup.BackgroundColor = System.Drawing.Color.Lavender
        Me.dgdSup.BorderStyle = System.Windows.Forms.BorderStyle.None
        Me.dgdSup.CaptionBackColor = System.Drawing.Color.RoyalBlue
        Me.dgdSup.CaptionForeColor = System.Drawing.Color.White
        Me.dgdSup.CaptionVisible = False
        Me.dgdSup.DataMember = ""
        Me.dgdSup.FlatMode = True
        Me.dgdSup.Font = New System.Drawing.Font("Tahoma", 8.0!)
        Me.dgdSup.ForeColor = System.Drawing.Color.MidnightBlue
        Me.dgdSup.GridLineColor = System.Drawing.Color.RoyalBlue
        Me.dgdSup.HeaderBackColor = System.Drawing.Color.MidnightBlue
        Me.dgdSup.HeaderFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold)
        Me.dgdSup.HeaderForeColor = System.Drawing.Color.Lavender
        Me.dgdSup.LinkColor = System.Drawing.Color.Teal
        Me.dgdSup.Location = New System.Drawing.Point(40, 8)
        Me.dgdSup.Name = "dgdSup"
        Me.dgdSup.ParentRowsBackColor = System.Drawing.Color.Lavender
        Me.dgdSup.ParentRowsForeColor = System.Drawing.Color.MidnightBlue
        Me.dgdSup.ReadOnly = True
        Me.dgdSup.SelectionBackColor = System.Drawing.Color.Teal
        Me.dgdSup.SelectionForeColor = System.Drawing.Color.PaleGreen
        Me.dgdSup.Size = New System.Drawing.Size(605, 157)
        Me.dgdSup.TabIndex = 30
        '
        'grbSup
        '
        Me.grbSup.Controls.Add(Me.Label3)
        Me.grbSup.Controls.Add(Me.Label2)
        Me.grbSup.Controls.Add(Me.txtVal2)
        Me.grbSup.Controls.Add(Me.txtVal1)
        Me.grbSup.Controls.Add(Me.cmbRel2)
        Me.grbSup.Controls.Add(Me.cmbField2)
        Me.grbSup.Controls.Add(Me.cmbRel3)
        Me.grbSup.Controls.Add(Me.cmbRel1)
        Me.grbSup.Controls.Add(Me.cmbField1)
        Me.grbSup.Controls.Add(Me.Label1)
        Me.grbSup.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.grbSup.ForeColor = System.Drawing.Color.Blue
        Me.grbSup.Location = New System.Drawing.Point(16, 176)
        Me.grbSup.Name = "grbSup"
        Me.grbSup.Size = New System.Drawing.Size(745, 272)
        Me.grbSup.TabIndex = 29
        Me.grbSup.TabStop = False
        Me.grbSup.Text = "请选择查询条件:"
        '
        'Label3
        '
        Me.Label3.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.Label3.ForeColor = System.Drawing.Color.Blue
        Me.Label3.Location = New System.Drawing.Point(35, 80)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(57, 24)
        Me.Label3.TabIndex = 11
        Me.Label3.Text = "关系:"
        '
        'Label2
        '
        Me.Label2.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.Label2.ForeColor = System.Drawing.Color.Blue
        Me.Label2.Location = New System.Drawing.Point(15, 124)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(97, 24)
        Me.Label2.TabIndex = 10
        Me.Label2.Text = "查询条件2:"
        '
        'txtVal2
        '
        Me.txtVal2.Location = New System.Drawing.Point(398, 122)
        Me.txtVal2.Name = "txtVal2"
        Me.txtVal2.Size = New System.Drawing.Size(112, 26)
        Me.txtVal2.TabIndex = 9
        Me.txtVal2.Text = ""
        '
        'txtVal1
        '
        Me.txtVal1.Location = New System.Drawing.Point(398, 35)
        Me.txtVal1.Name = "txtVal1"
        Me.txtVal1.Size = New System.Drawing.Size(112, 26)
        Me.txtVal1.TabIndex = 8
        Me.txtVal1.Text = ""
        '
        'cmbRel2
        '
        Me.cmbRel2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbRel2.Items.AddRange(New Object() {">=", ">", "=", "<=", "<", "<>"})
        Me.cmbRel2.Location = New System.Drawing.Point(254, 124)
        Me.cmbRel2.Name = "cmbRel2"
        Me.cmbRel2.Size = New System.Drawing.Size(112, 24)
        Me.cmbRel2.TabIndex = 7
        '
        'cmbField2
        '
        Me.cmbField2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbField2.Location = New System.Drawing.Point(120, 124)
        Me.cmbField2.Name = "cmbField2"
        Me.cmbField2.Size = New System.Drawing.Size(112, 24)
        Me.cmbField2.TabIndex = 6
        '
        'cmbRel3
        '
        Me.cmbRel3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbRel3.Items.AddRange(New Object() {"And", "Or"})
        Me.cmbRel3.Location = New System.Drawing.Point(254, 78)
        Me.cmbRel3.Name = "cmbRel3"
        Me.cmbRel3.Size = New System.Drawing.Size(112, 24)
        Me.cmbRel3.TabIndex = 5
        '
        'cmbRel1
        '
        Me.cmbRel1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbRel1.Items.AddRange(New Object() {">=", ">", "=", "<=", "<", "<>"})
        Me.cmbRel1.Location = New System.Drawing.Point(254, 37)
        Me.cmbRel1.Name = "cmbRel1"
        Me.cmbRel1.Size = New System.Drawing.Size(112, 24)
        Me.cmbRel1.TabIndex = 4
        '
        'cmbField1
        '
        Me.cmbField1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbField1.Location = New System.Drawing.Point(120, 37)
        Me.cmbField1.Name = "cmbField1"
        Me.cmbField1.Size = New System.Drawing.Size(112, 24)
        Me.cmbField1.TabIndex = 3
        '
        'Label1
        '
        Me.Label1.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
        Me.Label1.ForeColor = System.Drawing.Color.Blue
        Me.Label1.Location = New System.Drawing.Point(15, 37)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(97, 24)
        Me.Label1.TabIndex = 2
        Me.Label1.Text = "查询条件1:"
        '
        'frmFndSup
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(794, 647)
        Me.Controls.Add(Me.btnPrt)
        Me.Controls.Add(Me.btnExt)
        Me.Controls.Add(Me.btnFnd)
        Me.Controls.Add(Me.dgdSup)
        Me.Controls.Add(Me.grbSup)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "frmFndSup"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "查询供应商信息"
        CType(Me.dgdSup, System.ComponentModel.ISupportInitialize).EndInit()
        Me.grbSup.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    'Dim dbObj As New SCMDB.SCMDB
    'Dim strCond As String
    'Dim strSer As String
    Dim fndsupObj As New SCMAPP.FndSup
    'Dim selectCmd As String = "Select supid as 供应商编号,supname as 供应商名称,supadr as 供应商地址,supfax as 供应商传真,suptel as 供应商电话 from supplierlist"


    '  Dim FindCmd As String 


    Private Sub frmFndPrd_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If Me.Width > 200 Then
            dgdSup.Left = 5
            dgdSup.Top = 0
            dgdSup.Width = Me.Width - 5
            dgdSup.Height = 3 * Me.Height / 4 - 90
            dgdSup.RowHeaderWidth = 5
            dgdSup.PreferredColumnWidth = (dgdSup.Width - 10) / 5

            grbSup.Left = 15
            grbSup.Top = dgdSup.Height + 15
            grbSup.Width = Me.Width - 30
            grbSup.Height = Me.Height / 4

            btnFnd.Top = dgdSup.Height + grbSup.Height + 25
            btnPrt.Top = dgdSup.Height + grbSup.Height + 25
            btnExt.Top = dgdSup.Height + grbSup.Height + 25


        End If


        dgdSup.DataSource = fndsupObj.Refresh
        cmbField1.Items.Add("供应商编号")
        cmbField1.Items.Add("供应商名称")
        cmbField1.Items.Add("供应商地址")
        cmbField1.Items.Add("供应商传真")
        cmbField1.Items.Add("供应商电话")
        cmbField2.Items.Add("供应商编号")
        cmbField2.Items.Add("供应商名称")
        cmbField2.Items.Add("供应商地址")
        cmbField2.Items.Add("供应商传真")
        cmbField2.Items.Add("供应商电话")
        cmbField1.Text = "供应商编号"
        cmbField2.Text = "供应商名称"

        cmbRel1.Text = ">="
        cmbRel2.Text = ">="
        cmbRel3.Text = "And"

    End Sub




    Private Sub btnExt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExt.Click
        Me.Close()
    End Sub

    Private Sub btnFnd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFnd.Click

        dgdSup.DataSource = fndsupObj.Fnd(cmbField1.Text, cmbRel1.Text, Trim(txtVal1.Text), cmbRel3.Text, cmbField2.Text, cmbRel2.Text, Trim(txtVal2.Text))


    End Sub

    Private Sub btnPrt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrt.Click
        fndsupObj.Print()
    End Sub
End Class


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -