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

📄 frmpaperedit.frm

📁 毕业前的一点小程序
💻 FRM
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmPaperEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "论文信息编辑"
   ClientHeight    =   4245
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10200
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4245
   ScaleWidth      =   10200
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   375
      Left            =   7680
      TabIndex        =   10
      Top             =   3480
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   5280
      TabIndex        =   9
      Top             =   3480
      Width           =   1695
   End
   Begin VB.Frame Frame1 
      Caption         =   "论文信息"
      Height          =   3015
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   9975
      Begin RichTextLib.RichTextBox rtMemo 
         Height          =   2055
         Left            =   6000
         TabIndex        =   8
         Top             =   480
         Width           =   3255
         _ExtentX        =   5741
         _ExtentY        =   3625
         _Version        =   393217
         Enabled         =   -1  'True
         TextRTF         =   $"frmPaperEdit.frx":0000
      End
      Begin VB.TextBox txtPaperTime 
         Height          =   390
         Left            =   1560
         TabIndex        =   6
         Top             =   2160
         Width           =   2895
      End
      Begin VB.TextBox txtPaperName 
         Height          =   390
         Left            =   1560
         TabIndex        =   4
         Top             =   1320
         Width           =   2895
      End
      Begin VB.TextBox txtIdendity 
         Height          =   390
         Left            =   1560
         TabIndex        =   2
         Top             =   480
         Width           =   2895
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "备注 "
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   4920
         TabIndex        =   7
         Top             =   600
         Width           =   570
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "教师工号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   360
         TabIndex        =   5
         Top             =   600
         Width           =   900
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "发表时间"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   360
         TabIndex        =   3
         Top             =   2280
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "文章名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   360
         TabIndex        =   1
         Top             =   1440
         Width           =   900
      End
   End
End
Attribute VB_Name = "frmPaperEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public modify As Boolean
Private Sub Command1_Click()
If Len(Trim(txtIdendity.Text)) = 0 Then
MsgBox "请输入教师身份证号!", vbExclamation
txtIdendity.SetFocus
Exit Sub
End If


If Len(Trim(txtPaperName.Text)) = 0 Then
MsgBox "请输入文章名称!", vbExclamation
txtPaperName.SetFocus
Exit Sub
End If

If IsDate(Trim(txtPaperTime.Text)) = False Then
MsgBox "请输入正确的时间格式!", vbExclamation
txtPaperTime.SetFocus
Exit Sub
End If

With MyTeacher
.Teacher_Idendity = MakeStr(txtIdendity.Text)
.PaperName = MakeStr(txtPaperName.Text)
.PaperTime = MakeStr(txtPaperTime.Text)
.PaperMemo = MakeStr(rtMemo.Text)
End With

'判断数据库中是否有该教师记录!!!
If MyTeacher.Teacher_In_DB(MakeStr(txtIdendity.Text)) = False Then
MsgBox "不存在该教师信息!", vbExclamation
txtIdendity.SetFocus
Exit Sub
End If

If modify = False Then
'判断是否已经存在该教师的论文信息
If MyTeacher.PaperExist = True Then
'添加
MyTeacher.InsertPaper
MsgBox "添加成功!", vbInformation
Else
MsgBox "纪录已经存在!", vbExclamation
Exit Sub
End If
Else
'更新
MyTeacher.UpdatePaper (CurTeacher.PaperId)
MsgBox "更新成功!"

End If

Call frmTeacherPaper.Refresh_Datagrid

Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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