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

📄 frmgps_new.frm

📁 用VB开发的巡检系统基于MAPINFo用VB开发的巡检系统基于MAPINFo很好的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmGPS_new 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "GPS终端—新增"
   ClientHeight    =   2190
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   3990
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2190
   ScaleWidth      =   3990
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "退出(&E)"
      Height          =   375
      Left            =   2003
      TabIndex        =   2
      Top             =   1680
      Width           =   1185
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保存(&S)"
      Height          =   375
      Left            =   803
      TabIndex        =   1
      Top             =   1680
      Width           =   1185
   End
   Begin VB.Frame Frame1 
      Height          =   1575
      Left            =   60
      TabIndex        =   0
      Top             =   -30
      Width           =   3885
      Begin VB.TextBox Text2 
         Height          =   345
         Left            =   1380
         MaxLength       =   30
         TabIndex        =   6
         Top             =   900
         Width           =   2385
      End
      Begin VB.TextBox Text1 
         Height          =   345
         Left            =   1380
         MaxLength       =   20
         TabIndex        =   5
         Top             =   390
         Width           =   2385
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "GPS终端名称:"
         Height          =   195
         Left            =   150
         TabIndex        =   4
         Top             =   990
         Width           =   1230
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "GPS终端号:"
         Height          =   195
         Left            =   330
         TabIndex        =   3
         Top             =   450
         Width           =   1050
      End
   End
End
Attribute VB_Name = "frmGPS_new"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rsSave As New ADODB.Recordset

'保存
Private Sub Command1_Click()
    Dim sGPSID As String, sGPSName As String ', sUserID As String
    Dim strSql As String
    Set rsSave = Nothing
    If Me.Text1.Text = "" Then
        MsgBox "请输入GPS终端号!", vbInformation, "提示"
        Exit Sub
    End If
    If Me.Text2.Text = "" Then
        MsgBox "请输入GPS终端名称!", vbInformation, "提示"
        Exit Sub
    End If
    sGPSID = Me.Text1.Text
    sGPSName = Me.Text2.Text
    strSql = "select * from tbl_GPS where GPSID='" & sGPSID & "'"
    rsSave.Open strSql, gblCn, adOpenKeyset, adLockOptimistic, adCmdText
    If rsSave.RecordCount > 0 Then
        MsgBox "已经存在当前的GPS终端号!", vbInformation + vbOKOnly, "提示"
    Else
        rsSave.AddNew
        rsSave("GpsID") = sGPSID
        rsSave("GpsName") = sGPSName
        rsSave.Update
        
        Me.Text1.Text = ""
        Me.Text2.Text = ""
    End If
    rsSave.Close
    frmGPS.LoadListViewData
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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