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

📄 n_cj.frm

📁 杭州舟远信息技术连锁有限公司的棋牌管理系统源代码
💻 FRM
字号:
VERSION 5.00
Object = "{9A226D6F-2658-4445-8D35-5C19D42676FE}#1.0#0"; "BSE.ocx"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Begin VB.Form N_CJ 
   Caption         =   "前台存金记录"
   ClientHeight    =   5625
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6780
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5625
   ScaleWidth      =   6780
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text4 
      Enabled         =   0   'False
      Height          =   375
      Index           =   3
      Left            =   360
      TabIndex        =   13
      Text            =   "上 缴 金 额"
      Top             =   2040
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Enabled         =   0   'False
      Height          =   375
      Index           =   2
      Left            =   360
      TabIndex        =   12
      Text            =   "财务产生时间"
      Top             =   2640
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      Height          =   375
      Index           =   1
      Left            =   840
      TabIndex        =   11
      Text            =   "前 台 存 金"
      Top             =   4440
      Width           =   1815
   End
   Begin ACTIVESKINLibCtl.Skin Skin1 
      Left            =   5040
      OleObjectBlob   =   "N_CJ.frx":0000
      Top             =   5040
   End
   Begin VB.Frame Frame1 
      Caption         =   "消费金额"
      Height          =   5175
      Index           =   0
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   3375
      Begin VB.TextBox Text5 
         Alignment       =   2  'Center
         Enabled         =   0   'False
         Height          =   375
         Left            =   720
         TabIndex        =   14
         Top             =   4680
         Width           =   1815
      End
      Begin VB.TextBox Text4 
         Enabled         =   0   'False
         Height          =   375
         Index           =   0
         Left            =   120
         TabIndex        =   10
         Text            =   "增加备用"
         Top             =   960
         Width           =   855
      End
      Begin VB.TextBox Text1 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   1
         EndProperty
         Height          =   375
         Left            =   1080
         TabIndex        =   8
         Top             =   960
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确认"
         Height          =   375
         Left            =   2040
         TabIndex        =   7
         Top             =   960
         Width           =   735
      End
      Begin VB.Frame Frame2 
         Caption         =   "上缴财务"
         Height          =   2175
         Left            =   120
         TabIndex        =   3
         Top             =   1440
         Width           =   2655
         Begin VB.TextBox Text3 
            BeginProperty DataFormat 
               Type            =   1
               Format          =   "0"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   1
            EndProperty
            Height          =   375
            Left            =   1560
            TabIndex        =   6
            Top             =   480
            Width           =   975
         End
         Begin VB.CommandButton Command2 
            Caption         =   "确认"
            Height          =   375
            Left            =   1680
            TabIndex        =   5
            Top             =   1680
            Width           =   855
         End
         Begin VB.TextBox Text2 
            BeginProperty DataFormat 
               Type            =   1
               Format          =   "0"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   1
            EndProperty
            Height          =   375
            Left            =   1560
            TabIndex        =   4
            Top             =   1080
            Width           =   975
         End
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   375
      Left            =   5760
      TabIndex        =   1
      Top             =   5040
      Width           =   855
   End
   Begin VB.CommandButton Command4 
      Caption         =   "<新建存金"
      Height          =   375
      Left            =   4440
      TabIndex        =   0
      Top             =   9480
      Width           =   1215
   End
   Begin BSE_Engine.BSE BSE1 
      Left            =   6720
      Top             =   4440
      _ExtentX        =   6588
      _ExtentY        =   1085
   End
   Begin MSFlexGridLib.MSFlexGrid gd1 
      Height          =   4500
      Left            =   3720
      TabIndex        =   9
      Top             =   240
      Width           =   2940
      _ExtentX        =   5186
      _ExtentY        =   7938
      _Version        =   393216
      Rows            =   10
      Cols            =   4
      FixedCols       =   0
      BackColor       =   12648447
      FocusRect       =   0
      SelectionMode   =   1
   End
End
Attribute VB_Name = "N_CJ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim t_bt As String       '存储列表显示的表头
Dim t_fields As Variant  '存储列表显示的字段名
Dim t_fdxs As Variant    '表示显示列是否由代码转换成文字
Dim t_fdcounts As Integer   '表示列表所显示的字段的个数
Dim t_pri As Variant

Private Sub Command1_Click()
On Error Resume Next
Dim xf_Rec As ADODB.Recordset
'Dim sp_rec As ADODB.Recordset
Set xf_Rec = New ADODB.Recordset
xf_Rec.Source = "select * from N_cj "
Set xf_Rec.ActiveConnection = objConn
xf_Rec.CursorType = adOpenDynamic
xf_Rec.LockType = adLockOptimistic
xf_Rec.Open

If Not IsNumeric(Text1.Text) Or Trim(Text1.Text) = "0" Then
    MsgBox "数量错误!"
    Exit Sub
End If

xf_Rec.AddNew
With xf_Rec
.Fields("id") = fGetMaxComID("N_cj", "ID") + 1
.Fields("KX") = "增加备用"
.Fields("je") = Val(Trim(Text1.Text))
.Fields("RQ") = Trim(CStr(Format(Date$, "YYYYMMDD")))
.Fields("CZY") = Trim(SYS_USER)
End With
xf_Rec.Update
xf_Rec.Close
Set xf_Rec = Nothing


Set xf_Rec = New ADODB.Recordset
    xf_Rec.Source = "select * from N_CJ WHERE ID = '0'"
    Set xf_Rec.ActiveConnection = objConn
    xf_Rec.CursorType = adOpenDynamic
    xf_Rec.LockType = adLockOptimistic
    xf_Rec.Open
    If xf_Rec.EOF Then
    MsgBox "数据库已经损坏,无法读取总存金!"
           xf_Rec.Close
    Set xf_Rec = Nothing
    Exit Sub
    End If
 xf_Rec.Fields("je") = Val(Trim(xf_Rec.Fields("je"))) + Val(Trim(Text1.Text))
xf_Rec.Update
'Call yebh(Val(Trim(Text1.Text)), 1)
Text5.Text = xf_Rec.Fields("je") & "  元"
xf_Rec.Close
Set xf_Rec = Nothing
Call flex_refresh("select KX,JE,RQ ,czy from N_CJ")
Text1.Text = ""
End Sub

Private Sub Command2_Click()
On Error Resume Next
Dim xf_Rec As ADODB.Recordset
'Dim sp_rec As ADODB.Recordset
Set xf_Rec = New ADODB.Recordset
xf_Rec.Source = "select * from N_cj "
Set xf_Rec.ActiveConnection = objConn
xf_Rec.CursorType = adOpenDynamic
xf_Rec.LockType = adLockOptimistic
xf_Rec.Open

If Not IsNumeric(Text3.Text) Or Trim(Text3.Text) = "0" Then
    MsgBox "数量错误!"
    Exit Sub
End If

xf_Rec.AddNew
With xf_Rec
.Fields("id") = fGetMaxComID("N_cj", "ID") + 1
.Fields("KX") = "上缴财务"
.Fields("je") = Val(Trim(Text3.Text))
.Fields("FSRQ") = Trim(CStr(Format(Date$, "YYYYMMDD")))
.Fields("RQ") = Trim(Text2.Text)
.Fields("CZY") = Trim(SYS_USER)
End With
xf_Rec.Update
xf_Rec.Close
Set xf_Rec = Nothing


Set xf_Rec = New ADODB.Recordset
    xf_Rec.Source = "select * from N_CJ WHERE ID = '0'"
    Set xf_Rec.ActiveConnection = objConn
    xf_Rec.CursorType = adOpenDynamic
    xf_Rec.LockType = adLockOptimistic
    xf_Rec.Open
    If xf_Rec.EOF Then
    MsgBox "数据库已经损坏,无法读取总存金!"
           xf_Rec.Close
    Set xf_Rec = Nothing
    Exit Sub
    End If
 xf_Rec.Fields("je") = Val(Trim(xf_Rec.Fields("je"))) - Val(Trim(Text3.Text))
xf_Rec.Update
'Call yebh(Val(Trim(Text3.Text)), 0)
Text5.Text = xf_Rec.Fields("je") & "  元"
xf_Rec.Close
Set xf_Rec = Nothing
Call flex_refresh("select KX,JE,RQ ,czy from N_CJ")
Text3.Text = ""
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command4_Click()
On Error Resume Next
Dim xf_Rec As ADODB.Recordset
Set xf_Rec = New ADODB.Recordset
    xf_Rec.Source = "select * from N_CJ WHERE ID = '0'"
    Set xf_Rec.ActiveConnection = objConn
    xf_Rec.CursorType = adOpenDynamic
    xf_Rec.LockType = adLockOptimistic
    xf_Rec.Open
    If Not xf_Rec.EOF Then
    MsgBox "存金已建立,无需重建!"
       xf_Rec.Close
         Set xf_Rec = Nothing
    Exit Sub
    End If
    xf_Rec.AddNew
    With xf_Rec
.Fields("id") = 0
.Fields("KX") = "前台存金"
.Fields("je") = 0
.Fields("RQ") = Trim(CStr(Format(Date$, "YYYYMMDD")))

End With
xf_Rec.Update
xf_Rec.Close
Set xf_Rec = Nothing
MsgBox "建立成功!"
    
End Sub

Private Sub Form_Load()
On Error Resume Next
Skin1.LoadSkin App.Path + "\棋牌界面"
Skin1.ApplySkin hWnd
Dim i As Integer
Dim xf_Rec As ADODB.Recordset
Dim qtcz As ADODB.Recordset
    
    Set qtcz = New ADODB.Recordset
    qtcz.Source = "select * from N_CJ"
    Set qtcz.ActiveConnection = objConn
    qtcz.CursorType = adOpenDynamic
    qtcz.LockType = adLockOptimistic
    qtcz.Open
    If Not qtcz.EOF Then
     For i = 1 To qtcz.RecordCount
      gd1.TextMatrix(i, 4) = SYS_USER
     Next i
   End If
   qtcz.Close
   Set qtcz = Nothing
   
t_fields = Array("kx", "JE", "RQ", "czy") '设置显示字段
t_fdxs = Array(0, 0, 0, 0)  '设置显示字段
t_bt = "<  款项名      |<金额(元)      |<发生日期  |<操作员 "   '设置显示表头格式
t_fdcounts = 4
t_pri = Array("款项名", "金额    ", "发生日期")
Call flex_refresh("select KX,JE,RQ,CZY from N_CJ ")
'Text2.Text =  'CStr(Val(Format(Date$, "YYYYMMdd")) - 1)
'dateadd(text2.Text ,1,date$)
Text2.Text = Format(DateAdd("d", -1, Date), "YYYYMMDD")
 
 
 
    Set xf_Rec = New ADODB.Recordset
    xf_Rec.Source = "select * from N_CJ WHERE ID = '0'"
    Set xf_Rec.ActiveConnection = objConn
    xf_Rec.CursorType = adOpenDynamic
    xf_Rec.LockType = adLockOptimistic
    xf_Rec.Open
    If xf_Rec.EOF Then
    MsgBox "数据库已经损坏,无法读取总存金!"
       xf_Rec.Close
    Set xf_Rec = Nothing
    Exit Sub
    End If
    Text5.Text = xf_Rec.Fields("je") & "  元"
        xf_Rec.Close
    Set xf_Rec = Nothing
End Sub
Private Sub flex_refresh(sqlstr As String)
On Error Resume Next
    Dim xf_Rec As ADODB.Recordset
    
    Set xf_Rec = New ADODB.Recordset
    xf_Rec.Source = sqlstr
    Set xf_Rec.ActiveConnection = objConn
    xf_Rec.CursorType = adOpenDynamic
    xf_Rec.LockType = adLockOptimistic
    xf_Rec.Open
    Call Flex_full(gd1, t_bt, xf_Rec, t_fields, t_fdcounts - 1, t_fdxs)
    lb_jls.Caption = gd1.Rows - 1
    gd1.Refresh
    
    xf_Rec.Close
    Set xf_Rec = Nothing
Error_Handler:
End Sub

Private Sub yebh(JE As Variant, FLAG As Integer)
Dim temp As ADODB.Recordset
Dim temp_je As Variant
Dim rq As String
rq = Format(Date$, "YYYYMMDD")
Set temp = New ADODB.Recordset
temp.Source = "SELECT * FROM N_FFJL where zh='" + CStr(Val(rq) - 1) + "'and kx = '日余额'"
Set temp.ActiveConnection = objConn
temp.CursorType = adOpenDynamic
temp.LockType = adLockOptimistic
temp.Open
If temp.EOF Then
temp.AddNew
With temp
.Fields("id") = fGetMaxComID("N_ffjl", "ID") + 1
.Fields("ZH") = CStr(Val(rq) - 1)
.Fields("KX") = "日余额"
.Fields("je") = JE
.Fields("RQ") = CStr(Val(rq) - 1)
.Fields("MS") = CStr(Val(rq) - 1) + "日余额"
End With

Else
If FLAG = 1 Then
temp.Fields("je") = temp.Fields("je") + Val(JE)
Else
temp.Fields("je") = temp.Fields("je") - Val(JE)
End If


End If


temp.Update
temp.Close
Set temp = Nothing
End Sub

⌨️ 快捷键说明

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