资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:8k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{C5DE3F80-3376-11D2-BAA4-04F205C10000}#1.0#0"; "VSFLEX6D.OCX"
- Begin VB.Form frm_new_bb
- Caption = "新建报表"
- ClientHeight = 5580
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 6885
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5580
- ScaleWidth = 6885
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton Command2
- Cancel = -1 'True
- Caption = "取消"
- Height = 375
- Left = 5280
- TabIndex = 2
- Top = 5160
- Width = 975
- End
- Begin VB.CommandButton Command1
- Caption = "确定"
- Default = -1 'True
- Height = 375
- Left = 4200
- TabIndex = 1
- Top = 5160
- Width = 975
- End
- Begin VSFlex6DAOCtl.vsFlexGrid vsFlexGrid1
- Height = 4455
- Left = 0
- TabIndex = 0
- Top = 480
- Width = 6855
- _ExtentX = 12091
- _ExtentY = 7858
- _ConvInfo = 1
- 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 = 16777215
- ForeColor = -2147483640
- BackColorFixed = 12648447
- ForeColorFixed = -2147483630
- BackColorSel = -2147483635
- ForeColorSel = -2147483634
- BackColorBkg = 8421504
- BackColorAlternate= 16777215
- GridColor = -2147483633
- GridColorFixed = 0
- TreeColor = -2147483632
- FloodColor = 192
- SheetBorder = -2147483642
- FocusRect = 1
- HighLight = 1
- AllowSelection = -1 'True
- AllowBigSelection= 0 'False
- AllowUserResizing= 0
- SelectionMode = 1
- GridLines = 1
- GridLinesFixed = 1
- 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 = 1
- 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
- End
- Attribute VB_Name = "frm_new_bb"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim wgdmtemp As String
- Dim qslz As Long
- Dim Sjhgd As Double
- Dim Szzls As Integer
- Dim wgszxx() As Variant '整个网格设置信息
- Dim wglxx() As String '网格列其他信息
- Dim Wblrxz() As Integer '文本框录入(事中)限制
- Dim Wbbjsx() As Boolean '(1-锁定某列使其不可编辑 2-是否提供帮助 3-是否列表框录入 4-字段不能为空控制)
- Private Sub Cxnrtcwg()
- Dim Sqlstr As String
- Dim jsqte As Long
- Dim cxnrrec As ADODB.Recordset
- '查询连接串
- Sqlstr = "select report_model_id,report_model_name,user_id from dzbb_bbmb where system_code='" & Left(ls_xtbm, 2) & "' and report_model_id in (select report_model_id from dzbb_right where system_code='" & Left(ls_xtbm, 2) & "' and bbuser_id ='" & Xtczybm & "') order by system_code,report_model_id"
- Set cxnrrec = Cw_DataEnvi.dataconnect.Execute(Sqlstr)
- With cxnrrec
- If .EOF And .BOF Then
- vsFlexGrid1.Clear , flexClearData
- vsFlexGrid1.Rows = .RecordCount + vsFlexGrid1.FixedRows
- vsFlexGrid1.Redraw = True
- Exit Sub
- Else
- vsFlexGrid1.Redraw = False
- vsFlexGrid1.Clear , flexClearData
- vsFlexGrid1.Rows = .RecordCount + vsFlexGrid1.FixedRows
- End If
- jsqte = vsFlexGrid1.FixedRows
- Do While Not .EOF
- If jsqte >= vsFlexGrid1.Rows Then
- vsFlexGrid1.AddItem ""
- End If
- Call Jltcwg(cxnrrec, jsqte)
- vsFlexGrid1.RowHeight(jsqte) = Sjhgd
- .MoveNext
- jsqte = jsqte + 1
- Loop
- End With
- vsFlexGrid1.Redraw = True
- Set cxnrrec = Nothing
- End Sub
- Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long) '记录内容填充网格
- '[以下为自定义部分
- With Jlbrec
- vsFlexGrid1.TextMatrix(Rowjsq, Sydz("001", wglxx(), Szzls)) = Trim(.Fields("report_model_id"))
- vsFlexGrid1.TextMatrix(Rowjsq, Sydz("002", wglxx(), Szzls)) = Trim(.Fields("report_model_name"))
- vsFlexGrid1.TextMatrix(Rowjsq, Sydz("003", wglxx(), Szzls)) = Trim(.Fields("user_id"))
- End With
- '以上为自定义部分]
- End Sub
- Private Sub Command1_Click()
- If Me.vsFlexGrid1.Rows = Me.vsFlexGrid1.FixedRows Then
- Exit Sub
- End If
- With MDI_frame
- .mb_new_report = True
- .mcls_new_report.ls_system_code = ls_xtbm
- .mcls_new_report.ls_report_model_id = vsFlexGrid1.TextMatrix(vsFlexGrid1.row, 0)
- .mcls_new_report.ls_report_model_name = vsFlexGrid1.TextMatrix(vsFlexGrid1.row, 1)
- End With
- Unload Me
- End Sub
- Private Sub command2_Click()
- MDI_frame.mb_new_report = False
- Unload Me
- End Sub
- Private Sub Form_Load()
- ' Dim lrst_xtbm As ADODB.Recordset
- ' Dim ls_xtbm As String, ls_select As String
- '
- ' '调入系统编码
- ' Set lrst_xtbm = New ADODB.Recordset
- ' ls_select = "select system_code,system_name from dzbb_xtbm order by system_code"
- ' lrst_xtbm.Open ls_select, Cw_DataEnvi.dataconnect, adOpenStatic, adLockReadOnly, adCmdText
- '
- ' If lrst_xtbm.RecordCount > 0 Then
- '
- ' lrst_xtbm.MoveFirst
- ' With lrst_xtbm
- ' Do While Not .EOF
- ' ls_xtbm = .Fields("system_code") & "-" & .Fields("system_name")
- ' Combo1.AddItem ls_xtbm, Combo1.ListCount
- ' .MoveNext
- ' Loop
- ' End With
- ' lrst_xtbm.Close
- '
- ' End If
- ' Set lrst_xtbm = Nothing
- '调 入 网 格
- wgdmtemp = "dzbb_bbmb"
- Text1.Text = ls_xtbm
- Text1.Alignment = 2
- Call BzWgcsh(vsFlexGrid1, wgdmtemp, wgszxx(), Wbbjsx(), Wblrxz(), wglxx())
- qslz = wgszxx(1)
- Sjhgd = wgszxx(2)
- Szzls = vsFlexGrid1.Cols - 1
- '填 充 网 格
- 'Combo1.Text = Combo1.List(0)
- Call Cxnrtcwg
- End Sub
- Private Sub vsFlexGrid1_DblClick()
- Command1_Click
- End Sub