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

📄 frmfordjtzb.frm

📁 网上教务管理系统 包括(教师
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   375
         Left            =   1230
         TabIndex        =   4
         Text            =   " "
         Top             =   1350
         Width           =   1335
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "学号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Left            =   150
         TabIndex        =   21
         Top             =   180
         Width           =   1095
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "姓名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Left            =   2670
         TabIndex        =   20
         Top             =   180
         Width           =   1095
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "院系"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Left            =   150
         TabIndex        =   19
         Top             =   795
         Width           =   1095
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "年级"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Left            =   2670
         TabIndex        =   18
         Top             =   795
         Width           =   1095
      End
      Begin VB.Label Label5 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "班级"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Left            =   150
         TabIndex        =   17
         Top             =   1410
         Width           =   1095
      End
   End
   Begin VB.TextBox txtCL 
      BackColor       =   &H00FFFFFF&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   1695
      Left            =   110
      MultiLine       =   -1  'True
      TabIndex        =   7
      Text            =   "frmForDJTZB.frx":18C0
      Top             =   2970
      Width           =   5415
   End
   Begin VB.Line Line2 
      BorderColor     =   &H00000000&
      X1              =   0
      X2              =   1170
      Y1              =   0
      Y2              =   0
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "入党递交书面材料管理:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   285
      Left            =   150
      TabIndex        =   15
      Top             =   2700
      Width           =   2415
   End
   Begin VB.Menu MNUFILE 
      Caption         =   "【文件&F】"
      Begin VB.Menu MNUEXIT 
         Caption         =   "退出[&X]"
      End
   End
   Begin VB.Menu MNULOC 
      Caption         =   "【记录定位&L】"
      Begin VB.Menu MNUXH 
         Caption         =   "学号定位[&L]"
      End
   End
   Begin VB.Menu MNUPRINT 
      Caption         =   "【记录打印&P】"
      Begin VB.Menu MNUVIEW 
         Caption         =   "打印预览[&V]"
      End
   End
   Begin VB.Menu MNUHELP 
      Caption         =   "【帮助&H】"
      Begin VB.Menu MNUNOTE 
         Caption         =   "使用说明[&N]"
      End
   End
End
Attribute VB_Name = "frmForDJTZB"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public recForDJTZ As Recordset '浏览,删除,修改时检索用数据表
Public BookMark As Integer      '数据表标志号
Public RecordCount As Integer   '数据表记录数
Public Modify As Boolean        '是否处于修改状态
Public AddNew As Boolean         '是否处于添加状态
Dim ex As Excel.Application
Dim exwbook As Excel.WorkBook
Dim exsheet As Excel.WorkSheet
Dim exchart As Excel.Chart
Dim I, J As Integer

Private Sub cboSB_KeyPress(KeyAscii As Integer)
On Error Resume Next
Dim sqlModify As String
Dim BookMarkSave As Integer
Dim I As Integer
If KeyAscii = 13 Then
    If Modify Then
        sqlModify = "update djtzb set sb='" + Trim(cboSB) + "' where id=" + Trim(recForDJTZ!ID) + ""
        Dbstudent.Execute sqlModify
       If MsgBox("保存对当条记录的修改?", vbInformation + vbYesNo) = vbNo Then
            Exit Sub
        End If
        cmdSave.Caption = "保存"
        cmdSave.Enabled = False
        BookMarkSave = BookMark
        UpdateRecord
        For I = 1 To BookMarkSave - 1
          recForDJTZ.MoveNext
          FillIn
        Next I
        BookMark = BookMarkSave
        Modify = False
        cmdModify.Enabled = True
        cmdNext.Enabled = True
        cmdPrevious.Enabled = True
    End If
End If
End Sub

Private Sub cmdDelete_Click()
On Error Resume Next
Dim sqlForDelete As String
If txtXH = " " Then
    MsgBox "无学号", vbInformation, "提示"
Else
    If XHInDJTZB(txtXH) Then
        If MsgBox("确信删除?", vbQuestion + vbOKCancel) = vbOK Then
            sqlForDelete = "delete * from djtzb where id=" + Trim(recForDJTZ!ID) + ""
            Dbstudent.Execute sqlForDelete
            InitItem
            UpdateRecord
            FillIn
        End If
    Else
        MsgBox "记录集中无此记录!", vbInformation, "错误提示"
    End If
End If
End Sub

Private Sub cmdExit_Click()
On Error Resume Next
Unload Me
End Sub

Private Sub cmdModify_Click()
On Error Resume Next
If txtXH = " " Then
    MsgBox "无可用信息", vbInformation, "错误提示"
    Exit Sub
Else
    If XHInDJTZB(txtXH) Then
        cmdSave.Enabled = True
        cmdSave.Caption = "存储"
         Modify = True
        cmdModify.Enabled = False
        cmdNext.Enabled = False
        cmdPrevious.Enabled = False
    Else
        MsgBox "基本库中无此条记录!", vbInformation, "提示"
        Exit Sub
    End If
End If
End Sub

Private Sub cmdNew_Click()
On Error Resume Next
InitItem
AddNew = True
txtXH.SetFocus
End Sub

Private Sub cmdNext_Click()
On Error Resume Next
If recForDJTZ.RecordCount = 0 Then
    MsgBox "表中无记录", vbInformation, "提示"
    Exit Sub
End If
If BookMark = recForDJTZ.RecordCount Then
    MsgBox "这是最后一条记录!", vbInformation, "提示"
    FillIn
Else
    BookMark = BookMark + 1
    recForDJTZ.MoveNext
    FillIn
End If
End Sub

Private Sub cmdPrevious_Click()
On Error Resume Next
If recForDJTZ.RecordCount = 0 Then
    MsgBox "表中无记录!", vbInformation, "提示"
    Exit Sub
End If

If BookMark = 1 Then
    MsgBox "这是首条记录!", vbInformation, "提示"
    FillIn
Else
    BookMark = BookMark - 1
    recForDJTZ.MovePrevious
    FillIn
End If
End Sub

Private Sub cmdSave_Click()
Dim sqlForInsert As String
On Error Resume Next
If cmdSave.Caption = "存储" Then
 

 cmdSave.Enabled = False
 cmdSave.Caption = "保存"
 UpdateRecord
 cmdModify.Enabled = True
 AddNew = False
 cmdNext.Enabled = True
 cmdPrevious.Enabled = True
Exit Sub
End If
If CheckItem = True Then
    sqlForInsert = "insert into djtzb(xh,xm,bj,yx,nj,sb,sxsj,cl) "
    sqlForInsert = sqlForInsert + "values('" + Trim(txtXH) + "','" + Trim(txtXM) + "',"
    sqlForInsert = sqlForInsert + "'" + Trim(txtBJ) + "','" + Trim(txtYX) + "',"
    sqlForInsert = sqlForInsert + "'" + Trim(txtNJ) + "','" + Trim(cboSB) + "',"
    sqlForInsert = sqlForInsert + "'" + Trim(CDate(mskSXSJ)) + "','" + Trim(txtCL) + "')"
    Dbstudent.Execute sqlForInsert
    If MsgBox("继续添加?", vbQuestion + vbYesNo) = vbYes Then
        InitItem
        txtXH.SetFocus
        Exit Sub
    End If
    
    cmdSave.Enabled = False
    UpdateRecord
    cmdModify.Enabled = True
    AddNew = False
    cmdNext.Enabled = True
    cmdPrevious.Enabled = True
    InitItem
    FillIn
    txtXH.SetFocus
Else
    MsgBox "时间输入有误!", vbCritical, "错误提示"
End If
End Sub

Private Sub Form_Load()
On Error Resume Next
UpdateRecord
Modify = False
cmdSave.Enabled = False
AddNew = False
With cboSB
  .AddItem "党员"
  .AddItem "入党积极分子"
End With
If RecordCount <> 0 Then
   FillIn
End If
Line2.X1 = 0
Line2.X2 = frmForDJTZB.Width
End Sub
'显示当前记录
Public Sub FillIn()
On Error Resume Next
Dim Year0 As String
Dim Month0 As String
Dim Day0 As String
If recForDJTZ.RecordCount = 0 Then
    MsgBox "无当前数据!", vbInformation, "提示"
    Exit Sub
End If
If Not IsNull(recForDJTZ!XH) Then txtXH = recForDJTZ!XH
If Not IsNull(recForDJTZ!XM) Then txtXM = recForDJTZ!XM

⌨️ 快捷键说明

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