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

📄 frmsetprex.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Begin VB.Form frmSetPrex 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "单据前缀设置"
   ClientHeight    =   3975
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5535
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3975
   ScaleWidth      =   5535
   StartUpPosition =   3  '窗口缺省
   Begin MSRDC.MSRDC datSource 
      Height          =   330
      Left            =   2910
      Top             =   3870
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      _Version        =   393216
      Options         =   0
      CursorDriver    =   0
      BOFAction       =   0
      EOFAction       =   0
      RecordsetType   =   1
      LockType        =   3
      QueryType       =   0
      Prompt          =   3
      Appearance      =   1
      QueryTimeout    =   30
      RowsetSize      =   100
      LoginTimeout    =   15
      KeysetSize      =   0
      MaxRows         =   0
      ErrorThreshold  =   -1
      BatchSize       =   15
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Enabled         =   -1  'True
      ReadOnly        =   0   'False
      Appearance      =   -1  'True
      DataSourceName  =   ""
      RecordSource    =   ""
      UserName        =   ""
      Password        =   ""
      Connect         =   ""
      LogMessages     =   ""
      Caption         =   "MSRDC1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.TextBox txtStick 
      Appearance      =   0  'Flat
      Height          =   270
      Left            =   4590
      MaxLength       =   6
      TabIndex        =   7
      Top             =   1470
      Visible         =   0   'False
      Width           =   675
   End
   Begin MSFlexGridLib.MSFlexGrid msgList 
      Bindings        =   "frmSetPrex.frx":0000
      Height          =   3285
      Left            =   120
      TabIndex        =   4
      Top             =   510
      Width           =   4185
      _ExtentX        =   7382
      _ExtentY        =   5794
      _Version        =   393216
      Cols            =   3
      FixedCols       =   0
      ScrollBars      =   2
   End
   Begin VB.CommandButton cmdOKorCancel 
      Height          =   375
      Index           =   1
      Left            =   4380
      Style           =   1  'Graphical
      TabIndex        =   6
      Tag             =   "1002"
      Top             =   600
      Width           =   1035
   End
   Begin VB.CommandButton cmdOKorCancel 
      Height          =   375
      Index           =   0
      Left            =   4380
      Style           =   1  'Graphical
      TabIndex        =   5
      Tag             =   "1001"
      Top             =   82
      Width           =   1035
   End
   Begin VB.ComboBox cboYP 
      Height          =   300
      Index           =   1
      Left            =   3375
      Style           =   2  'Dropdown List
      TabIndex        =   3
      Top             =   82
      Width           =   915
   End
   Begin VB.ComboBox cboYP 
      Height          =   300
      Index           =   0
      Left            =   1155
      Style           =   2  'Dropdown List
      TabIndex        =   1
      Top             =   82
      Width           =   915
   End
   Begin VB.Label Label1 
      Caption         =   "会计期间(&P)"
      Height          =   225
      Index           =   1
      Left            =   2370
      TabIndex        =   2
      Top             =   120
      Width           =   1005
   End
   Begin VB.Label Label1 
      Caption         =   "会计年度(&Y)"
      Height          =   225
      Index           =   0
      Left            =   150
      TabIndex        =   0
      Top             =   120
      Width           =   1005
   End
End
Attribute VB_Name = "frmSetPrex"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'************************************
' 该模块用于设置单据前缀
' 作者 :欧中建
' 日期 :1999-12-25
'*************************************

Option Explicit

Private mblnLoad As Boolean
Private mCurYear As Long
Private mCurPeriod As Long
Private mblnScorll As Boolean
Private mblnStick As Boolean
Private mblnChange As Boolean

Private Sub cboYP_Click(Index As Integer)
    If Not mblnLoad Then
        If CInt(cboYP(0).Text) <> mCurYear Or CInt(cboYP(1).Text) <> mCurPeriod Then
            If mblnChange Then
                StorDate
                mblnChange = False
            End If
            InitGrid CInt(cboYP(0).Text), CInt(cboYP(1).Text)
            mCurYear = CInt(cboYP(0).Text)
            mCurPeriod = CInt(cboYP(1).Text)
        End If
    End If
End Sub

Private Sub cmdOKOrCancel_Click(Index As Integer)
    If Index = 0 Then
        If txtStick.Visible Then msgList_LeaveCell
        If mblnChange Then
            StorDate
        End If
    End If
    Unload Me
End Sub
Public Sub BindingResultSet()
    Me.Hide
    mblnLoad = True
    InitYear
    initPerid CInt(cboYP(0).Text)
    InitGrid CInt(cboYP(0).Text), CInt(cboYP(1).Text)
    mblnLoad = False
    Me.Show vbModal
End Sub

'
Private Sub Form_Load()
    '初始化会计年度期间
    On Error Resume Next
    mblnScorll = False
    mblnChange = False
    Utility.LoadFormResPicture Me
'    mblnLoad = True
'
'    InitYear
'    initPerid CInt(cboYP(0).Text)
'    InitGrid CInt(cboYP(0).Text), CInt(cboYP(1).Text)
'    mblnLoad = False
End Sub
'获得单据类型ID
Private Function ListID() As Long
    With msgList
        If Trim(.TextMatrix(.Row, 0)) <> "" Then
            ListID = CLng(.TextMatrix(.Row, 0))
        Else
            ListID
        End If
    End With
End Function
'保存数据
Private Function StorDate() As Boolean
    Dim i As Integer
    StorDate = False
On Error GoTo Hander1
    With msgList
        For i = 0 To .Rows - 1
            If .RowData(i) = 1 Then
                SaveCard CLng(Val(.TextMatrix(i, 0))), .TextMatrix(i, 2)
            End If
        Next
    End With
    StorDate = True
    Exit Function
Hander1:
    StorDate = False
End Function

Private Function SaveCard(ByVal lngID As Long, ByVal strText As String) As Boolean
    Dim strSql As String
    SaveCard = False
    strSql = "Update  ReceiptType set strPrexReceiptNO= '" & Trim(strText) & "' where lngReceiptTypeID=" & lngID
    SaveCard = gclsBase.ExecSQL(strSql)
End Function
'初始化列表
'.lngReceiptTypeID  IN (2,13,34,35,36,37,38,39,40,41,48,49,50,51,53,54,55)

Private Sub InitGrid(ByVal intYear As Integer, ByVal intPeriod As Integer)

⌨️ 快捷键说明

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