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

📄 frmgongyingshangedit.frm

📁 一个ERP系统可以用来学习之用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmgongyingshangEdit 
   BorderStyle     =   0  'None
   Caption         =   "供应商编辑"
   ClientHeight    =   4845
   ClientLeft      =   1950
   ClientTop       =   1575
   ClientWidth     =   8850
   LinkTopic       =   "Form1"
   ScaleHeight     =   4845
   ScaleWidth      =   8850
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton cmdExit 
      Caption         =   "退出"
      Height          =   375
      Left            =   4800
      TabIndex        =   11
      Top             =   4200
      Width           =   855
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   3360
      TabIndex        =   10
      Top             =   4200
      Width           =   975
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   375
      Left            =   1800
      TabIndex        =   9
      Top             =   4200
      Width           =   975
   End
   Begin VB.TextBox txtFox 
      Height          =   375
      Left            =   2280
      TabIndex        =   8
      Top             =   3480
      Width           =   1575
   End
   Begin VB.TextBox txtPhone 
      Height          =   375
      Left            =   2280
      TabIndex        =   7
      Top             =   3000
      Width           =   1575
   End
   Begin VB.TextBox txtEmail 
      Height          =   375
      Left            =   2280
      TabIndex        =   6
      Top             =   2520
      Width           =   4215
   End
   Begin VB.TextBox txtAddress 
      Height          =   375
      Left            =   4200
      TabIndex        =   5
      Top             =   2040
      Width           =   3735
   End
   Begin VB.TextBox txtlinkman 
      Height          =   375
      Left            =   2280
      TabIndex        =   4
      Top             =   2040
      Width           =   1215
   End
   Begin VB.TextBox txtname 
      Height          =   375
      Left            =   2280
      TabIndex        =   3
      Top             =   1560
      Width           =   4695
   End
   Begin VB.TextBox txtdaihao 
      Height          =   375
      Left            =   5160
      TabIndex        =   2
      Top             =   1080
      Width           =   1815
   End
   Begin VB.TextBox txtid 
      Enabled         =   0   'False
      Height          =   375
      Left            =   2280
      TabIndex        =   1
      Top             =   1080
      Width           =   1575
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "地址"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3600
      TabIndex        =   19
      Top             =   2160
      Width           =   495
   End
   Begin VB.Label Label8 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "传真"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   18
      Top             =   3600
      Width           =   1215
   End
   Begin VB.Label Label7 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "电话"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1440
      TabIndex        =   17
      Top             =   3120
      Width           =   735
   End
   Begin VB.Label Label6 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "Email"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   16
      Top             =   2640
      Width           =   1215
   End
   Begin VB.Label Label5 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "联糸人姓名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   15
      Top             =   2160
      Width           =   1215
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "公司名称"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   14
      Top             =   1680
      Width           =   1215
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "公司代号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4080
      TabIndex        =   13
      Top             =   1200
      Width           =   975
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "供应商ID"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   12
      Top             =   1200
      Width           =   1215
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "进销存之供应商编辑"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1680
      TabIndex        =   0
      Top             =   240
      Width           =   5535
   End
End
Attribute VB_Name = "frmgongyingshangEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public modify As Boolean
Public oriname As String
Private Function check() As Boolean
   ' If Not IsNumeric(txtid) Then
       ' MsgBox "供应商ID必须为整形数字,请重新输入"
       ' txtid.SetFocus
       ' txtid.SelStart = 0
       ' txtid.SelLength = Len(txtid)
       ' check = False
       ' Exit Function
   ' End If
    
    
    'If Trim(txtid) = "" Then
       'MsgBox "请输入供应商ID"
       ' txtid.SetFocus
       ' txtid.SelStart = 0
       ' txtid.SelLength = Len(txtid)
       ' check = False
        'Exit Function
   ' End If

    If Trim(txtdaihao) = "" Then
        MsgBox "公司代号不能为空"
        txtdaihao.SetFocus
        check = False
        Exit Function
    End If
    
    If Trim(txtname) = "" Then
        MsgBox "公司名称不能为空"
        txtname.SetFocus
        check = False
        Exit Function
    End If
    
    If Trim(txtlinkman) = "" Then
        MsgBox "联糸人姓名"
        txtlinkman.SetFocus
        check = False
        Exit Function
    End If
    
    If Trim(txtAddress) = "" Then
        MsgBox "地址不能为空"
        txtAddress.SetFocus
        check = False
        Exit Function
    End If
    
    If Trim(txtEmail) = "" Then
        MsgBox "Email不能为空"
        txtEmail.SetFocus
        check = False
        Exit Function
    End If
    
    If Trim(txtphone) = "" Then
        MsgBox "请输入电话号码"
        txtphone.SetFocus
        check = False
        Exit Function
    End If
    
    If Trim(txtFox) = "" Then
        MsgBox "请输入传真号码"
        txtFox.SetFocus
        check = False
        Exit Function
    End If
    
    
        check = True
          
End Function

Private Sub cmdCancel_Click()
    txtdaihao.Text = ""
    txtname.Text = ""
    txtlinkman.Text = ""
    txtAddress.Text = ""
    txtEmail.Text = ""
    txtphone.Text = ""
    txtFox.Text = ""
    txtdaihao.SetFocus
    
End Sub

Private Sub cmdExit_Click()
    Unload Me
    frmGongyingshang.Show 1
End Sub

Private Sub cmdOK_Click()
   
    If check = False Then
       Exit Sub
    End If
    
    With mygyshang
            .GyId = txtId.Text
            .GyDaihao = txtdaihao.Text
            .GyName = txtname.Text
            .GyLinkman = txtlinkman.Text
            .GyAddress = txtAddress.Text
            .GyEmail = txtEmail.Text
            .GyPhone = txtphone.Text
            .GyFox = txtFox.Text
        If modify = False Then
            If .in_db(txtdaihao) = True Then
                MsgBox "客户代号已经使用,请重新输入"
                txtdaihao.SetFocus
                txtdaihao.SelStart = 0
                txtdaihao.SelLength = Len(txtdaihao)
                Exit Sub
            Else
                .insert
                MsgBox "添加成功"
            End If
        Else
            .update (oriname)
            MsgBox "修改成功"
        End If
    End With
       Unload Me
       frmGongyingshang.Show
End Sub

Private Sub Form_Load()
    frmgongyingshangEdit.BackColor = RGB(77, 116, 244)
    If txtdaihao.Text = "" Then
        cmdCancel.Enabled = False
    Else
        cmdCancel.Enabled = True
    End If
End Sub

Private Sub txtdaihao_Change()
    cmdCancel.Enabled = True
End Sub

⌨️ 快捷键说明

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