资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:13k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
- Begin VB.Form frm_user_right
- BorderStyle = 3 'Fixed Dialog
- Caption = "报表模板属性窗口"
- ClientHeight = 4755
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 6660
- ControlBox = 0 'False
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4755
- ScaleWidth = 6660
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton Command1
- Caption = "确定(&O)"
- Height = 300
- Left = 4230
- Style = 1 'Graphical
- TabIndex = 9
- Top = 4350
- Width = 1120
- End
- Begin VB.CommandButton Command2
- Caption = "清除(&C)"
- Height = 300
- Left = 5460
- Style = 1 'Graphical
- TabIndex = 8
- Top = 4350
- Width = 1120
- End
- Begin VB.Frame Frame1
- BeginProperty Font
- Name = "宋体"
- Size = 14.25
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 4155
- Left = 60
- TabIndex = 0
- Top = 60
- Width = 6525
- Begin VB.ListBox List1
- ForeColor = &H00000000&
- Height = 2400
- Left = 3690
- TabIndex = 2
- Top = 600
- Width = 2655
- End
- Begin VB.ComboBox Combo1
- ForeColor = &H00000000&
- Height = 300
- Left = 3690
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 3690
- Width = 2655
- End
- Begin VSFlex8Ctl.VSFlexGrid vs1
- Height = 3405
- Left = 120
- TabIndex = 3
- Top = 600
- Width = 3375
- _ExtentX = 5953
- _ExtentY = 6006
- 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 = 1
- Cols = 4
- 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.Label Label3
- Caption = "请选择能使用该模板的员工:"
- Height = 240
- Left = 120
- TabIndex = 6
- Top = 270
- Width = 3030
- End
- Begin VB.Line Line1
- BorderColor = &H8000000B&
- Index = 1
- X1 = 0
- X2 = 0
- Y1 = -840
- Y2 = 3000
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "应用期限:"
- ForeColor = &H00000000&
- Height = 180
- Left = 3690
- TabIndex = 5
- Top = 3420
- Width = 810
- End
- Begin VB.Label Label1
- BackColor = &H00FFC0C0&
- BackStyle = 0 'Transparent
- Caption = "选中的员工:"
- ForeColor = &H00000000&
- Height = 240
- Index = 0
- Left = 3690
- TabIndex = 4
- Top = 300
- Width = 1440
- End
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackColor = &H00FFC0C0&
- BackStyle = 0 'Transparent
- Caption = "选中的员工:"
- BeginProperty Font
- Name = "宋体"
- Size = 15
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 300
- Index = 1
- Left = 1140
- TabIndex = 7
- Top = 990
- Width = 1890
- End
- End
- Attribute VB_Name = "frm_user_right"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '******************************************************************
- '* 模 块 名 称 : 新建模板权限
- '* 功 能 描 述 : 新建模板权限
- '* 程序员姓名 : 奚俊峰
- '* 最后修改人 : 奚俊峰
- '* 最后修改时间: 2002/01/13
- '******************************************************************
- Dim signal As String
- Dim i As Integer, k As Integer
- Dim iWz As Integer
- Private Sub Command1_Click()
- If Trim(Combo1.Text) = "" Then
- MsgBox "请选择模板的应用期限!!!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
- Exit Sub
- End If
- If List1.ListCount = 0 Then
- MsgBox "请选择应用此模板的操作员!!!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
- Exit Sub
- Else
- Me.Hide
- End If
- End Sub
- Private Sub command2_Click() '清除权限
- With vs1
- For i = 0 To .Rows - 1
- .Row = i
- If .TextMatrix(i, 2) = signal Then
- For k = 0 To .Cols - 1
- .Col = k
- .CellBackColor = RGB(0, 0, 0)
- Next k
- .TextMatrix(i, 2) = ""
- End If
- Next i
- List1.Clear
- End With
- End Sub
- Private Sub Form_Load() '窗体初始化
- '初始化标志111
- signal = "√"
- '填充网格
- With vs1
- .ColWidth(0) = 400
- .ColWidth(1) = 1000
- .ColWidth(2) = 400
- .ColWidth(3) = 400
- .FormatString = "<职工编号|职工姓名|编辑权限|查询权限"
- Dim lea As New ADODB.Recordset
- lea.Open "select czybm,czymc from gy_czygl order by czybm", Cw_DataEnvi.dataconnect, adOpenStatic, adLockReadOnly, adCmdText
- Do While Not lea.EOF
- .AddItem ""
- .TextMatrix(.Rows - 1, 0) = Trim(lea("czybm"))
- .TextMatrix(.Rows - 1, 1) = Trim(lea("czymc"))
- lea.MoveNext
- Loop
- lea.Close
- For i = 1 To .Rows - 1
- .RowHeight(i) = 300
- Next i
- .ColAlignment(0) = flexAlignCenterCenter
- .ColAlignment(1) = flexAlignLeftCenter
- Set lea = Nothing
- End With
- Combo1.AddItem "年报": Combo1.AddItem "季报"
- Combo1.AddItem "月报": Combo1.AddItem "旬报": Combo1.AddItem "日报"
- End Sub
- Private Sub List1_DblClick() '清除权限
- With vs1
- iWz = InStr(1, List1.Text, "-")
- .Row = .FindRow(Left(List1.Text, iWz - 1), , 1)
- .TextMatrix(.Row, 2) = ""
- .TextMatrix(.Row, 3) = ""
- For k = 0 To .Cols - 1
- .Col = k
- .CellBackColor = RGB(0, 0, 0)
- Next k
- List1.RemoveItem (List1.ListIndex)
- End With
- End Sub
- Private Sub vs1_Click()
- Dim tFlag As Boolean
- tFlag = False
- With vs1
- If .Col = 2 Then
- If .TextMatrix(.Row, 2) = signal Then '取消权限
- .TextMatrix(.Row, 2) = ""
- For k = 0 To .Cols - 1
- .Col = k
- .CellBackColor = RGB(0, 0, 0)
- Next k
- For k = 0 To List1.ListCount - 1
- List1.ListIndex = k
- iWz = InStr(1, List1.Text, "-")
- If Left(List1.Text, iWz - 1) = .TextMatrix(.Row, 1) Then
- List1.RemoveItem (List1.ListIndex)
- Exit For
- End If
- Next k
- Else '增加权限
- .TextMatrix(.Row, 2) = signal
- .TextMatrix(.Row, 3) = ""
- For k = 0 To .Cols - 1
- .Col = k
- .CellBackColor = &HC0FFC0
- Next k
- For k = 0 To List1.ListCount - 1
- List1.ListIndex = k
- iWz = InStr(1, List1.Text, "-")
- If Left(List1.Text, iWz - 1) = .TextMatrix(.Row, 1) Then
- tFlag = True
- Exit For
- End If
- Next k
- If tFlag = False Then
- List1.AddItem .TextMatrix(.Row, 1) & "--编辑权"
- Else
- List1.RemoveItem (List1.ListIndex)
- List1.AddItem .TextMatrix(.Row, 1) & "--编辑权"
- tFlag = False
- End If
- End If
- .Col = 2
- End If
- If .Col = 3 Then
- If .TextMatrix(.Row, 3) = signal Then '取消权限
- .TextMatrix(.Row, 3) = ""
- For k = 0 To .Cols - 1
- .Col = k
- .CellBackColor = RGB(0, 0, 0)
- Next k
- For k = 0 To List1.ListCount - 1
- List1.ListIndex = k
- iWz = InStr(1, List1.Text, "-")
- If Left(List1.Text, iWz - 1) = .TextMatrix(.Row, 1) Then
- List1.RemoveItem (List1.ListIndex)
- Exit For
- End If
- Next k
- Else '增加权限
- .TextMatrix(.Row, 3) = signal
- .TextMatrix(.Row, 2) = ""
- For k = 0 To .Cols - 1
- .Col = k
- .CellBackColor = &HC0FFC0
- Next k
- For k = 0 To List1.ListCount - 1
- List1.ListIndex = k
- iWz = InStr(1, List1.Text, "-")
- If Left(List1.Text, iWz - 1) = .TextMatrix(.Row, 1) Then
- tFlag = True
- Exit For
- End If
- Next k
- If tFlag = False Then
- List1.AddItem .TextMatrix(.Row, 1) & "--查询权"
- Else
- List1.RemoveItem (List1.ListIndex)
- List1.AddItem .TextMatrix(.Row, 1) & "--查询权"
- tFlag = False
- End If
- End If
- .Col = 3
- End If
- End With
- End Sub