📄 frmcurrencylistcard.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{D252F124-F62C-11D1-9ABD-444553540000}#1.0#0"; "CALENDAR.DLL"
Begin VB.Form frmCurrencyListCard
BorderStyle = 1 'Fixed Single
Caption = "新增币种"
ClientHeight = 3855
ClientLeft = 45
ClientTop = 330
ClientWidth = 7590
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 3855
ScaleWidth = 7590
ShowInTaskbar = 0 'False
Begin VB.ComboBox cboMode
Height = 300
Left = 2040
Style = 2 'Dropdown List
TabIndex = 22
Top = 1942
Width = 720
End
Begin VB.ComboBox cboYP
Height = 300
Index = 1
Left = 5520
Style = 2 'Dropdown List
TabIndex = 12
Top = 120
Width = 735
End
Begin VB.ComboBox cboYP
Height = 300
Index = 0
Left = 4050
Style = 2 'Dropdown List
TabIndex = 10
Top = 120
Width = 735
End
Begin VB.TextBox txtRate
Appearance = 0 'Flat
Height = 270
Left = 4080
TabIndex = 13
Top = 1710
Visible = 0 'False
Width = 975
End
Begin VB.TextBox txtCurrency
Height = 270
Index = 1
Left = 1380
TabIndex = 3
Top = 735
Width = 1365
End
Begin VB.TextBox txtCurrency
Height = 270
Index = 0
Left = 1380
TabIndex = 1
Top = 360
Width = 1365
End
Begin VB.OptionButton optMode
Caption = "原币÷汇率=本位币"
Height = 315
Index = 1
Left = 450
TabIndex = 8
Top = 3195
Width = 1965
End
Begin VB.OptionButton optMode
Caption = "原币×汇率=本位币"
Height = 315
Index = 0
Left = 450
TabIndex = 7
Top = 2790
Value = -1 'True
Width = 1965
End
Begin VB.CommandButton cmdOK
Cancel = -1 'True
Height = 350
Index = 1
Left = 6240
Style = 1 'Graphical
TabIndex = 17
Tag = "1002"
Top = 840
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdOK
Default = -1 'True
Height = 350
Index = 0
Left = 6240
Style = 1 'Graphical
TabIndex = 16
Tag = "1001"
Top = 450
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdOK
Height = 350
Index = 2
Left = 6240
Style = 1 'Graphical
TabIndex = 18
Tag = "1009"
Top = 1230
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CheckBox chkStop
Caption = "停用"
Height = 195
Left = 6240
TabIndex = 15
Top = 3510
Width = 1215
End
Begin MSFlexGridLib.MSFlexGrid msgRate
Height = 3255
Left = 3060
TabIndex = 14
Top = 450
Width = 3075
_ExtentX = 5424
_ExtentY = 5741
_Version = 65541
Rows = 32
Cols = 3
FixedCols = 0
BackColorBkg = 16777215
GridColorFixed = 12632256
AllowBigSelection= 0 'False
FocusRect = 2
GridLines = 0
ScrollBars = 2
FormatString = "| 日期| 汇率 "
End
Begin GACALENDARLibCtl.SpinEdit txtspin
Height = 285
Index = 1
Left = 2040
OleObjectBlob = "frmCurrencyListCard.frx":0000
TabIndex = 20
Top = 1508
Width = 735
End
Begin GACALENDARLibCtl.SpinEdit txtspin
Height = 285
Index = 0
Left = 2040
OleObjectBlob = "frmCurrencyListCard.frx":009F
TabIndex = 21
Top = 1133
Width = 735
End
Begin VB.Label lblTitle
Caption = "币种小数位数(&0~9)"
Height = 210
Index = 2
Left = 345
TabIndex = 4
Top = 1170
Width = 1635
End
Begin VB.Label lblTitle
Caption = "折算方式"
Height = 195
Index = 5
Left = 450
TabIndex = 19
Top = 2475
Width = 825
End
Begin VB.Label lblTitle
Caption = "币种编号(&C)"
Height = 225
Index = 0
Left = 345
TabIndex = 0
Top = 405
Width = 1005
End
Begin VB.Label lblTitle
Caption = "币种名称(&N)"
Height = 195
Index = 1
Left = 345
TabIndex = 2
Top = 780
Width = 1005
End
Begin VB.Label lblTitle
Caption = "汇率小数位数(0~&9)"
Height = 210
Index = 3
Left = 345
TabIndex = 5
Top = 1545
Width = 1635
End
Begin VB.Label lblTitle
Caption = "汇率匹配方式(&M)"
Height = 255
Index = 4
Left = 345
TabIndex = 6
Top = 1965
Width = 1740
End
Begin VB.Label lblTitle
Caption = "会计年度(&Y)"
Height = 195
Index = 6
Left = 3030
TabIndex = 9
Top = 180
Width = 1005
End
Begin VB.Label lblTitle
Caption = "期间(&P)"
Height = 195
Index = 7
Left = 4860
TabIndex = 11
Top = 180
Width = 645
End
End
Attribute VB_Name = "frmCurrencyListCard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' 币种汇率窗体
' 作者:郑权
' 日期:98.11.14
'接口: AddCard 增加币种汇率记录。
' 参数:intModal 显示模式,strName 用户输入值
' EditCard 修改币种汇率记录。
' 参数: lngID 被修改的记录的ID,intModal 显示模式
' DelCard 删除币种汇率记录。
' 参数: lngID 被删除的记录的ID
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private mblnIsNew As Boolean
Private mblnIsChanged As Boolean
Private mbytPeriod As Byte
Private mintYear As Integer
Private mintOldRow As Integer
Private mintOldCol As Integer
Private mlngCurID As Long
Private mstrOldCurCode As String
Private WithEvents mclsGrid As Grid
Attribute mclsGrid.VB_VarHelpID = -1
Private WithEvents mclsMainControl As MainControl '主控对象
Attribute mclsMainControl.VB_VarHelpID = -1
Private mblnGridIsFirst As Boolean '
Private mCurrencyIsSave As Boolean
Private mblnisFirstEdit As Boolean
Private Sub cboMode_Click()
If mblnisFirstEdit = True Then Exit Sub
mblnIsChanged = True
End Sub
Private Sub cboMode_KeyPress(KeyAscii As Integer)
mblnIsChanged = True
End Sub
Private Sub cboMode_LostFocus()
mblnIsChanged = True
End Sub
Private Sub cboYP_Click(Index As Integer)
Dim intyear As Integer, intPeriod As Integer
Dim strSql As String
Dim recYear As rdoResultset
Dim i As Integer
Dim intCount As Integer
Select Case Index
Case 0
strSql = "select bytPeriodNO from AccountYear where intYear=" & cboYP(0).Text
Set recYear = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
If recYear.RowCount <> 0 Then
intPeriod = recYear.rdoColumns(0)
cboYP(1).Clear
For i = 1 To intPeriod
cboYP(1).AddItem i
Next
intPeriod = gclsBase.Period
If cboYP(1).ListCount <> 0 Then
intCount = cboYP(1).ListCount
For i = 0 To intCount - 1
If intPeriod = cboYP(1).list(i) Then
cboYP(1).ListIndex = i
Exit For
End If
Next
End If
If Len(cboYP(1).Text) = 0 Then
mbytPeriod = 0
Else
mbytPeriod = cboYP(1).Text
End If
mintYear = cboYP(0).Text
InitGrid
End If
Case 1
If mblnGridIsFirst = False Then
UpdateData
mCurrencyIsSave = True
End If
mbytPeriod = cboYP(1).Text
mintYear = cboYP(0).Text
InitGrid
End Select
End Sub
Private Sub cboYP_LostFocus(Index As Integer)
mblnIsChanged = True
End Sub
Private Sub chkStop_Click()
mblnIsChanged = True
End Sub
Private Sub cmdOK_Click(Index As Integer)
Select Case Index
Case 0
If UpdateData Then Unload Me
Case 1
Unload Me
Case 2
If UpdateData Then InitForm
End Select
' If Index = 0 Or Index = 2 Then
' If Not UpdateData Then
' 'gclsBase.BaseWorkSpace.Rollback
' 'Unload Me
' Exit Sub
' Else
' ' gclsBase.BaseWorkSpace.CommitTrans '开始写记录操作
' ' gclsSys.SendMessage Me.hwnd, Message.msgcurrency
' Unload Me
' End If
' If Index = 2 Then
' ' gclsBase.BaseWorkSpace.BeginTrans
' InitForm
' Exit Sub
' End If
' Else
' 'gclsBase.BaseWorkSpace.RollBack
' End If
' Unload Me
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -