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

📄 main_bmgl_add.frm

📁 1系统功能分析 系统开发的总体任务是实现学生信息关系的系统化
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_bmgl_add 
   BackColor       =   &H00D0E8EE&
   Caption         =   "添加部门"
   ClientHeight    =   3540
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6315
   LinkTopic       =   "Form1"
   ScaleHeight     =   3540
   ScaleWidth      =   6315
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      BackColor       =   &H00D0E8EE&
      Height          =   2250
      Left            =   90
      TabIndex        =   0
      Top             =   600
      Width           =   6165
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   -105
         Top             =   1755
         Visible         =   0   'False
         Width           =   2160
         _ExtentX        =   3810
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   1
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
         OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   "select * from 部门信息表"
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   2
         Left            =   960
         TabIndex        =   6
         Top             =   945
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   3
         Left            =   3945
         TabIndex        =   5
         Top             =   945
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   """¥""#,##0.00;(""¥""#,##0.00)"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   2
         EndProperty
         Height          =   285
         Index           =   4
         Left            =   960
         TabIndex        =   4
         Top             =   1350
         Width           =   5040
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   5
         Left            =   960
         TabIndex        =   3
         Top             =   1755
         Width           =   5040
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   1
         Left            =   960
         TabIndex        =   2
         Top             =   555
         Width           =   5040
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         Height          =   285
         Index           =   0
         Left            =   960
         Locked          =   -1  'True
         TabIndex        =   1
         Top             =   180
         Width           =   2055
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "备    注        "
         Height          =   240
         Left            =   120
         TabIndex        =   12
         Top             =   1830
         Width           =   765
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "部门电话                        基础工资         "
         Height          =   330
         Left            =   120
         TabIndex        =   11
         Top             =   1410
         Width           =   765
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "部门主管                      基础工资         "
         Height          =   225
         Left            =   3180
         TabIndex        =   10
         Top             =   1005
         Width           =   765
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "部门级别                      基础工资         "
         Height          =   330
         Left            =   120
         TabIndex        =   9
         Top             =   975
         Width           =   765
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "部门编号                                          "
         Height          =   330
         Left            =   120
         TabIndex        =   8
         Top             =   240
         Width           =   870
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "部门名称                      基础工资         "
         Height          =   330
         Left            =   120
         TabIndex        =   7
         Top             =   615
         Width           =   765
      End
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00D0E8EE&
      Height          =   735
      Left            =   90
      TabIndex        =   13
      Top             =   2790
      Width           =   6165
      Begin VB.CommandButton CmdCancel 
         BackColor       =   &H00FFC0C0&
         Caption         =   "取消"
         Height          =   375
         Left            =   4500
         Style           =   1  'Graphical
         TabIndex        =   15
         Top             =   225
         Width           =   1395
      End
      Begin VB.CommandButton CmdSave 
         BackColor       =   &H00FFC0C0&
         Caption         =   "保存"
         Height          =   375
         Left            =   3120
         Style           =   1  'Graphical
         TabIndex        =   14
         Top             =   225
         Width           =   1395
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "§吉林省明日科技有限责任公司§"
         ForeColor       =   &H00FF0000&
         Height          =   330
         Left            =   120
         TabIndex        =   16
         Top             =   360
         Width           =   2715
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "§吉林省明日科技有限责任公司§"
         ForeColor       =   &H0000FFFF&
         Height          =   330
         Left            =   105
         TabIndex        =   17
         Top             =   345
         Width           =   2715
      End
   End
   Begin VB.Label Label10 
      Appearance      =   0  'Flat
      AutoSize        =   -1  'True
      BackColor       =   &H00FFC0C0&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "     部门信息添加"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0080FF80&
      Height          =   330
      Left            =   1500
      TabIndex        =   18
      Top             =   135
      Width           =   3210
   End
End
Attribute VB_Name = "main_bmgl_add"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
  Text1(1).SetFocus
  Adodc1.RecordSource = "select * from 部门信息表 order by 部门编号"
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
     Adodc1.Recordset.MoveLast
     Text1(0).Text = Format(Adodc1.Recordset.Fields("部门编号") + 1, "00")
  Else
     Text1(0).Text = "01"
  End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
 main_bmgl.Enabled = True
End Sub
Private Sub Text1_GotFocus(Index As Integer)
  Text1(Index).BackColor = &HFFFF00
End Sub
Private Sub Text1_LostFocus(Index As Integer)
  Text1(Index).BackColor = &HFFFFFF
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
  If Index < 5 And KeyCode = vbKeyReturn Then Text1(Index + 1).SetFocus
  If Index = 5 And KeyCode = vbKeyReturn Then CmdSave.SetFocus
  If Index <> 0 And KeyCode = vbKeyUp Then Text1(Index - 1).SetFocus
End Sub
Private Sub CmdSave_Click()
  Dim rs1 As New ADODB.Recordset
  rs1.Open "select * from 部门信息表", Cnn, adOpenKeyset, adLockOptimistic
  rs1.AddNew
  For i = 0 To 5
      rs1.Fields(i) = Text1(i).Text
  Next i
  rs1.Update
  rs1.Close
  main_bmgl.Adodc1.Refresh
  main_bmgl.Enabled = True
  Unload Me
End Sub
Private Sub CmdCancel_Click()
  main_bmgl.Enabled = True
  Unload Me
End Sub

⌨️ 快捷键说明

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