资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:12k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
- Begin VB.Form Ed_EmpArInfoSetFrm
- BorderStyle = 1 'Fixed Single
- Caption = "基本信息录入设置"
- ClientHeight = 4545
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 6480
- Icon = "辅助_基本信息录入设置.frx":0000
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4545
- ScaleWidth = 6480
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton Cmd_Exit2
- Caption = "退出(&X)"
- Height = 285
- Left = 2655
- TabIndex = 10
- Top = 4095
- Width = 1185
- End
- Begin VB.CommandButton Cmd_Exit1
- Caption = "退出(&X)"
- Default = -1 'True
- Height = 285
- Left = 1080
- TabIndex = 9
- Top = 4095
- Width = 1185
- End
- Begin VB.Frame Frame3
- Height = 3840
- Left = 3330
- TabIndex = 8
- Top = 135
- Width = 2940
- Begin VSFlex8Ctl.VSFlexGrid vsFlexGrid1
- Height = 3165
- Left = 135
- TabIndex = 11
- Top = 225
- Width = 2670
- _ExtentX = 4710
- _ExtentY = 5583
- Appearance = 1
- BorderStyle = 1
- Enabled = -1 'True
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MousePointer = 0
- BackColor = -2147483643
- ForeColor = -2147483640
- BackColorFixed = -2147483633
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = -2147483636
- BackColorAlternate= -2147483643
- GridColor = -2147483633
- GridColorFixed = -2147483632
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= -1 'True
- AllowUserResizing= 0
- SelectionMode = 0
- GridLines = 1
- GridLinesFixed = 2
- GridLineWidth = 1
- Rows = 50
- Cols = 3
- FixedRows = 1
- FixedCols = 0
- RowHeightMin = 0
- RowHeightMax = 0
- ColWidthMin = 0
- ColWidthMax = 0
- ExtendLastCol = 0 'False
- FormatString = "^项目名称 |^可见 "
- ScrollTrack = 0 'False
- ScrollBars = 3
- ScrollTips = 0 'False
- MergeCells = 0
- MergeCompare = 0
- AutoResize = -1 'True
- AutoSizeMode = 0
- AutoSearch = 0
- MultiTotals = -1 'True
- SubtotalPosition= 1
- OutlineBar = 0
- OutlineCol = 0
- Ellipsis = 0
- ExplorerBar = 0
- PicturesOver = 0 'False
- FillStyle = 0
- RightToLeft = 0 'False
- PictureType = 0
- TabBehavior = 0
- OwnerDraw = 0
- Editable = 0 'False
- ShowComboButton = -1 'True
- WordWrap = 0 'False
- TextStyle = 0
- TextStyleFixed = 0
- OleDragMode = 0
- OleDropMode = 0
- DataMode = 0
- VirtualData = -1 'True
- End
- Begin VB.CommandButton Cmd_Save
- Caption = "保存(&S)"
- Height = 285
- Left = 1080
- TabIndex = 4
- Top = 3465
- Width = 915
- End
- End
- Begin VB.Frame Frame1
- Height = 3840
- Left = 135
- TabIndex = 0
- Top = 135
- Width = 2940
- Begin VB.CheckBox Chk_ReserveOn
- Caption = "启动辅助保留"
- Height = 375
- Left = 270
- TabIndex = 1
- Top = 1170
- Width = 1680
- End
- Begin VB.CommandButton Cmd_VisibleItm
- Caption = "设置显示项目>>"
- Height = 320
- Left = 1080
- TabIndex = 3
- Top = 3285
- Width = 1550
- End
- Begin VB.CommandButton Cmd_Reserve
- Caption = "设置保留项目>>"
- Height = 320
- Left = 1035
- TabIndex = 2
- Top = 1620
- Width = 1550
- End
- Begin VB.Frame Frame2
- Height = 30
- Left = 225
- TabIndex = 5
- Top = 2070
- Width = 2490
- End
- Begin VB.Label Label2
- Caption = "说明:对于不需要录入的人事项目可以设置该项目不显示;自增加下一条记录起生效"
- Height = 735
- Left = 315
- TabIndex = 7
- Top = 2250
- Width = 2355
- End
- Begin VB.Label Label1
- Caption = "说明:对选中的项目,在新增人员基本信息的时候,相应的文本框内容将给予保留(下面的复选框选中该功能才启动)"
- Height = 825
- Left = 180
- TabIndex = 6
- Top = 315
- Width = 2535
- End
- End
- End
- Attribute VB_Name = "Ed_EmpArInfoSetFrm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '**************************************************************************************************
- '* 模 块 名 称 :基本信息录入设置
- '* 功 能 描 述 :基本信息录入设置
- '* 程序员姓名 :刘刚
- '* 最后修改人 :刘刚
- '* 最后修改时间:2001/12/04
- '* 备 注:
- '*
- '**************************************************************************************************
- Private Sub Cmd_Exit1_Click()
- If Chk_ReserveOn.Value = 1 Then
- Ed_EmpArInfoFrm.ReserveIsOn = True
- Else
- Ed_EmpArInfoFrm.ReserveIsOn = False
- End If
- Unload Me
- End Sub
- Private Sub Cmd_Exit2_Click()
- If Chk_ReserveOn.Value = 1 Then
- Ed_EmpArInfoFrm.ReserveIsOn = True
- Else
- Ed_EmpArInfoFrm.ReserveIsOn = False
- End If
- Unload Me
- End Sub
- Private Sub Cmd_Reserve_Click()
- If Cmd_Exit2.Visible Then Exit Sub
- FillGrid ("Reserve")
- Cmd_Exit1.Visible = False
- Cmd_Exit2.Visible = True
- Cmd_VisibleItm.Enabled = False
- Me.Move (Me.Left - Me.Width / 2)
- Me.Caption = "基本信息录入设置——保留项目"
- Me.Width = Me.Width * 2
- End Sub
- Private Sub Cmd_Save_Click()
- '根据Form.Caption判断目前的状态进行存盘
- On Error GoTo ErrDeal
- Dim sSqlV As String '关于设置显示项目的sql语句
- Dim SsqlR As String '关于设置保留项目的sql语句
- Dim i As Integer
- sSqlV = "": SsqlR = ""
- With vsFlexGrid1
- For i = 1 To .Rows - 1
- If .TextMatrix(i, 1) = "√" Then
- sSqlV = sSqlV + " UPDATE Rs_Items SET YNShow ='1' WHERE FieldName='" + Trim(vsFlexGrid1.TextMatrix(i, 2)) + "'"
- SsqlR = SsqlR & " UPDATE Rs_Items SET YnReserve = 1 WHERE FieldName ='" & Trim(vsFlexGrid1.TextMatrix(i, 2)) & "'"
- Else
- sSqlV = sSqlV + " UPDATE Rs_Items SET YNShow ='0' WHERE FieldName='" + Trim(vsFlexGrid1.TextMatrix(i, 2)) + "'"
- SsqlR = SsqlR & " UPDATE Rs_Items SET YnReserve = 0 WHERE FieldName ='" & Trim(vsFlexGrid1.TextMatrix(i, 2)) & "'"
- End If
- Next i
- End With
- If Me.Caption = "基本信息录入设置——显示项目" Then
- Cw_DataEnvi.DataConnect.Execute sSqlV
- Chk_ReserveOn.Enabled = True
- Else
- Cw_DataEnvi.DataConnect.Execute SsqlR
- End If
- Call Xtxxts("设置保存成功!", 0, 4)
- Cmd_Exit1.Visible = True
- Cmd_Exit2.Visible = False
- Cmd_VisibleItm.Enabled = True
- Cmd_Reserve.Enabled = True
- Me.Move (Me.Left + Me.Width / 4)
- Me.Caption = "基本信息录入设置"
- Me.Width = Me.Width / 2
- Exit Sub
- ErrDeal:
- Call Xtxxts("设置保存失败!", 0, 1)
- End Sub
- Private Sub Cmd_VisibleItm_Click()
- If Cmd_Exit2.Visible Then Exit Sub
- FillGrid ("Visible")
- Cmd_Exit1.Visible = False
- Cmd_Exit2.Visible = True
- Chk_ReserveOn.Enabled = False
- Cmd_Reserve.Enabled = False
- Me.Move (Me.Left - Me.Width / 2)
- Me.Caption = "基本信息录入设置——显示项目"
- Me.Width = Me.Width * 2
- End Sub
- Private Sub Form_Load()
- If Ed_EmpArInfoFrm.ReserveIsOn Then Chk_ReserveOn.Value = 1
- Cmd_Exit2.Visible = False
- Me.Width = Me.Width / 2
- End Sub
- Private Sub FillGrid(RecStr As String)
- Dim i As Integer
- Dim tYNShow As Integer
- Dim tmpRs As New ADODB.Recordset
- vsFlexGrid1.ColHidden(2) = True
- i = 1
- If RecStr = "Visible" Then
- vsFlexGrid1.Clear
- vsFlexGrid1.FormatString = "^项目名称 |^可见 "
- Set tmpRs = Cw_DataEnvi.DataConnect.Execute("select * from Rs_Items WHERE (SID=1 OR Rs=1) AND FieldName <> 'Pic' AND FieldName <> 'EmpId' AND FieldName <> 'EmpNo' AND FieldName <> 'EmpName' ")
- vsFlexGrid1.Rows = tmpRs.RecordCount + 1
- Do While Not tmpRs.EOF
- tYNShow = tmpRs!YNShow
- vsFlexGrid1.TextMatrix(i, 0) = Trim(tmpRs!ChName)
- If tYNShow = 1 Then
- vsFlexGrid1.TextMatrix(i, 1) = "√"
- Else
- vsFlexGrid1.TextMatrix(i, 1) = ""
- End If
- vsFlexGrid1.TextMatrix(i, 2) = Trim(tmpRs!FieldName)
- tmpRs.MoveNext
- i = i + 1
- Loop
- tmpRs.Close
- Else
- Set tmpRs = Cw_DataEnvi.DataConnect.Execute("select * from Rs_Items WHERE (SID=1 OR Rs=1) AND FieldName <> 'Pic' AND FieldName <> 'EmpId' AND FieldName <> 'EmpNo' AND FieldName <> 'EmpName' AND FieldName <>'YnStop' AND YNShow =1 ORDER BY tab") 'YNShow ??
- With vsFlexGrid1
- .Clear
- .FormatString = "^项目名称 |^保留 "
- .Rows = tmpRs.RecordCount + 1
- i = 1
- Do While Not tmpRs.EOF
- .TextMatrix(i, 0) = Trim(tmpRs!ChName)
- .TextMatrix(i, 2) = Trim(tmpRs!FieldName)
- If IsNull(tmpRs.Fields("YNReserve")) Or tmpRs.Fields("YNReserve") = True Then .TextMatrix(i, 1) = "√"
- If tmpRs.Fields("YNReserve") = False Then .TextMatrix(i, 1) = ""
- tmpRs.MoveNext
- i = i + 1
- Loop
- End With
- End If
- End Sub
- Private Sub vsFlexGrid1_DblClick()
- If Me.Caption = "基本信息录入设置——显示项目" Then
- With vsFlexGrid1
- If Trim(.TextMatrix(.Row, 2)) = "EmpNo" Then Call Xtxxts("职工号必须可见!", 0, 3): Exit Sub
- If Trim(.TextMatrix(.Row, 2)) = "EmpName" Then Call Xtxxts("姓名必须可见!", 0, 3): Exit Sub
- If .TextMatrix(.Row, 1) = "" Then
- .TextMatrix(.Row, 1) = "√"
- Else
- .TextMatrix(.Row, 1) = ""
- End If
- End With
- Else
- With vsFlexGrid1
- If Trim(.TextMatrix(.Row, 2)) = "EmpNo" Then Call Xtxxts("职工号不能保留!", 0, 3): Exit Sub
- If Trim(.TextMatrix(.Row, 2)) = "EmpName" Then Call Xtxxts("姓名不能保留!", 0, 3): Exit Sub
- If .TextMatrix(.Row, 1) = "" Then
- .TextMatrix(.Row, 1) = "√"
- Else
- .TextMatrix(.Row, 1) = ""
- End If
- End With
- End If
- End Sub