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

📄 n_fjfp.frm

📁 杭州舟远信息技术连锁有限公司的棋牌管理系统源代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Width           =   975
      End
      Begin VB.TextBox Text4 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   1
         EndProperty
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   3240
         TabIndex        =   17
         Top             =   480
         Width           =   975
      End
      Begin VB.ComboBox Combo1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Index           =   1
         Left            =   5040
         TabIndex        =   2
         Top             =   480
         Width           =   1335
      End
      Begin VB.CommandButton Command3 
         Caption         =   "确认"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   6600
         TabIndex        =   1
         Top             =   480
         Width           =   735
      End
   End
   Begin VB.Line Line1 
      X1              =   122.339
      X2              =   7829.708
      Y1              =   2160
      Y2              =   2160
   End
   Begin VB.Label Label5 
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   4680
      TabIndex        =   14
      Top             =   120
      Width           =   3015
   End
End
Attribute VB_Name = "N_CZSZ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Combo1_click(Index As Integer)
On Error Resume Next
Dim lx_rec  As ADODB.Recordset

If Index <> 0 Then
GoTo endless
End If

'Set lx_rec = PUB_data.OpenRecordset("SELECT * FROM  N_FJZL WHERE FJZL='" & Trim(Combo1(0).Text) & "'", 2, 0, 2)
Set lx_rec = New ADODB.Recordset
             lx_rec.Source = "SELECT * FROM  N_CZZL WHERE CZZL='" & Trim(Combo1(0).Text) & "'"
             Set lx_rec.ActiveConnection = objConn
             lx_rec.CursorType = adOpenDynamic
             lx_rec.LockType = adLockOptimistic
             lx_rec.Open
If lx_rec.EOF Then
lx_rec.Close
Set lx_rec = Nothing
GoTo endless
End If

Text1.Text = lx_rec.Fields("CZZL")
'Text2.Text = lx_rec.Fields("fjjg")
Command1(0).Enabled = True
endless:

End Sub

Private Sub Combo2_Click()
Dim lx_rec  As ADODB.Recordset

'MsgBox "SELECT * FROM  N_FJ WHERE FHID='" & Trim(Combo2.Text) & "'"
'Set lx_rec = PUB_data.OpenRecordset("SELECT * FROM  N_FJ WHERE FHID='8102'", 2, 0, 2)
'Set lx_rec = PUB_data.OpenRecordset("SELECT * FROM  N_FJ WHERE FHID='" & Trim(Combo2.Text) & "'", 2, 0, 2)
 Set lx_rec = New ADODB.Recordset
             lx_rec.Source = "SELECT * FROM  N_CZ WHERE FHID='" & Trim(Combo2.Text) & "'"
             Set lx_rec.ActiveConnection = objConn
             lx_rec.CursorType = adOpenDynamic
             lx_rec.LockType = adLockOptimistic
             lx_rec.Open

If lx_rec.EOF Then
GoTo endless
End If

With lx_rec
    Combo1(2).Text = IIf(IsNull(.Fields("FMS")), "", .Fields("FMS"))
    'Text5.Text = IIf(IsNull(.Fields("FJG")), "", .Fields("FJG"))
    Text6.Text = IIf(IsNull(.Fields("FJMS")), "", .Fields("FJMS"))
End With
endless:
lx_rec.Close
Set lx_rec = Nothing
End Sub

Private Sub Command1_Click(Index As Integer)
On Error Resume Next
Dim jg_rec As ADODB.Recordset

Select Case Index
Case 0
    Set jg_rec = New ADODB.Recordset
    jg_rec.Source = "SELECT * FROM  N_CZZL WHERE CZZL='" & Trim(Combo1(0).Text) & "'"
    Set jg_rec.ActiveConnection = objConn
    jg_rec.CursorType = adOpenDynamic
    jg_rec.LockType = adLockOptimistic
    jg_rec.Open
    If jg_rec.EOF Then
    jg_rec.Close
    Set jg_rec = Nothing
    GoTo endless
    End If
    jg_rec.Delete
    jg_rec.Update
Case 1
    Command1(2).Enabled = True
    Text1.Text = ""
    'Text2.Text = ""
    GoTo endless
Case 2
    Set jg_rec = New ADODB.Recordset
    jg_rec.Source = "SELECT * FROM  N_CZZL"
    Set jg_rec.ActiveConnection = objConn
    jg_rec.CursorType = adOpenDynamic
    jg_rec.LockType = adLockOptimistic
    jg_rec.Open
    If Text1.Text = "" Then
    MsgBox "棋牌桌类型不能为空!"
    jg_rec.Close
    Set jg_rec = Nothing
    GoTo endless
    End If
    jg_rec.AddNew
    jg_rec.Fields("CZZL") = Text1.Text
    'jg_rec.Fields("FJJG") = Text2.Text
    jg_rec.Update
End Select
jg_rec.Close
Set jg_rec = Nothing
Call Form_Load
endless:
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
On Error Resume Next
If Text4.Text = "" Or Text3.Text = "" Then
Label5.Visible = True
Label5.Caption = "棋牌桌号输入有错!"
GoTo endless
End If

If Text4.Text < Text3.Text Then
Label5.Visible = True
Label5.Caption = "结束棋牌桌号小于开始棋牌桌号,错误!"
GoTo endless
End If


Dim TEMP_I1 As Integer
Dim TEMP_I2 As Integer
TEMP_I1 = 200 - CInt(Text5.Text)
TEMP_I2 = Text4.Text - Text3.Text
If TEMP_I1 <= TEMP_I2 Then
Label5.Visible = True
Label5.Caption = "分配棋牌桌数大于可分配棋牌桌数,错误!"
GoTo endless
End If

Dim i_s As Integer
Dim i_e As Integer
i_s = Text3.Text
i_e = Text4.Text
Dim jg_rec As ADODB.Recordset
Dim FJG  As ADODB.Recordset
Dim fj_temp  As ADODB.Recordset
Set jg_rec = New ADODB.Recordset
jg_rec.Source = "SELECT * FROM  N_CZ "
Set jg_rec.ActiveConnection = objConn
jg_rec.CursorType = adOpenDynamic
jg_rec.LockType = adLockOptimistic
jg_rec.Open

CON_LOOP:
Do While i_s <= i_e
'Set fj_temp = PUB_data.OpenRecordset("SELECT * FROM  N_FJ WHERE FHID='" & CStr(i_s) & "'", 2, 0, 2)
 Set fj_temp = New ADODB.Recordset
             fj_temp.Source = "SELECT * FROM  N_CZ WHERE FHID='" & CStr(i_s) & "'"
             Set fj_temp.ActiveConnection = objConn
             fj_temp.CursorType = adOpenDynamic
            fj_temp.LockType = adLockOptimistic
             fj_temp.Open
If Not fj_temp.EOF Then
i_s = i_s + 1
GoTo CON_LOOP
End If
'Set FJG = PUB_data.OpenRecordset("SELECT * FROM  N_FJZL WHERE FJZL='" & Trim(Combo1(1).Text) & "'", 2, 0, 2)
 Set FJG = New ADODB.Recordset
             FJG.Source = "SELECT * FROM  N_CZZL WHERE FJZL='" & Trim(Combo1(1).Text) & "'"
             Set FJG.ActiveConnection = objConn
             FJG.CursorType = adOpenDynamic
             FJG.LockType = adLockOptimistic
             FJG.Open
jg_rec.AddNew
With jg_rec
    .Fields("FHID") = CStr(i_s)
    .Fields("FMS") = Trim(Combo1(1).Text)
    .Fields("FZT") = 0
End With
jg_rec.Update
i_s = i_s + 1
Loop
jg_rec.Close
Set jg_rec = Nothing
FJG.Close
Set FJG = Nothing
Call dt_main.fj_road
Label5.Visible = True
Label5.Caption = "棋牌桌添加成功,可选择单独桌号,详细修改信息!"
Call Form_Load
endless:
End Sub

Private Sub Command4_Click()
On Error Resume Next
Dim jg_rec As ADODB.Recordset
Set jg_rec = New ADODB.Recordset
jg_rec.Source = "SELECT * FROM  N_CZ WHERE FHID='" & Trim(Combo2.Text) & "'"
Set jg_rec.ActiveConnection = objConn
jg_rec.CursorType = adOpenDynamic
jg_rec.LockType = adLockOptimistic
jg_rec.Open
If jg_rec.EOF Then
GoTo endless
End If
With jg_rec
    .Fields("FMS") = Combo1(2).Text
    '.Fields("FJG") = Text5.Text
    .Fields("FJMS") = Text6.Text
End With
jg_rec.Update
Label5.Visible = True
Label5.Caption = "棋牌桌性质修改成功!"
endless:
jg_rec.Close
Set jg_rec = Nothing
End Sub

Private Sub Command5_Click()
On Error Resume Next
Dim jg_rec As ADODB.Recordset
Set jg_rec = New ADODB.Recordset
jg_rec.Source = "SELECT * FROM  N_CZ WHERE FHID='" & Trim(Combo2.Text) & "'"
Set jg_rec.ActiveConnection = objConn
jg_rec.CursorType = adOpenDynamic
jg_rec.LockType = adLockOptimistic
jg_rec.Open
If jg_rec.EOF Then
GoTo endless
End If
jg_rec.Delete
jg_rec.Update
Label5.Visible = True
Label5.Caption = "棋牌桌删除成功!"
Call Form_Load
Call dt_main.fj_road
endless:
jg_rec.Close
Set jg_rec = Nothing
End Sub

Private Sub command6_Click()
 If Text1.Text = "" Then
    MsgBox "类型名不能为空,错误!"
    Exit Sub
 End If
 
 Dim lxxg As ADODB.Recordset
 Set lxxg = New ADODB.Recordset
 lxxg.Source = "select * from N_CZZL where CZZL='" & Trim(Combo1(0).Text) & "'"
 Set lxxg.ActiveConnection = objConn
 lxxg.CursorType = adOpenDynamic
 lxxg.LockType = adLockOptimistic
 lxxg.Open
 If lxxg.EOF Then
    MsgBox "记录未找到,错误!"
    Exit Sub
 End If
 lxxg.Fields("CZZL") = Trim(Text1.Text)
 lxxg.Update
 lxxg.Close
 Set lxxg = Nothing
 Call Form_Load
End Sub

Private Sub Form_Load()
On Error Resume Next
Skin1.LoadSkin App.Path + "\棋牌界面"
Skin1.ApplySkin hWnd
Dim count_rec  As ADODB.Recordset
Command1(2).Enabled = False
Combo1(0).Clear
Combo1(1).Clear
Combo1(2).Clear
Combo2.Clear
Text1.Text = ""
'Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
'Text5.Text = ""
Label5.Visible = False
Call N_GetCMSG("N_CZZL", "CZZL", Combo1(0))
Call N_GetCMSG("N_CZZL", "CZZL", Combo1(1))
Call N_GetCMSG("N_CZZL", "CZZL", Combo1(2))

Call N_GetCMSG("N_CZ", "FHID", Combo2)

'Set count_rec = PUB_data.OpenRecordset("SELECT * From N_FJ", 2, 0, 2)
Set count_rec = New ADODB.Recordset
             count_rec.Source = "SELECT COUNT(*) FROM N_CZ"
             Set count_rec.ActiveConnection = objConn
             count_rec.CursorType = adOpenDynamic
             count_rec.LockType = adLockOptimistic
             count_rec.Open

'count_rec.RecordCount
Text5.Text = count_rec.Fields(0)
count_rec.Close
Set count_rec = Nothing
'
'
'
End Sub

⌨️ 快捷键说明

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