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

📄 form_setcompany.frm

📁 仓库扫描管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form form_setCompany 
   BackColor       =   &H00C0FFFF&
   Caption         =   "设置公司名称"
   ClientHeight    =   3450
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4590
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   3450
   ScaleWidth      =   4590
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtName 
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   960
      Width           =   3375
   End
   Begin VB.CommandButton cmdClose 
      Caption         =   "&C关闭"
      Height          =   375
      Left            =   2760
      TabIndex        =   2
      Top             =   2280
      Width           =   1095
   End
   Begin VB.CommandButton cmdConfirm 
      Caption         =   "&O确定"
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   2280
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0FFFF&
      Caption         =   "请输入你公司的名称:"
      Height          =   255
      Left            =   360
      TabIndex        =   3
      Top             =   480
      Width           =   1935
   End
End
Attribute VB_Name = "form_setCompany"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdClose_Click()
    Unload Me
End Sub

Private Sub cmdConfirm_Click()
    If Me.txtName.Text = "" Then
        MsgBox "请输入你的公司名称!", vbCritical, "警告"
        Me.txtName.SetFocus
        Exit Sub
    End If
    Dim sql As String
'   先删除,再新增
    On Error GoTo errprompt
    wrks.BeginTrans
    sql = "delete from hp_sysParas where (((hp_sysParas.paraCode)='companyName')) "
    g_db.Execute (sql)
    sql = "  INSERT INTO hp_sysParas ( paraCode, paraValue, paraDesc ) values('companyName','" + Me.txtName.Text + "','公司名称')  "
    g_db.Execute (sql)
    wrks.CommitTrans
    g_companyName = Me.txtName.Text
    MsgBox "设置成功!", vbInformation, "提示"
    Exit Sub
errprompt:
    wrks.Rollback
    Me.MousePointer = 0
    MsgBox "操作失败!", vbCritical, "警告"
End Sub

Private Sub Form_Load()
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2
    Me.txtName.Text = g_companyName
End Sub

Private Sub Form_Unload(Cancel As Integer)
    frm_main.Enabled = True
End Sub

⌨️ 快捷键说明

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