📄 frmxzda.frm
字号:
Begin VB.Label Label1
Caption = "婚否"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 6
Left = 2520
TabIndex = 46
Top = 1035
Width = 375
End
Begin VB.Label Label1
Caption = "性别"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 5
Left = 480
TabIndex = 45
Top = 1035
Width = 495
End
Begin VB.Label Label1
Caption = "邮编"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 4
Left = 6240
TabIndex = 44
Top = 600
Width = 495
End
Begin VB.Label Label1
Caption = "住址"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 3
Left = 480
TabIndex = 43
Top = 600
Width = 375
End
Begin VB.Label Label1
Caption = "籍贯"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 2
Left = 6240
TabIndex = 42
Top = 195
Width = 495
End
Begin VB.Label Label1
Caption = "姓名"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 3360
TabIndex = 41
Top = 195
Width = 495
End
Begin VB.Label Label1
Caption = "编号"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 480
TabIndex = 40
Top = 195
Width = 375
End
End
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 8760
Top = -120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DialogTitle = "选择照片"
Filter = "图片文件(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF"
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 555
Left = 0
TabIndex = 0
Top = 0
Width = 11280
_ExtentX = 19897
_ExtentY = 979
ButtonWidth = 1455
ButtonHeight = 926
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 8
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "新增"
Key = "tolXZ"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "修改"
Key = "tolXG"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存"
Key = "tolBC"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除"
Key = "tolSC"
ImageIndex = 4
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "参数设置"
Key = "tolCSSZ"
ImageIndex = 5
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "tolTC"
ImageIndex = 6
EndProperty
EndProperty
BorderStyle = 1
End
End
Attribute VB_Name = "frmXZDA"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/12/17
'描 述:企事业单位人事管理系统 Ver 2007
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Dim phoPath As String '照片路径
Dim tFlag As Integer 'text1索引标记
Dim SQL As String
Dim addlvwJTCY As ListItem '家庭成员
Dim addlvwGRJL As ListItem '个人简历
Dim addlvwSHRY As ListItem '所荣荣誉
Dim sx As Boolean '判断是否刷新
Private Sub cmdADDPHO_Click() '选择照片过程
Dim yPath As String '文件源路径
Dim newPath As String '新文件路径
If Me.Text1(0).Text = "" Or Me.Text1(1).Text = "" Then
MsgBox "请先录入编号、姓名然后再选择照片!", 64, "提示"
Exit Sub
End If
On erron GoTo Errline
Me.CommonDialog1.ShowOpen
yPath = Me.CommonDialog1.FileName
If yPath <> "" Then
newPath = App.Path & "\photos\" & Me.Text1(0).Text & Me.Text1(1).Text & ".jpg"
FileCopy yPath, newPath
Me.Image1.Picture = LoadPicture(newPath)
phoPath = "\photos\" & Me.Text1(0).Text & Me.Text1(1).Text & ".jpg"
End If
Exit Sub
Errline:
MsgBox "操作失败!", 48, "错误"
End Sub
Private Sub cmdDELPHO_Click()
Me.Image1.Picture = LoadPicture(App.Path & "\bg\000.jpg")
phoPath = ""
End Sub
Private Sub Combo1_Click() 'text1赋值
Me.Text1(tFlag).Text = Me.Combo1.Text
Me.Combo1.Visible = False
Me.Text1(tFlag + 1).SetFocus
End Sub
Private Sub Form_Initialize()
Call InitCommonControls 'XP效果
End Sub
Private Sub Form_Load()
Me.Caption = gXtmc
Me.Icon = MDIfrm.Icon '图标
If newFlag <> 0 Then '如果为修改
Call OpenConn
SQL = "select * from 基础档案表 where zgid=" & gXhcd
rs.Open SQL, cn, 1, 1
For i = 0 To 31
Me.Text1(i).Text = rs.Fields(i + 1)
Next
Me.Text1(32).Text = rs!建档人
'像片路径---------------
If rs!像片 <> "" Then
If Dir(App.Path & rs!像片) <> "" Then '判断像片是否存在
Me.Image1.Picture = LoadPicture(App.Path & rs!像片)
phoPath = rs!像片
End If
Else
Me.Image1.Picture = LoadPicture(App.Path & "\bg\000.jpg")
phoPath = ""
End If
'------------------------
Call CloseConn
Me.Toolbar1.Buttons(1).Visible = False '新增按钮不可用
Me.Toolbar1.Buttons(3).Enabled = False
Me.Toolbar1.Buttons(4).Enabled = False
Else '如果为新增
Me.Text1(32).Text = gCzy
Me.Toolbar1.Buttons(2).Visible = False '新增按钮不可用
Me.Toolbar1.Buttons(3).Enabled = False
Me.Toolbar1.Buttons(4).Visible = False
End If
'初始化家庭成员列表--------------------------------------------
With Me.lvwJTCY
.ColumnHeaders.Add = "职工姓名"
.ColumnHeaders.Add = "成员姓名"
.ColumnHeaders.Add = "关系"
.ColumnHeaders.Add = "所在单位"
.ColumnHeaders(1).Width = 2000
.ColumnHeaders(2).Width = 2000
.ColumnHeaders(3).Width = 2000
.ColumnHeaders(4).Width = 4700
End With
SQL1 = "select * from 家庭成员表 where czgid=" & gXhcd
Call OpenConn
rs.Open SQL1, cn, 1, 1
Do While Not rs.EOF
Set addlvwJTCY = Me.lvwJTCY.ListItems.Add(, , rs!职工姓名, , 1)
addlvwJTCY.SubItems(1) = rs!成员姓名
addlvwJTCY.SubItems(2) = rs!关系
addlvwJTCY.SubItems(3) = rs!所在单位
rs.MoveNext
Loop
Call CloseConn
'END-----------------------------------------------------------
'初始化个人简历列表--------------------------------------------
With Me.lvwGRJL
.ColumnHeaders.Add = "职工姓名"
.ColumnHeaders.Add = "开始时间"
.ColumnHeaders.Add = "结束时间"
.ColumnHeaders.Add = "所在单位"
.ColumnHeaders.Add = "职务"
.ColumnHeaders.Add = "证明人"
.ColumnHeaders(1).Width = 1500
.ColumnHeaders(2).Width = 1500
.ColumnHeaders(3).Width = 1500
.ColumnHeaders(4).Width = 3200
.ColumnHeaders(5).Width = 1500
.ColumnHeaders(6).Width = 1500
End With
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -