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

📄 frmlinliaobumenedit.frm

📁 一个ERP系统可以用来学习之用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmlinliaobumenedit 
   Caption         =   "领料部门编辑"
   ClientHeight    =   3720
   ClientLeft      =   3120
   ClientTop       =   2700
   ClientWidth     =   5055
   LinkTopic       =   "Form1"
   ScaleHeight     =   3720
   ScaleWidth      =   5055
   Begin VB.TextBox txtquyu 
      Height          =   375
      Left            =   2400
      TabIndex        =   6
      Top             =   2040
      Width           =   1455
   End
   Begin VB.TextBox txtname 
      Height          =   375
      Left            =   2400
      TabIndex        =   5
      Top             =   1440
      Width           =   1455
   End
   Begin VB.TextBox txtId 
      Enabled         =   0   'False
      Height          =   375
      Left            =   2400
      TabIndex        =   4
      Top             =   840
      Width           =   1455
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   3120
      Picture         =   "frmlinliaobumenedit.frx":0000
      Top             =   2880
      Width           =   480
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "退出"
      Height          =   180
      Left            =   3240
      TabIndex        =   8
      Top             =   3360
      Width           =   360
   End
   Begin VB.Label lblok 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "确定"
      Height          =   180
      Left            =   1560
      TabIndex        =   7
      Top             =   3360
      Width           =   360
   End
   Begin VB.Image imgOk 
      Height          =   480
      Left            =   1560
      Picture         =   "frmlinliaobumenedit.frx":0442
      Top             =   2760
      Width           =   480
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "所属区域"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   960
      TabIndex        =   3
      Top             =   2040
      Width           =   1335
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "部门名称"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   960
      TabIndex        =   2
      Top             =   1440
      Width           =   1335
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "部门ID"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1080
      TabIndex        =   1
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "领料部门编辑"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1200
      TabIndex        =   0
      Top             =   120
      Width           =   2655
   End
End
Attribute VB_Name = "frmlinliaobumenedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public oriname As String
Public modify As Boolean

Private Sub Form_Load()
    frmlinliaobumenedit.BackColor = RGB(39, 160, 237)
End Sub

Private Sub Image1_Click()
    Unload Me
    frmlinliaobumen.Show
End Sub

Private Sub imgOk_Click()
    If check = False Then
        Exit Sub
    End If
    
    With Mylinliaobumen
        .bumenid = txtId.Text
        .bumenname = txtname.Text
        .quyu = txtquyu.Text
        
        If modify = False Then
            If .in_db(txtname.Text) = True Then
                MsgBox "部门名称已存在,请重新输入"
                txtname.SetFocus
                Exit Sub
            Else
                .insert
                MsgBox "添加成功"
            End If
        Else
            .update (oriname)
            MsgBox "修改成功"
        End If
    End With
        Unload Me
        
        frmlinliaobumen.Show
        
End Sub

Private Sub Label6_Click()
    Unload Me
    frmlinliaobumen.Show
End Sub


Private Function check() As Boolean
    
    If Trim(txtname) = "" Then
        MsgBox "请输入领料部门"
        txtname.SetFocus
        check = False
        Exit Function
    End If
    
    If Trim(txtquyu) = "" Then
        MsgBox "请输入所属区域"
        txtname.SetFocus
        check = False
        Exit Function
    End If
    
    check = True
End Function

Private Sub lblok_Click()
     imgOk_Click
End Sub

⌨️ 快捷键说明

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