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

📄 frmaddplat.frm

📁 包含了源代码,说明文档和可执行文件.为青岛公交查询系统.实现了模糊查询.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Caption         =   "使用线路9: "
         Height          =   375
         Left            =   480
         TabIndex        =   35
         Top             =   2880
         Width           =   975
      End
      Begin VB.Label Label13 
         Caption         =   "站点编号:"
         Height          =   375
         Left            =   480
         TabIndex        =   34
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label14 
         Caption         =   "使用线路11: "
         Height          =   255
         Left            =   480
         TabIndex        =   33
         Top             =   3360
         Width           =   1095
      End
      Begin VB.Label Label15 
         Caption         =   "使用线路12:"
         Height          =   255
         Left            =   4080
         TabIndex        =   32
         Top             =   3360
         Width           =   1095
      End
      Begin VB.Label Label16 
         Caption         =   "使用线路13: "
         Height          =   255
         Left            =   480
         TabIndex        =   31
         Top             =   3840
         Width           =   1095
      End
      Begin VB.Label Label17 
         Caption         =   "使用线路14: "
         Height          =   255
         Left            =   4080
         TabIndex        =   30
         Top             =   3840
         Width           =   1095
      End
      Begin VB.Label Label18 
         Caption         =   "使用线路15: "
         Height          =   255
         Left            =   480
         TabIndex        =   29
         Top             =   4320
         Width           =   1095
      End
      Begin VB.Label Label19 
         Caption         =   "使用线路16: "
         Height          =   255
         Left            =   4080
         TabIndex        =   28
         Top             =   4320
         Width           =   1095
      End
      Begin VB.Label Label20 
         Caption         =   "使用线路17: "
         Height          =   255
         Left            =   480
         TabIndex        =   27
         Top             =   4800
         Width           =   1095
      End
      Begin VB.Label Label21 
         Caption         =   "使用线路18: "
         Height          =   255
         Left            =   4080
         TabIndex        =   26
         Top             =   4800
         Width           =   1095
      End
      Begin VB.Label Label22 
         Caption         =   "使用线路19: "
         Height          =   375
         Left            =   480
         TabIndex        =   25
         Top             =   5280
         Width           =   1095
      End
      Begin VB.Label Label23 
         Caption         =   "使用线路20: "
         Height          =   255
         Left            =   4080
         TabIndex        =   24
         Top             =   5280
         Width           =   1095
      End
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   495
      Left            =   5280
      TabIndex        =   1
      Top             =   6120
      Width           =   1575
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "添加"
      Height          =   495
      Left            =   2040
      TabIndex        =   0
      Top             =   6120
      Width           =   1575
   End
End
Attribute VB_Name = "frmAddPlat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit







Private Sub cmdCancel_Click()
    Unload Me
    Exit Sub
End Sub



Private Sub cmdOK_Click()
    Dim sql As String
    Dim rs As ADODB.Recordset
    If Trim(textPlatNO.Text) = "" Then                              '判断站点编号是否为空
        MsgBox "请输入站点编号!", vbOKOnly + vbExclamation, "警告"
        Exit Sub
        textPlatNO.SetFocus
    Else
        sql = "select * from PlatInfo where PlatNO='" & textPlatNO & "'"
        Set rs = getRS(sql, "shujuku")
        If rs.EOF = False Then                                    '判断是否已经存在站点编号
            MsgBox "这个站点编号已经存在!请重新输入线路编号!", vbOKOnly + vbExclamation, "警告"
            textPlatNO.SetFocus
            textPlatNO.Text = ""
            textPlatName.Text = ""
            textUseLine01.Text = ""
            textUseLine02.Text = ""
            textUseLine03.Text = ""
            textUseLine04.Text = ""
            textUseLine05.Text = ""
            textUseLine06.Text = ""
            textUseLine07.Text = ""
            textUseLine08.Text = ""
            textUseLine09.Text = ""
            textUseLine11.Text = ""
            textUseLine12.Text = ""
            textUseLine13.Text = ""
            textUseLine14.Text = ""
            textUseLine15.Text = ""
            textUseLine16.Text = ""
            textUseLine17.Text = ""
            textUseLine18.Text = ""
            textUseLine19.Text = ""
            textUseLine20.Text = ""
            textUseLine21.Text = ""
           
            Exit Sub
        Else                                                                       '添加用户
                sql = "insert into PlatInfo (PlatNO,PlatName,UseLine01,UseLine02,UseLine03,UseLine04,UseLine05,UseLine06,UseLine07,UseLine08,UseLine09,UseLine11,UseLine12,UseLine13,UseLine14,UseLine15,UseLine16,UseLine17,UseLine18,UseLine19,UseLine20,UseLine21) values('" & textPlatNO
                sql = sql & "','" & textPlatName
                sql = sql & "','" & textUseLine01
                sql = sql & "','" & textUseLine02
                sql = sql & "','" & textUseLine03
                sql = sql & "','" & textUseLine04
                sql = sql & "','" & textUseLine05
                sql = sql & "','" & textUseLine06
                sql = sql & "','" & textUseLine07
                sql = sql & "','" & textUseLine08
                sql = sql & "','" & textUseLine09
                sql = sql & "','" & textUseLine11
                sql = sql & "','" & textUseLine12
                sql = sql & "','" & textUseLine13
                sql = sql & "','" & textUseLine14
                sql = sql & "','" & textUseLine15
                sql = sql & "','" & textUseLine16
                sql = sql & "','" & textUseLine17
                sql = sql & "','" & textUseLine18
                sql = sql & "','" & textUseLine19
                sql = sql & "','" & textUseLine20
                sql = sql & "','" & textUseLine21 & "')"
                
                Call TransactSQL(sql, "shujuku")
                MsgBox "添加成功!", vbOKOnly + vbExclamation, "添加结果"
                                                                                 '重新设置初始化为空
            textPlatNO.Text = ""
            textPlatName.Text = ""
            textUseLine01.Text = ""
            textUseLine02.Text = ""
            textUseLine03.Text = ""
            textUseLine04.Text = ""
            textUseLine05.Text = ""
            textUseLine06.Text = ""
            textUseLine07.Text = ""
            textUseLine08.Text = ""
            textUseLine09.Text = ""
            textUseLine11.Text = ""
            textUseLine12.Text = ""
            textUseLine13.Text = ""
            textUseLine14.Text = ""
            textUseLine15.Text = ""
            textUseLine16.Text = ""
            textUseLine17.Text = ""
            textUseLine18.Text = ""
            textUseLine19.Text = ""
            textUseLine20.Text = ""
            textUseLine21.Text = ""
                  textPlatNO.SetFocus
           frmmanagePlat.Show
           frmmanagePlat.ZOrder 0
           Unload Me
        End If
    End If
End Sub

Private Sub Form_Load()
            textPlatNO.Text = ""
            textPlatName.Text = ""
            textUseLine01.Text = ""
            textUseLine02.Text = ""
            textUseLine03.Text = ""
            textUseLine04.Text = ""
            textUseLine05.Text = ""
            textUseLine06.Text = ""
            textUseLine07.Text = ""
            textUseLine08.Text = ""
            textUseLine09.Text = ""
            textUseLine11.Text = ""
            textUseLine12.Text = ""
            textUseLine13.Text = ""
            textUseLine14.Text = ""
            textUseLine15.Text = ""
            textUseLine16.Text = ""
            textUseLine17.Text = ""
            textUseLine18.Text = ""
            textUseLine19.Text = ""
            textUseLine20.Text = ""
            textUseLine21.Text = ""

    End Sub






Private Sub textUseLine1_Change()

End Sub

⌨️ 快捷键说明

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