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

📄 frmaddsinfo.frm

📁 这是个学生信息管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmAddsinfo 
   Caption         =   "添加学籍信息"
   ClientHeight    =   5475
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   8475
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.5
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   5475
   ScaleWidth      =   8475
   Begin VB.TextBox txtClassno 
      Height          =   372
      Left            =   1560
      TabIndex        =   19
      Top             =   1440
      Width           =   1695
   End
   Begin VB.TextBox txtSID 
      Height          =   372
      Left            =   1560
      TabIndex        =   18
      Top             =   360
      Width           =   1695
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消添加"
      Height          =   372
      Left            =   4320
      TabIndex        =   17
      Top             =   4560
      Width           =   1092
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定添加"
      Height          =   372
      Left            =   2160
      TabIndex        =   16
      Top             =   4560
      Width           =   1092
   End
   Begin VB.TextBox txtComment 
      Height          =   1572
      Left            =   1560
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   15
      Top             =   2640
      Width           =   2532
   End
   Begin VB.TextBox txtAddress 
      Height          =   852
      Left            =   6000
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   14
      Top             =   2160
      Width           =   2172
   End
   Begin VB.TextBox txtRudate 
      Height          =   372
      Left            =   1560
      TabIndex        =   13
      Top             =   2040
      Width           =   1692
   End
   Begin VB.TextBox txtTel 
      Height          =   372
      Left            =   6000
      TabIndex        =   12
      Top             =   1560
      Width           =   1692
   End
   Begin VB.TextBox txtBorndate 
      Height          =   372
      Left            =   6000
      TabIndex        =   11
      Top             =   960
      Width           =   1692
   End
   Begin VB.TextBox txtName 
      Height          =   372
      Left            =   6000
      TabIndex        =   10
      Top             =   360
      Width           =   1692
   End
   Begin VB.ComboBox comboSex 
      Height          =   312
      ItemData        =   "frmAddsinfo.frx":0000
      Left            =   1560
      List            =   "frmAddsinfo.frx":0002
      TabIndex        =   9
      Top             =   960
      Width           =   612
   End
   Begin VB.Label Label9 
      Alignment       =   2  'Center
      Caption         =   "备注"
      Height          =   372
      Left            =   240
      TabIndex        =   8
      Top             =   2760
      Width           =   1092
   End
   Begin VB.Label Label8 
      Alignment       =   2  'Center
      Caption         =   "家庭住址"
      Height          =   252
      Left            =   4680
      TabIndex        =   7
      Top             =   2160
      Width           =   1092
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      Caption         =   "入校日期"
      Height          =   252
      Left            =   240
      TabIndex        =   6
      Top             =   2160
      Width           =   1092
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      Caption         =   "联系电话"
      Height          =   372
      Left            =   4680
      TabIndex        =   5
      Top             =   1560
      Width           =   1092
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Caption         =   "班号"
      Height          =   252
      Left            =   240
      TabIndex        =   4
      Top             =   1560
      Width           =   1092
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Caption         =   "出生日期"
      Height          =   252
      Left            =   4680
      TabIndex        =   3
      Top             =   1080
      Width           =   1092
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   "性别"
      Height          =   252
      Left            =   240
      TabIndex        =   2
      Top             =   960
      Width           =   1092
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "姓名"
      Height          =   252
      Left            =   4680
      TabIndex        =   1
      Top             =   480
      Width           =   1092
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "学号"
      Height          =   252
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   1092
   End
End
Attribute VB_Name = "frmAddsinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OK As Boolean


Private Sub Command1_Click()

   
    If Len(Trim(txtSID)) = 0 Then
    MsgBox "请输入学号"
    txtSID.SetFocus
    txtSID.SelStart = 0
    txtSID.SelLength = Len(txtSID)
    Exit Sub
  End If
  
     stuidkey = MakeStr(txtSID)
   If MyStu.In_DB(stuidkey) = True Then
   MsgBox "用户已经存在"
   txtSID.SetFocus
   Exit Sub
   End If
  
  
  If Len(Trim(comboSex)) = 0 Then
    MsgBox "请选择性别"
    comboSex.SetFocus
    comboSex.SelStart = 0
    comboSex.SelLength = Len(comboSex)
    Exit Sub
  End If
  
  
    
      If Len(Trim(txtName)) = 0 Then
    MsgBox "请输入姓名"
    txtName.SetFocus
    txtName.SelStart = 0
    txtName.SelLength = Len(txtName)
    Exit Sub
  End If
  
  
   If Len(Trim(txtClassno)) = 0 Then
    MsgBox "请输入班号"
    txtClassno.SetFocus
    txtClassno.SelStart = 0
    txtClassno.SelLength = Len(txtClassno)
    Exit Sub
  End If
    
    

        If Not IsDate(txtBorndate.text) Then
            MsgBox "出生时间应输入日期格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
            txtBorndate.SetFocus
       Else
            txtBorndate = Format(txtBorndate, "yyyy-mm-dd")
           If Not IsDate(txtRudate.text) Then
                MsgBox "入校时间应输入日期格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
                txtRudate.SetFocus
           Else
           
           
           With MyStu
           .student_ID = Trim(txtSID)
           .student_Name = Trim(txtName)
           .student_Sex = Trim(comboSex)
           .born_Date = Trim(txtBorndate)
           .class_No = Trim(txtClassno)
           .tele_Number = Trim(txtTel)
           .ru_Date = Trim(txtRudate)
           .address = Trim(txtAddress)
           .comment = Trim(txtComment)
  
      If Modify = False Then
       .Insert
      Else
       Call .Update(CurStu.student_ID)
      End If
  
           End With
                MsgBox "添加学籍信息成功!", vbOKOnly + vbExclamation, "警告"
               
                Me.Hide
          
  

            End If
            End If
            
      
     
    
    
    
    
    
End Sub

Private Sub Command2_Click()
    
    Unload Me
End Sub

Private Sub form_load()
    comboSex.AddItem "男"
    comboSex.AddItem "女"
    comboSex = "男"
    txtBorndate = "yyyy-mm-dd"
    txtRudate = "yyyy-mm-dd"
End Sub

Private Sub txtEmp_Name_Change()

End Sub

⌨️ 快捷键说明

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