+
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:7k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
- Begin VB.Form Set_ItemVisibleFrm
- BorderStyle = 1 'Fixed Single
- Caption = "可见项目选择"
- ClientHeight = 4560
- ClientLeft = 2850
- ClientTop = 1575
- ClientWidth = 3540
- HelpContextID = 12008
- Icon = "设置_显示项目设置.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4560
- ScaleWidth = 3540
- Begin VSFlex8Ctl.VSFlexGrid vsFlexGrid1
- Height = 3885
- Left = 90
- TabIndex = 2
- Top = 90
- Width = 3345
- _ExtentX = 5900
- _ExtentY = 6853
- 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_Cancel
- Caption = "取消(&C)"
- Height = 300
- Left = 2280
- TabIndex = 1
- Top = 4095
- Width = 1120
- End
- Begin VB.CommandButton Cmd_Save
- Caption = "确定(&O)"
- Height = 300
- Left = 1065
- TabIndex = 0
- Top = 4095
- Width = 1120
- End
- End
- Attribute VB_Name = "Set_ItemVisibleFrm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '*******************************************************
- '* 模 块 名 称 :显示项目设置
- '* 功 能 描 述 :设置字段是否可见
- '* 程序员姓名 :刘 刚
- '* 最后修改人 :刘 刚
- '* 最后修改时间:2001/11/30
- '* 备 注:经过自己测试
- '*******************************************************
- Option Explicit
- Dim add_item As New Recordset
- Dim Item_TF()
- Dim frmOwner As Integer
- Private Sub Cmd_Cancel_Click()
- Unload Me
- End Sub
- Private Sub Cmd_Save_Click() '保存项目分类信息
- On Error Resume Next
- Dim sSql As String
- Dim i As Integer
- Dim CH As String
- Dim tYNShow As String
- If frmOwner = 1 Then
- tYNShow = "YNShow"
- Else
- tYNShow = "sYNShow"
- End If
- sSql = ""
- With vsFlexGrid1
- For i = 0 To .Rows - 1
- If .TextMatrix(i, 1) = "√" Then
- sSql = sSql + " UPDATE Rs_Items SET " + tYNShow + "='1' WHERE FieldName='" + Trim(vsFlexGrid1.TextMatrix(i, 2)) + "'"
- Else
- sSql = sSql + " UPDATE Rs_Items SET " + tYNShow + "='0' WHERE FieldName='" + Trim(vsFlexGrid1.TextMatrix(i, 2)) + "'"
- End If
- Next i
- Cw_DataEnvi.DataConnect.Execute sSql
- Unload Me
- End With
- End Sub
- Private Sub Form_Activate() '向网格填充项目信息
- frmOwner = Xtcdcs
- On Error Resume Next
- ' Dim ado_Itemtf As New Recordset
- Dim i As Integer
- Dim tYNShow As Integer
- vsFlexGrid1.ColHidden(2) = True
- i = 1
- If frmOwner = 1 Then
- Set add_item = Cw_DataEnvi.DataConnect.Execute("select * from Rs_Items WHERE (SID=1 OR Rs=1) AND FieldName <> 'Pic'")
- Else
- Set add_item = Cw_DataEnvi.DataConnect.Execute("select * from Rs_Items WHERE (SID=2 OR Pm=1) AND FieldName <> 'Pic'")
- End If
- vsFlexGrid1.Rows = add_item.RecordCount + 1
- Do While Not add_item.EOF
- If frmOwner = 1 Then
- tYNShow = add_item!YNShow
- Else
- tYNShow = add_item!sYNShow
- End If
- ' If add_item!TableName = "Rs_BasicInfo" Then
- ' vsFlexGrid1.Cell(flexcpBackColor, i, 0, i, 1) = &H80000018
- ' Else
- ' vsFlexGrid1.Cell(flexcpBackColor, i, 0, i, 1) = &HFFFFFF
- ' End If
- vsFlexGrid1.TextMatrix(i, 0) = Trim(add_item!ChName)
- If tYNShow = 1 Then
- vsFlexGrid1.TextMatrix(i, 1) = "√"
- Else
- vsFlexGrid1.TextMatrix(i, 1) = ""
- End If
- vsFlexGrid1.TextMatrix(i, 2) = Trim(add_item!FieldName)
- add_item.MoveNext
- i = i + 1
- Loop
- add_item.Close
- End Sub
- Private Sub vsFlexGrid1_DblClick() '选中项目
- 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 Sub
- Private Sub vsFlexGrid1_KeyDown(KeyCode As Integer, Shift As Integer) '选中项目
- If KeyCode = 32 Then
- vsFlexGrid1_DblClick
- End If
- End Sub