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

📄 daxg.frm

📁 学生管理系统 很不错的一个课程设计 适合大学生毕业设计用
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Top             =   270
         Width           =   705
      End
      Begin VB.TextBox Text15 
         Height          =   315
         Left            =   3120
         TabIndex        =   3
         Text            =   "Text15"
         Top             =   300
         Width           =   1995
      End
      Begin VB.TextBox Text14 
         Height          =   315
         Left            =   690
         TabIndex        =   2
         Text            =   "Text14"
         Top             =   300
         Width           =   1605
      End
      Begin VB.Label Label4 
         Caption         =   "学号,姓名必输其一"
         Height          =   345
         Left            =   180
         TabIndex        =   8
         Top             =   690
         Width           =   3015
      End
      Begin VB.Label Label3 
         Caption         =   "姓名"
         Height          =   255
         Left            =   2640
         TabIndex        =   7
         Top             =   360
         Width           =   465
      End
      Begin VB.Label Label2 
         Caption         =   "学号"
         Height          =   255
         Left            =   180
         TabIndex        =   6
         Top             =   360
         Width           =   465
      End
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "档 案 修 改"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   60
      TabIndex        =   0
      Top             =   30
      Width           =   7935
   End
End
Attribute VB_Name = "档案修改"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim yxdm As String
Dim zydm As String
Dim bjdm As String
Dim i As Integer


Private Sub Command1_Click()
If Text14.Text = "" Then
MsgBox " 输入查找学号!", vbExclamation + vbOKOnly, "警告"
Text14.SetFocus
Exit Sub
End If
If Text15.Text = "" Then
MsgBox " 输入查找姓名!", vbExclamation + vbOKOnly, "警告"
Text15.SetFocus
Exit Sub
End If
txtsql = "select a.学号,a.姓名,a.性别,a.民族,a.血型,a.出生年月,b.院系名称,c.专业名称,d.班级名称,a.联系电话,a.邮编,a.籍贯,a.家庭住址,a.备注 from 学生基本信息 a,院系 b,专业 c,班级 d where a.院系代码=b.院系代码 and a.专业代码=c.专业代码 and a.班级代码=d.班级代码 and a.学号='" & Trim(Text14.Text) & "' and a.姓名='" & Trim(Text15.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If Not mrc.EOF Then
Text1.Text = mrc.Fields(0)
Text2.Text = mrc.Fields(1)
Text16.Text = mrc.Fields(2)
Text3.Text = mrc.Fields(3)
Text5.Text = mrc.Fields(4)
Text4.Text = mrc.Fields(5)
Text6.Text = mrc.Fields(6)
Text7.Text = mrc.Fields(7)
Text8.Text = mrc.Fields(8)
Text9.Text = mrc.Fields(9)
Text10.Text = mrc.Fields(10)
Text11.Text = mrc.Fields(11)
Text12.Text = mrc.Fields(12)
Text13.Text = mrc.Fields(13)
'Me.sz
Else
MsgBox " 不存在该档案!", vbExclamation + vbOKOnly, "警告"
Text14.SetFocus
Text14.Text = ""
Text15.Text = ""
Exit Sub
End If
Command2.Enabled = True
Command1.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text14.Enabled = False
Text15.Enabled = False
mrc.Close
End Sub
Public Sub sz()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
Text11.Enabled = False
Text12.Enabled = False
Text13.Enabled = False
Text16.Enabled = False
End Sub
Public Sub qk()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
End Sub

Private Sub Command2_Click()
'各文本框不能为空
i = 0
If Text3.Text = "" Then
i = i + 1
End If
If Text4.Text = "" Then
i = i + 1
End If
If Text5.Text = "" Then
i = i + 1
End If
If Text6.Text = "" Then
i = i + 1
End If
If Text7.Text = "" Then
i = i + 1
End If
If Text8.Text = "" Then
i = i + 1
End If
If Text9.Text = "" Then
i = i + 1
End If
If Text10.Text = "" Then
i = i + 1
End If
If Text11.Text = "" Then
i = i + 1
End If
If Text12.Text = "" Then
i = i + 1
End If
If Text13.Text = "" Then
i = i + 1
End If
If i <> 0 Then
MsgBox " 请把信息填充完整!", vbExclamation + vbOKOnly, "警告"
Exit Sub
End If
'mrc.Delete
'返回院系代码
txtsql = "select * from 院系 where 院系名称='" & Trim(Text6.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 不存在该院系!", vbExclamation + vbOKOnly, "警告"
Text6.SetFocus
mrc.Close
Exit Sub
Else
yxdm = mrc.Fields(0)
mrc.Close
End If
'返回专业代码
txtsql = "select * from 专业 where 专业名称='" & Trim(Text7.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 不存在该专业!", vbExclamation + vbOKOnly, "警告"
Text7.SetFocus
mrc.Close
Exit Sub
Else
zydm = mrc.Fields(0)
mrc.Close
End If
'返回班级代码
txtsql = "select * from 班级 where 班级名称='" & Trim(Text8.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 不存在该班级!", vbExclamation + vbOKOnly, "警告"
Text8.SetFocus
mrc.Close
Exit Sub
Else
bjdm = mrc.Fields(0)
mrc.Close
End If
'*************************************
'判断该班级是否属于该专业和该院系
'返回专业代码
txtsql = "select * from 班级 where 班级代码='" & Trim(bjdm) & "'and 院系代码='" & Trim(yxdm) & "' and 专业代码='" & Trim(zydm) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 院系,专业,班级不对口!", vbExclamation + vbOKOnly, "警告"
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
mrc.Close
Exit Sub
End If
mrc.Close
'*********************************************
txtsql = "select * from 学生基本信息 where 学号='" & Trim(Text14.Text) & "' and 姓名='" & Trim(Text15.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
 mrc.Fields(0) = Text14.Text
 mrc.Fields(1) = Text15.Text
 mrc.Fields(2) = Text16.Text
 mrc.Fields(3) = Text3.Text
 mrc.Fields(4) = Text5.Text
 mrc.Fields(5) = Text4.Text
 mrc.Fields(6) = Trim(yxdm)
 mrc.Fields(7) = Trim(zydm)
 mrc.Fields(8) = Trim(bjdm)
 mrc.Fields(9) = Text9.Text
 mrc.Fields(10) = Text10.Text
 mrc.Fields(11) = Text11.Text
 mrc.Fields(12) = Text12.Text
 mrc.Fields(13) = Text13.Text
 mrc.Update
 mrc.Close
 MsgBox " 该学生档案修改成功!", vbExclamation + vbOKOnly, "提示"
Me.qk
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = True

End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Load()
'Text1.Enabled = False
Me.qk
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = True

End Sub

⌨️ 快捷键说明

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