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

📄 frmstuedit.frm

📁 学籍管理系统是一个非常通用的信息管理系统。很多中小学都需要自己的学籍管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Left            =   6120
         TabIndex        =   24
         Top             =   2088
         Width           =   360
      End
      Begin VB.Label Label34 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "民族"
         Height          =   180
         Left            =   6120
         TabIndex        =   23
         Top             =   360
         Width           =   360
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "入校日期"
         Height          =   180
         Left            =   3360
         TabIndex        =   22
         Top             =   2088
         Width           =   720
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "家庭电话"
         Height          =   180
         Left            =   6120
         TabIndex        =   21
         Top             =   1656
         Width           =   720
      End
      Begin VB.Label Label25 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "籍贯"
         Height          =   180
         Left            =   6120
         TabIndex        =   20
         Top             =   792
         Width           =   360
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "性别"
         Height          =   180
         Left            =   3360
         TabIndex        =   19
         Top             =   360
         Width           =   360
      End
      Begin VB.Label Label28 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "政治面貌"
         Height          =   180
         Left            =   3360
         TabIndex        =   18
         Top             =   792
         Width           =   720
      End
      Begin VB.Label Label21 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "学生证号"
         Height          =   180
         Left            =   6120
         TabIndex        =   17
         Top             =   1224
         Width           =   720
      End
   End
End
Attribute VB_Name = "StuEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean

Private Sub Cmd_Cancel_Click()
  StuMan.TmpOk = False
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  With MyStu
  .Student_Name = MakeStr(txtStu_Name)
  .Sex = ComboSex.Text
  .Nationality = MakeStr(txtNationality)
  If IsDate(ComboBirth.Text) = False Then
    MsgBox "请选择正确的出生日期"
    Exit Sub
  End If
  .Birth = ComboBirth.Text
  .Political_Party = MakeStr(txtPolitical_Party)
  .Family_Place = MakeStr(txtFamily_Place)
  .Id_Card = MakeStr(txtId_Card)
  .BadgeID = MakeStr(txtBadgeID)
  .Home_phone = MakeStr(txtHomePhone)
  .Residence = MakeStr(txtResidence)
  .Postcode = MakeStr(txtPostcode)
  If IsDate(ComboInDate.Text) = False Then
    MsgBox "请选择正确的入校日期"
    Exit Sub
  End If
  .InDate = ComboInDate.Text
  .Title = MakeStr(txtTitle)
  .Memo = MakeStr(txtMemo)
  dd = Date
  dd = Format(dd, "yyyy-mm-dd")
  t = Time
  tt = Trim(Str(Hour(t))) + ":" + Trim(Str(Minute(t))) + ":" + Trim(Str(Second(t)))
  .Fillin_Time = dd + "  " + tt
  .Class_Id = CurClass.Class_Id
  If Modify = False Then
    .Insert
  Else
    .Update (CurStu.Student_Id)
  End If
  End With
  StuMan.TmpOk = True
  Unload Me
End Sub

Private Sub ComboBirth_GotFocus()
  txtPolitical_Party.SetFocus
  If ComboBirth.Text <> "" Then
    DateSel.OriDate = ComboBirth.Text
  Else
    DateSel.OriDate = ""
  End If
  DateSel.Left = Me.Left + ComboBirth.Left + 350
  DateSel.Top = Me.Top + ComboBirth.Top + ComboBirth.Height + 450
  DateSel.Show 1
  ComboBirth.Text = DateSel.OriDate
End Sub

Private Sub ComboInDate_GotFocus()
  txtTitle.SetFocus
  
  If ComboInDate.Text <> "" Then
    DateSel.OriDate = ComboInDate.Text
  Else
    DateSel.OriDate = ""
  End If
  DateSel.Left = Me.Left + ComboInDate.Left
  DateSel.Top = Me.Top + ComboInDate.Top + ComboInDate.Height - DateSel.Height
  
  DateSel.Show 1
  
  ComboInDate.Text = DateSel.OriDate
End Sub

Private Sub Form_Load()
  If Modify = False Then
    txtStu_Name = ""
    ComboSex.ListIndex = 0
    txtNationality = ""
    ComboBirth.Text = ""
    txtPolitical_Party = ""
    txtFamily_Place = ""
    txtId_Card = ""
    txtBadgeID = ""
    txtHomePhone = ""
    txtResidence = ""
    txtPostcode = ""
    ComboInDate.Text = ""
    txtTitle = ""
    txtMemo = ""
  Else
    With CurStu
    txtStu_Name = .Student_Name
    If InCombo(.Sex, ComboSex) = True Then
      ComboSex.Text = .Sex
    End If
    txtNationality = .Nationality
    ComboBirth.Text = .Birth
    txtPolitical_Party = .Political_Party
    txtFamily_Place = .Family_Place
    txtId_Card = .Id_Card
    txtBadgeID = .BadgeID
    txtHomePhone = .Home_phone
    txtResidence = .Residence
    txtPostcode = .Postcode
    ComboInDate.Text = .InDate
    txtTitle = .Title
    txtMemo = .Memo
    End With
  End If
End Sub

Private Sub txtBadgeID_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtStu_Name_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtFamily_Place_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtHomePhone_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtId_Card_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtMemo_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtNationality_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtPolitical_Party_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtPostcode_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
  If In_Int(KeyAscii) = False Then
    KeyAscii = 0
  End If
End Sub

Private Sub txtResidence_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtTitle_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

⌨️ 快捷键说明

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