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

📄 client.vb

📁 本文件为进销存管理系统的代码 在VB的环境下运行 用比较简单的结构完成的
💻 VB
字号:
Imports System.Data.SqlClient
Public Class Client
    '显示供应商和购货商信息
    '根据存储过程,利用users.showInfo实现

    '添加供应商和购货商信息
    Public Shared Sub AddClients(ByVal a() As String)
        Try
            Dim con As New SqlConnection(ConString)
            Dim cmd As New SqlCommand(storename, con)
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Parameters.Add("@ClientName", a(0).Trim)
            cmd.Parameters.Add("@ClientAdress", a(1).Trim)
            cmd.Parameters.Add("@ClientCompany", a(2).Trim)
            cmd.Parameters.Add("@ClientEmail", a(3).Trim)
            cmd.Parameters.Add("@ClientTEL", a(4).Trim)
            cmd.Parameters.Add("@ClientRemark", a(5).Trim)
            con.Open()
            cmd.ExecuteNonQuery()
            con.Close()
        Catch ex As Exception
            MessageBox.Show(ex.Message, "错误")
        End Try
    End Sub

    '修改供应商和购货商信息
    Public Shared Sub ModClients(ByVal a() As String)
        Try
            Dim con As New SqlConnection(ConString)
            Dim cmd As New SqlCommand(storename, con)
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Parameters.Add("@ClientID", a(0).Trim)
            cmd.Parameters.Add("@ClientName", a(1).Trim)
            cmd.Parameters.Add("@ClientAdress", a(2).Trim)
            cmd.Parameters.Add("@ClientCompany", a(3).Trim)
            cmd.Parameters.Add("@ClientEmail", a(4).Trim)
            cmd.Parameters.Add("@ClientTEL", a(5).Trim)
            cmd.Parameters.Add("@ClientRemark", a(6).Trim)
            con.Open()
            cmd.ExecuteNonQuery()
            con.Close()
        Catch ex As Exception
            MessageBox.Show(ex.Message, "错误")
        End Try
    End Sub

    '删除供应商和购货商信息
    Public Shared Sub DelClient(ByVal ID As String)
        Try
            Dim con As New SqlConnection(ConString)
            Dim cmd As New SqlCommand(storename, con)
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Parameters.Add("@ClientID", ID)
            con.Open()
            cmd.ExecuteNonQuery()
            con.Close()
        Catch ex As Exception
            MessageBox.Show(ex.Message, "错误")
        End Try
    End Sub

End Class

⌨️ 快捷键说明

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