?? 導出結果.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{86808282-58F4-4B17-BBCA-951931BB7948}#1.5#0"; "U8VouchList.ocx"
Object = "{5AD81966-3173-4597-A32E-4F4620DA3B57}#3.4#0"; "U8TBCtl.ocx"
Begin VB.Form frmExportList
Caption = "導出至網上銀行"
ClientHeight = 6315
ClientLeft = 2235
ClientTop = 1560
ClientWidth = 8535
KeyPreview = -1 'True
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6315
ScaleWidth = 8535
WindowState = 2 'Maximized
Begin prjTBCtrl.CTBCtrl ocxCtbTool
Height = 660
Left = 1080
Top = 2760
Width = 1215
_ExtentX = 2143
_ExtentY = 1164
End
Begin MSComctlLib.ImageList IltTool
Left = 1320
Top = 1920
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
MaskColor = 12632256
_Version = 393216
End
Begin MSComDlg.CommonDialog comFile
Left = 4080
Top = 2880
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DefaultExt = "xml"
DialogTitle = "選擇導入文件"
Filter = "*.xml"
InitDir = "."
End
Begin U8VouchList.VouchList ocxVchList
Height = 5535
Left = 0
TabIndex = 1
Top = 600
Width = 8535
_ExtentX = 15055
_ExtentY = 9763
End
Begin MSComctlLib.Toolbar tlbTool
Align = 1 'Align Top
Height = 540
Left = 0
TabIndex = 0
Top = 0
Width = 8535
_ExtentX = 15055
_ExtentY = 953
ButtonWidth = 820
ButtonHeight = 953
Style = 1
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 15
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
Key = "print"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "預覽"
Key = "preview"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "輸出"
Key = "output"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "導入"
Key = "import"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "查詢"
Key = "query"
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "欄目"
Key = "columns"
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "刷新"
Key = "refresh"
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "全選"
Key = "selall"
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "全消"
Key = "desel"
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "導出"
Key = "export"
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "幫助"
Key = "help"
EndProperty
BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "quit"
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmExportList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private m_objColSet As New U8colset.clsColSet '單據列表行對象
Private m_objCon As New ADODB.Connection '連接對象
Private m_objBack As New U8FDNB.clsFDAid '資金用網上銀行部分
Private m_objnb As New U8FDNB.clsFDNB '由文件導入
Private m_objDetail As New clsVchInputUI '聯查用
Private m_objIDMgr As New OIDObject
Private m_sql As String '保存當前的查詢語句
Private m_iType As Integer '當前的單據類型
Private Const m_sJoin = " left join fd_accdef as t1 on fd_Transactions.rcv_acc_id=t1.accdef_id " & _
"left join fd_accdef as t2 on fd_Transactions.pay_acc_id=t2.accdef_id " & _
"left join fd_accunit as t3 on t1.accunit_id=t3.accunit_id " & _
"left join fd_accunit as t4 on t2.accunit_id=t4.accunit_id " & _
"left join fd_entities as t5 on substring(fd_transactions.transactions_id,1,2)=t5.iBIType left join settlestyle as t6 on t6.csscode=fd_transactions.settle_code "
'設置當前的sql語句,刷新或查詢時使用
Public Sub SetSql(Optional sql As String = "", Optional tp As Integer = 0)
On Error Resume Next
m_iType = tp
If sql = "refresh" Then
SetRS
Else
m_sql = sql
SetRS
End If
SetTitle
SetButtonState
End Sub
'不同類型單據改變單據列表標題
Public Sub SetTitle()
Dim objCols As clsCols
Set objCols = m_objColSet.GetColProperties
Select Case m_iType
Case 0 '銀行付款結算單
ocxVchList.colwidth(objCols("pay_acc_code").iColPos) = 0
Case 1 '銀行取款單
ocxVchList.colwidth(objCols("rcv_acc_code").iColPos) = 0
Case 2 '銀行結算單
ocxVchList.TextMatrix(0, objCols("rcv_acc_code").iColPos) = "銀行收款帳戶號"
ocxVchList.colwidth(objCols("userdefine1").iColPos) = 0
End Select
End Sub
'查詢數據庫,將結果賦值單據列表
Private Sub SetRS()
Dim sql As String
m_objColSet.setColMode ("fd_export")
ocxVchList.InitHead m_objColSet.getColInfo
ocxVchList.Title = "結果列表"
If m_sql <> "" Then
Dim rs As New ADODB.Recordset
sql = "select " & m_objColSet.GetSqlString & " from fd_transactions " & m_sJoin & " " & m_sql & " and importexport_flag='0' "
'判斷是否有排序條件
If m_objColSet.getOrderString <> "" Then
sql = sql & " order by " & m_objColSet.getOrderString
End If
rs.Open sql, m_objCon, adOpenStatic, adLockOptimistic
ocxVchList.SetVchLstRst rs
If rs.RecordCount = 0 Then
ocxVchList.Rows = 1
End If
End If
' SetButtonState
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
bShortCut KeyCode, Shift
End Sub
Private Sub Form_Load()
On Error Resume Next
LoadToolPic
m_objColSet.Init g_sDataSourceName, zjLogInfo.cUserName
m_objColSet.setColMode ("fd_export")
Set m_objCon = m_objAid.objOpenDB(g_sDataSourceName)
ocxVchList.InitHead m_objColSet.getColInfo
ocxVchList.FillMode = FillOverwrite
ocxVchList.Rows = 1
SetButtonState
SetTBStyle Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set m_objCon = Nothing
Set m_objColSet = Nothing
Set m_objBack = Nothing
Set m_objnb = Nothing
End Sub
Private Sub Form_Resize()
On Error Resume Next
ocxVchList.left = 0
ocxVchList.top = 600
ocxVchList.width = Me.width
If Me.Height > 1400 Then
ocxVchList.Height = Me.Height - 1000
End If
ocxVchList.Title = "結果列表"
ResizeTlb Me
End Sub
Private Sub ocxCtbTool_OnCommand(ByVal enumType As prjTBCtrl.ENUM_MENU_OR_BUTTON, ByVal cButtonId As String, ByVal cMenuId As String)
tlbTool_ButtonClick tlbTool.Buttons(cButtonId)
End Sub
Private Sub ocxVchList_DblClick()
Dim ocols As U8colset.clsCols
On Error GoTo last
If Not Workable Then
Exit Sub
End If
'聯查
Set ocols = m_objColSet.GetColProperties
m_objIDMgr.id = ocxVchList.TextMatrix(ocxVchList.Row, ocols("transactions_id").iColPos)
m_objDetail.Show g_sDataSourceName, smView, m_objIDMgr, mID(m_objIDMgr.id, 1, 2)
Exit Sub
last:
Err.clear
End Sub
Private Sub tlbTool_ButtonClick(ByVal Button As MsComctlLib.Button)
Select Case Button.key
Case "query"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -