frmteacher.frm
资源名称:大学人事管理系统.zip [点击查看]
上传用户:plkplk66
上传日期:2007-06-06
资源大小:686k
文件大小:12k
源码类别:
其他行业
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form frmteacher
- Caption = "教师信息录入"
- ClientHeight = 7395
- ClientLeft = 5265
- ClientTop = 945
- ClientWidth = 6240
- LinkTopic = "Form1"
- ScaleHeight = 7395
- ScaleWidth = 6240
- StartUpPosition = 2 '屏幕中心
- Begin VB.Frame frteacher
- Caption = "教师信息"
- Height = 6435
- Left = 315
- TabIndex = 2
- Top = 210
- Width = 5640
- Begin VB.ComboBox cmbdate
- Appearance = 0 'Flat
- Height = 300
- Left = 2625
- TabIndex = 33
- Top = 1365
- Width = 645
- End
- Begin VB.ComboBox cmbmonth
- Appearance = 0 'Flat
- Height = 300
- Left = 1785
- TabIndex = 32
- Top = 1365
- Width = 645
- End
- Begin VB.ComboBox cmbyear
- Appearance = 0 'Flat
- Height = 300
- Left = 840
- TabIndex = 31
- Top = 1365
- Width = 645
- End
- Begin VB.ComboBox cmbsex
- Appearance = 0 'Flat
- Height = 300
- Left = 840
- TabIndex = 30
- Text = "男"
- Top = 945
- Width = 645
- End
- Begin VB.TextBox txtphone
- Appearance = 0 'Flat
- Height = 270
- Left = 1155
- TabIndex = 13
- Top = 1785
- Width = 960
- End
- Begin VB.TextBox txtaddress
- Appearance = 0 'Flat
- Height = 270
- Left = 1155
- TabIndex = 12
- Top = 2625
- Width = 4170
- End
- Begin VB.TextBox txtpostcode
- Appearance = 0 'Flat
- Height = 270
- Left = 1155
- TabIndex = 11
- Top = 2205
- Width = 960
- End
- Begin VB.TextBox txtID
- Appearance = 0 'Flat
- Height = 270
- Left = 735
- TabIndex = 10
- Top = 4095
- Width = 1275
- End
- Begin VB.TextBox txtworktime
- Appearance = 0 'Flat
- Height = 270
- Left = 2625
- TabIndex = 9
- Top = 4095
- Width = 330
- End
- Begin VB.TextBox txtpro
- Appearance = 0 'Flat
- Height = 270
- Left = 4095
- TabIndex = 8
- Top = 4095
- Width = 1275
- End
- Begin VB.ComboBox cmbmarriage
- Appearance = 0 'Flat
- Height = 300
- Left = 2310
- TabIndex = 7
- Text = "是"
- Top = 945
- Width = 615
- End
- Begin VB.Frame Frame1
- Caption = "备注"
- Height = 1695
- Left = 210
- TabIndex = 5
- Top = 4515
- Width = 5160
- Begin VB.TextBox Text5
- Appearance = 0 'Flat
- Height = 1380
- Left = 105
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 6
- Text = "frmteacher.frx":0000
- Top = 210
- Width = 4950
- End
- End
- Begin VB.TextBox txtname
- Appearance = 0 'Flat
- Height = 270
- Left = 840
- TabIndex = 4
- Top = 525
- Width = 960
- End
- Begin VB.TextBox txtemail
- Appearance = 0 'Flat
- Height = 270
- Left = 840
- TabIndex = 3
- Top = 3150
- Width = 4530
- End
- Begin VB.Label Label1
- Caption = "姓名:"
- Height = 210
- Index = 0
- Left = 210
- TabIndex = 29
- Top = 630
- Width = 615
- End
- Begin VB.Label Label2
- Caption = "性别:"
- Height = 255
- Left = 210
- TabIndex = 28
- Top = 1050
- Width = 615
- End
- Begin VB.Label Label3
- Caption = "生日:"
- Height = 255
- Left = 210
- TabIndex = 27
- Top = 1470
- Width = 615
- End
- Begin VB.Image Image1
- BorderStyle = 1 'Fixed Single
- Height = 1755
- Left = 3990
- Stretch = -1 'True
- Top = 525
- Width = 1320
- End
- Begin VB.Label Label4
- Caption = "联系电话:"
- Height = 255
- Left = 210
- TabIndex = 26
- Top = 1890
- Width = 975
- End
- Begin VB.Label Label5
- Caption = "家庭地址:"
- Height = 255
- Left = 210
- TabIndex = 25
- Top = 2730
- Width = 975
- End
- Begin VB.Label Label6
- Caption = "邮 编:"
- Height = 150
- Left = 210
- TabIndex = 24
- Top = 2310
- Width = 930
- End
- Begin VB.Line Line1
- BorderColor = &H80000010&
- BorderWidth = 2
- X1 = 210
- X2 = 5355
- Y1 = 3780
- Y2 = 3780
- End
- Begin VB.Label Label7
- Caption = "点击此处添加照片"
- Height = 540
- Left = 4305
- TabIndex = 23
- Top = 1155
- Width = 750
- End
- Begin VB.Label Label8
- Caption = "年"
- Height = 225
- Left = 1575
- TabIndex = 22
- Top = 1470
- Width = 225
- End
- Begin VB.Label Label9
- Caption = "月"
- Height = 225
- Left = 2415
- TabIndex = 21
- Top = 1470
- Width = 225
- End
- Begin VB.Label Label10
- Caption = "日"
- Height = 225
- Left = 3255
- TabIndex = 20
- Top = 1470
- Width = 225
- End
- Begin VB.Label Label11
- Caption = "工号:"
- Height = 225
- Left = 210
- TabIndex = 19
- Top = 4200
- Width = 540
- End
- Begin VB.Label Label12
- Caption = "工龄:"
- Height = 225
- Left = 2100
- TabIndex = 18
- Top = 4200
- Width = 540
- End
- Begin VB.Label Label13
- Caption = "年"
- Height = 225
- Left = 3045
- TabIndex = 17
- Top = 4200
- Width = 225
- End
- Begin VB.Label Label14
- Caption = "专业:"
- Height = 225
- Left = 3570
- TabIndex = 16
- Top = 4200
- Width = 540
- End
- Begin VB.Label Label15
- Caption = "婚否:"
- Height = 225
- Left = 1680
- TabIndex = 15
- Top = 1050
- Width = 540
- End
- Begin VB.Label Label16
- Caption = "email:"
- Height = 225
- Left = 210
- TabIndex = 14
- Top = 3255
- Width = 750
- End
- End
- Begin VB.CommandButton Command3
- Caption = "退出"
- Height = 330
- Left = 3585
- TabIndex = 1
- Top = 6825
- Width = 855
- End
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 330
- Left = 1800
- TabIndex = 0
- Top = 6825
- Width = 855
- End
- End
- Attribute VB_Name = "frmteacher"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Command1_Click()
- Set rs = db.OpenRecordset("SELECT * FROM reshi")
- If rs Is Nothing Or rs.Updatable = False Then
- MsgBox "不能打开或写入记录集!"
- Exit Sub
- End If
- rs.AddNew
- DataFile = 1
- If FNAME <> "" Then
- Open FNAME For Binary Access Read As DataFile
- Fl = LOF(DataFile)
- If Fl = 0 Then
- Close DataFile
- Exit Sub
- End If
- block = Fl blocksize
- Fragment = Fl Mod blocksize
- ReDim Chunk(Fragment)
- Get DataFile, , Chunk()
- rs.Fields("photo").AppendChunk Chunk()
- ReDim Chunk(blocksize)
- For I = 1 To block
- Get DataFile, , Chunk()
- rs.Fields("photo").AppendChunk Chunk()
- Next I
- Close DataFile
- End If
- rs.Fields("name") = txtname.Text
- rs.Fields("ID") = txtID.Text
- rs.Fields("zip") = txtpostcode.Text
- rs.Fields("phone") = txtphone.Text
- rs.Fields("sex") = cmbsex.Text
- rs.Fields("address") = txtaddress.Text
- rs.Fields("worktime") = Val(txtworktime.Text)
- rs.Fields("profession") = txtpro.Text
- rs.Fields("marriage") = cmbmarriage.Text
- rs.Fields("remark") = Text5.Text
- rs.Fields("email") = txtemail.Text
- rs.Fields("birth") = cmbyear.Text + "年" + cmbmonth + "月" + cmbdate + "日"
- rs.Fields("flag") = 0
- rs.Update
- rs.Close
- Set rs = Nothing
- MsgBox "信息已录入"
- End Sub
- Private Sub Command3_Click()
- frmmain.SetFocus
- Unload Me
- End Sub
- Private Sub Form_Load()
- cmbsex.AddItem "男"
- cmbsex.AddItem "女"
- cmbyear.AddItem "1981"
- cmbmonth.AddItem "1"
- cmbmonth.AddItem "2"
- cmbmonth.AddItem "3"
- cmbmonth.AddItem "4"
- cmbmonth.AddItem "5"
- cmbmonth.AddItem "6"
- cmbmonth.AddItem "7"
- cmbmonth.AddItem "8"
- cmbmonth.AddItem "9"
- cmbmonth.AddItem "10"
- cmbmonth.AddItem "11"
- cmbmonth.AddItem "12"
- cmbdate.AddItem "1"
- cmbdate.AddItem "2"
- cmbdate.AddItem "3"
- cmbdate.AddItem "4"
- cmbdate.AddItem "5"
- cmbdate.AddItem "6"
- cmbdate.AddItem "7"
- cmbdate.AddItem "8"
- cmbdate.AddItem "9"
- cmbdate.AddItem "10"
- cmbdate.AddItem "11"
- cmbdate.AddItem "12"
- cmbdate.AddItem "13"
- cmbdate.AddItem "14"
- cmbdate.AddItem "15"
- cmbdate.AddItem "16"
- cmbdate.AddItem "17"
- cmbdate.AddItem "18"
- cmbdate.AddItem "19"
- cmbdate.AddItem "20"
- cmbdate.AddItem "21"
- cmbdate.AddItem "22"
- cmbdate.AddItem "23"
- cmbdate.AddItem "24"
- cmbdate.AddItem "25"
- cmbdate.AddItem "26"
- cmbdate.AddItem "27"
- cmbdate.AddItem "28"
- cmbdate.AddItem "29"
- cmbdate.AddItem "30"
- cmbdate.AddItem "31"
- cmbmarriage.AddItem "是"
- cmbmarriage.AddItem "否"
- Set db = Workspaces(0).OpenDatabase(App.Path & "reshi.mdb")
- End Sub
- Private Sub Image1_Click()
- flag = 0
- frmloadpic.Visible = True
- frmloadpic.File1.Pattern = "*.bmp;*.jpg;*,ico;*.gif"
- Me.Enabled = False
- End Sub
- Private Sub Label7_Click()
- flag = 0
- frmloadpic.Visible = True
- frmloadpic.File1.Pattern = "*.bmp;*.jpg;*,ico;*.gif"
- Me.Enabled = False
- End Sub