⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmcurrencynew.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{D252F124-F62C-11D1-9ABD-444553540000}#1.0#0"; "GADATE.DLL"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmCurrencyCard 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "新增币种"
   ClientHeight    =   3855
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7545
   HelpContextID   =   30036
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3855
   ScaleWidth      =   7545
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.ComboBox cboYP 
      Height          =   300
      Index           =   1
      Left            =   5520
      Style           =   2  'Dropdown List
      TabIndex        =   16
      Top             =   120
      Width           =   615
   End
   Begin VB.ComboBox cboYP 
      Height          =   276
      Index           =   0
      Left            =   4056
      Style           =   2  'Dropdown List
      TabIndex        =   14
      Top             =   120
      Width           =   735
   End
   Begin VB.TextBox txtRate 
      Appearance      =   0  'Flat
      Height          =   210
      Left            =   4470
      MaxLength       =   12
      TabIndex        =   17
      Top             =   1650
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.TextBox txtCurrency 
      Height          =   270
      Index           =   1
      Left            =   1380
      MaxLength       =   10
      TabIndex        =   3
      Top             =   735
      Width           =   1368
   End
   Begin VB.TextBox txtCurrency 
      Height          =   270
      Index           =   0
      Left            =   1380
      MaxLength       =   4
      TabIndex        =   1
      Top             =   360
      Width           =   1368
   End
   Begin VB.ComboBox cboMode 
      Height          =   300
      Left            =   2055
      Style           =   2  'Dropdown List
      TabIndex        =   9
      Top             =   1950
      Width           =   720
   End
   Begin VB.OptionButton optMode 
      Caption         =   "原币÷汇率=本位币"
      Height          =   315
      Index           =   1
      Left            =   450
      TabIndex        =   12
      Top             =   3195
      Width           =   1965
   End
   Begin VB.OptionButton optMode 
      Caption         =   "原币×汇率=本位币"
      Height          =   315
      Index           =   0
      Left            =   450
      TabIndex        =   11
      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        =   20
      Tag             =   "1002"
      Top             =   840
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Height          =   350
      Index           =   0
      Left            =   6240
      Style           =   1  'Graphical
      TabIndex        =   19
      Tag             =   "1001"
      Top             =   450
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Height          =   350
      Index           =   2
      Left            =   6240
      Style           =   1  'Graphical
      TabIndex        =   21
      Tag             =   "1009"
      Top             =   1230
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CheckBox chkStop 
      Caption         =   "停用"
      Height          =   195
      Left            =   6240
      TabIndex        =   22
      Top             =   3510
      Width           =   1215
   End
   Begin MSFlexGridLib.MSFlexGrid msgRate 
      Height          =   3252
      Left            =   3060
      TabIndex        =   18
      Top             =   456
      Width           =   3072
      _ExtentX        =   5424
      _ExtentY        =   5741
      _Version        =   393216
      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   =   "frmCurrencyNew.frx":0000
      TabIndex        =   7
      Top             =   1515
      Width           =   735
   End
   Begin GACALENDARLibCtl.SpinEdit txtspin 
      Height          =   288
      Index           =   0
      Left            =   2040
      OleObjectBlob   =   "frmCurrencyNew.frx":009F
      TabIndex        =   5
      Top             =   1128
      Width           =   732
   End
   Begin VB.Label lblTitle 
      Caption         =   "币种小数位数(&0~9)"
      Height          =   216
      Index           =   2
      Left            =   348
      TabIndex        =   4
      Top             =   1176
      Width           =   1752
   End
   Begin VB.Label lblTitle 
      Alignment       =   2  'Center
      Caption         =   "折算方式(&Z)"
      Height          =   195
      Index           =   5
      Left            =   450
      TabIndex        =   10
      Top             =   2475
      Width           =   1065
   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          =   216
      Index           =   3
      Left            =   348
      TabIndex        =   6
      Top             =   1548
      Width           =   1752
   End
   Begin VB.Label lblTitle 
      Caption         =   "汇率匹配方式(&M)"
      Height          =   255
      Index           =   4
      Left            =   345
      TabIndex        =   8
      Top             =   1965
      Width           =   1740
   End
   Begin VB.Label lblTitle 
      Caption         =   "会计年度(&Y)"
      Height          =   192
      Index           =   6
      Left            =   3036
      TabIndex        =   13
      Top             =   180
      Width           =   1008
   End
   Begin VB.Label lblTitle 
      Caption         =   "期间(&P)"
      Height          =   192
      Index           =   7
      Left            =   4860
      TabIndex        =   15
      Top             =   180
      Width           =   648
   End
End
Attribute VB_Name = "frmCurrencyCard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

'   币种汇率窗体
'   作者:郑权
'   日期:98.6.23
'接口:   AddCard   增加币种汇率记录。
'                   参数:intModal 显示模式,strName 用户输入值
'         EditCard  修改币种汇率记录。
'                   参数: lngID 被修改的记录的ID,intModal 显示模式
'         DelCard   删除币种汇率记录。
'                   参数: lngID 被删除的记录的ID
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Option Compare Text

Private mblnIsNew As Boolean
Private mblnIsChanged As Boolean
Private mblnIsInit 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 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
                   If UpdateData Then mCurrencyIsSave = True
                End If
                mbytPeriod = cboYP(1).Text
                mintYear = cboYP(0).Text
                InitGrid
    End Select
End Sub

Private Sub chkStop_Click()
    mblnIsChanged = True
End Sub

Private Sub cmdOK_Click(Index As Integer)
    If Index = 0 Or Index = 2 Then
        If Not UpdateData Then
           'gclsBase.BaseWorkSpace.RollBacktrans
           'Unload Me
           Exit Sub
        Else
           gclsBase.BaseWorkSpace.CommitTrans   '开始写记录操作
           gclsSys.SendMessage Me.hwnd, Message.msgcurrency
           gclsBase.GetBaseInfo
        End If
        If Index = 2 Then
            gclsBase.BaseWorkSpace.BeginTrans
            InitForm
            Exit Sub
        End If
    Else
       gclsBase.BaseWorkSpace.RollBacktrans
    End If
    Unload Me
End Sub

Public Sub EditCard(ByVal lngID As Long, Optional intModal As Integer = 0)
    Dim lngResult As Integer
    
    If lngID = 0 Then
       ShowMsg 0, "币种汇率已不存在,不能修改!", vbExclamation + MB_TASKMODAL, "修改币种汇率"
       Exit Sub
    End If
    mCurrencyIsSave = False
    gclsBase.BaseWorkSpace.BeginTrans
    mlngCurID = lngID
   ' mblnIsNew = False
    InitCard
    Show intModal
End Sub

Private Sub Form_Activate()
    SetHelpID Me.HelpContextID
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then
'        If Me.ActiveControl.Name = "txtspin" Then
'            BKKEY Me.ActiveControl.Window, vbKeyTab
'        Else
            BKKEY Me.ActiveControl.hwnd, vbKeyTab
'        End If
    End If
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn And Shift = 2 Then
        cmdOK(0).Value = True
    End If
End Sub

Private Sub Form_Load()
    On Error GoTo ErrHandle
'    SetHelpID Me.hwnd, 30036    '15005
    Set cmdOK(0).Picture = GetFormResPicture(1001, vbResBitmap)
    Set cmdOK(1).Picture = GetFormResPicture(1002, vbResBitmap)
    Set cmdOK(2).Picture = GetFormResPicture(1009, vbResBitmap)
    'Set mclsMainControl = gclsSys.MainControls.Add(Me)
    Set Me.Icon = GetFormResPicture(139, vbResIcon)
    Set mclsGrid = New Grid
    Set mclsGrid.Grid = msgRate
'    Set mclsGrid.EditText = txtRate
    cboMode.Clear
    cboMode.AddItem "当日"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -