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

📄 fk_gongchengbiangeng_zongjingli.vb

📁 本软件设计为在"采购部""工程部""财务部""总经理"等部门之间的采购审核流转等事宜
💻 VB
字号:
Public Class Fk_gongchengbiangeng_zongjingli
    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 Button3 As System.Windows.Forms.Button
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents RadioButton1 As System.Windows.Forms.CheckBox
    Friend WithEvents Button6 As System.Windows.Forms.Button
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents ComboBox8 As System.Windows.Forms.ComboBox
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.Button3 = New System.Windows.Forms.Button
        Me.Label5 = New System.Windows.Forms.Label
        Me.TextBox3 = New System.Windows.Forms.TextBox
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.ComboBox2 = New System.Windows.Forms.ComboBox
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.RadioButton1 = New System.Windows.Forms.CheckBox
        Me.Button6 = New System.Windows.Forms.Button
        Me.Button1 = New System.Windows.Forms.Button
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.TextBox2 = New System.Windows.Forms.TextBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.ComboBox8 = New System.Windows.Forms.ComboBox
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.GroupBox2.SuspendLayout()
        Me.SuspendLayout()
        '
        'Button3
        '
        Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.Button3.Location = New System.Drawing.Point(240, 240)
        Me.Button3.Name = "Button3"
        Me.Button3.Size = New System.Drawing.Size(75, 24)
        Me.Button3.TabIndex = 147
        Me.Button3.Text = "提  交"
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(32, 112)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(64, 16)
        Me.Label5.TabIndex = 145
        Me.Label5.Text = "变更原因"
        '
        'TextBox3
        '
        Me.TextBox3.Location = New System.Drawing.Point(112, 96)
        Me.TextBox3.Multiline = True
        Me.TextBox3.Name = "TextBox3"
        Me.TextBox3.Size = New System.Drawing.Size(288, 56)
        Me.TextBox3.TabIndex = 144
        Me.TextBox3.Text = ""
        '
        'GroupBox3
        '
        Me.GroupBox3.Location = New System.Drawing.Point(16, 72)
        Me.GroupBox3.Name = "GroupBox3"
        Me.GroupBox3.Size = New System.Drawing.Size(400, 96)
        Me.GroupBox3.TabIndex = 146
        Me.GroupBox3.TabStop = False
        Me.GroupBox3.Text = "变更原因"
        '
        'ComboBox2
        '
        Me.ComboBox2.Location = New System.Drawing.Point(168, 32)
        Me.ComboBox2.Name = "ComboBox2"
        Me.ComboBox2.Size = New System.Drawing.Size(136, 20)
        Me.ComboBox2.TabIndex = 142
        Me.ComboBox2.Text = "变更付款单编号"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.RadioButton1)
        Me.GroupBox2.Controls.Add(Me.Button6)
        Me.GroupBox2.Controls.Add(Me.Button1)
        Me.GroupBox2.Location = New System.Drawing.Point(16, 8)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(400, 56)
        Me.GroupBox2.TabIndex = 143
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "已有变更"
        '
        'RadioButton1
        '
        Me.RadioButton1.Location = New System.Drawing.Point(16, 24)
        Me.RadioButton1.Name = "RadioButton1"
        Me.RadioButton1.Size = New System.Drawing.Size(136, 24)
        Me.RadioButton1.TabIndex = 12
        Me.RadioButton1.Text = "已有变更付款单编号"
        '
        'Button6
        '
        Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.Button6.Location = New System.Drawing.Point(304, 80)
        Me.Button6.Name = "Button6"
        Me.Button6.Size = New System.Drawing.Size(75, 24)
        Me.Button6.TabIndex = 11
        Me.Button6.Text = "查  询"
        '
        'Button1
        '
        Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.Button1.Location = New System.Drawing.Point(304, 24)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(75, 24)
        Me.Button1.TabIndex = 2
        Me.Button1.Text = "查  询"
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(88, 200)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.PasswordChar = Microsoft.VisualBasic.ChrW(42)
        Me.TextBox1.Size = New System.Drawing.Size(72, 21)
        Me.TextBox1.TabIndex = 137
        Me.TextBox1.Text = ""
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(24, 200)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(56, 16)
        Me.Label2.TabIndex = 136
        Me.Label2.Text = "密    码"
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(176, 200)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(56, 16)
        Me.Label4.TabIndex = 140
        Me.Label4.Text = "审批意见"
        '
        'TextBox2
        '
        Me.TextBox2.Location = New System.Drawing.Point(240, 200)
        Me.TextBox2.Name = "TextBox2"
        Me.TextBox2.Size = New System.Drawing.Size(152, 21)
        Me.TextBox2.TabIndex = 141
        Me.TextBox2.Text = ""
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(24, 240)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(56, 16)
        Me.Label3.TabIndex = 138
        Me.Label3.Text = "审批结果"
        '
        'ComboBox8
        '
        Me.ComboBox8.Items.AddRange(New Object() {"同意", "不同意"})
        Me.ComboBox8.Location = New System.Drawing.Point(88, 240)
        Me.ComboBox8.Name = "ComboBox8"
        Me.ComboBox8.Size = New System.Drawing.Size(72, 20)
        Me.ComboBox8.TabIndex = 139
        Me.ComboBox8.Text = "同意"
        '
        'GroupBox1
        '
        Me.GroupBox1.Location = New System.Drawing.Point(16, 176)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(400, 96)
        Me.GroupBox1.TabIndex = 148
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "操作区"
        '
        'Fk_gongchengbiangeng_zongjingli
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(432, 286)
        Me.Controls.Add(Me.Button3)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.TextBox3)
        Me.Controls.Add(Me.GroupBox3)
        Me.Controls.Add(Me.ComboBox2)
        Me.Controls.Add(Me.GroupBox2)
        Me.Controls.Add(Me.TextBox1)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.TextBox2)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.ComboBox8)
        Me.Controls.Add(Me.GroupBox1)
        Me.MaximizeBox = False
        Me.Name = "Fk_gongchengbiangeng_zongjingli"
        Me.Text = "下包付款变更--总经理审批"
        Me.GroupBox2.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    '改变“提交”按钮的text,为“退回”
    Private Sub ComboBox8_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox8.SelectedIndexChanged
        If ComboBox8.Text = "不同意" Then
            Button3.Text = "退  回"
        Else
            Button3.Text = "提  交"
        End If
    End Sub

    '得到已经有的变更申请号
    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        If RadioButton1.Checked = True Then

            Dim str As String
            Dim mydataset As New DataSet
            str = "select 付款申请单号 from bg_gongchengfukuan where 流程 = " + Chr(39) + "4" + Chr(39)
            Dim i, y As Integer
            mydataset = GetDataFromDB(str)
            y = mydataset.Tables(0).Rows.Count
            If y = 0 Then
                Exit Sub
            End If
            Dim sstr As String
            For i = 0 To y - 1
                sstr = mydataset.Tables(0).Rows(i)("付款申请单号")
                ComboBox2.Items.Add(sstr)
            Next
        Else
            ComboBox2.Items.Clear()
            ComboBox2.Text = "变更付款单编号"
        End If
    End Sub


    '得到变更单信息
    Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
        Dim str As String
        Dim mydataset As New DataSet
        str = "select * from bg_gongchengfukuan where 付款申请单号 = " + Chr(39) + ComboBox2.Text.Trim + Chr(39)

        mydataset = GetDataFromDB(str)

        TextBox3.Text = mydataset.Tables(0).Rows(0)("变更原因")
        mydataset.Dispose()
    End Sub

    '提交
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If RadioButton1.Checked = False Then
            MsgBox("请选择要提交的项的编号!", MsgBoxStyle.Information, "提示")
            RadioButton1.Checked = True
            Exit Sub
        End If

        '判断用户提交的合法性
        Dim mystr As String = TextBox1.Text.Trim
        Dim str As String = "select user_pwd from UserInfo where user_id =" + Chr(39) + user_id_yj.Trim + Chr(39) + " and user_pwd =" + Chr(39) + mystr + Chr(39)

        If GetDataFromDB(str).Tables(0).Rows.Count = 0 Then
            MsgBox("您的密码错误,请重新输入!", MsgBoxStyle.Information, "提示")
            TextBox1.Text = ""
            TextBox1.Focus()
            Exit Sub
        End If

        Dim sqlstr As String
        sqlstr = "UPDATE bg_gongchengfukuan SET  总经理审批时间=" + Chr(39) + Now.Date.ToString + Chr(39) + " , 总经理 =" + Chr(39) + UserName + Chr(39) + ",总经理审批意见=" + Chr(39) + TextBox2.Text.Trim + Chr(39) + ",总经理审批结果=" + Chr(39) + ComboBox8.Text.Trim + Chr(39) + ",流程=" + Chr(39) + "5" + Chr(39) + ",是否为退回=" + Chr(39) + "0" + Chr(39) + "where 付款申请单号=" + Chr(39) + ComboBox2.Text.Trim + Chr(39)

        If UpdateData(sqlstr) = True Then
            MsgBox("已经成功提交该信息", MsgBoxStyle.OKOnly + _
            MsgBoxStyle.Exclamation, "提交")
            RadioButton1.Checked = False

        Else
            MsgBox("没有成功提交该信息,请与管理员联系!", MsgBoxStyle.OKOnly + _
                        MsgBoxStyle.Exclamation, "提交")
            Exit Sub
        End If
    End Sub
End Class

⌨️ 快捷键说明

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