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

📄 n_sqr.frm

📁 杭州舟远信息技术连锁有限公司的棋牌管理系统源代码
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Begin VB.Form N_SQR 
   Caption         =   "折扣授权人"
   ClientHeight    =   2175
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   2955
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2175
   ScaleWidth      =   2955
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   270
      Index           =   3
      Left            =   2160
      TabIndex        =   9
      Text            =   "%"
      Top             =   1200
      Width           =   255
   End
   Begin VB.TextBox Text3 
      Height          =   270
      Left            =   1440
      TabIndex        =   8
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   270
      Index           =   2
      Left            =   240
      TabIndex        =   7
      Text            =   "折扣授权人"
      Top             =   720
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   270
      Index           =   1
      Left            =   240
      TabIndex        =   6
      Text            =   "最低折扣率"
      Top             =   1200
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   270
      Index           =   0
      Left            =   240
      TabIndex        =   5
      Text            =   "折扣授权人"
      Top             =   240
      Width           =   1095
   End
   Begin ACTIVESKINLibCtl.Skin Skin1 
      Left            =   2760
      OleObjectBlob   =   "N_SQR.frx":0000
      Top             =   1440
   End
   Begin VB.CommandButton Command1 
      Caption         =   "删除"
      Height          =   375
      Index           =   2
      Left            =   1080
      TabIndex        =   4
      Top             =   1560
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改"
      Height          =   375
      Index           =   1
      Left            =   1920
      TabIndex        =   3
      Top             =   1560
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加"
      Height          =   375
      Index           =   0
      Left            =   240
      TabIndex        =   2
      Top             =   1560
      Width           =   735
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Left            =   1440
      TabIndex        =   1
      Top             =   720
      Width           =   1095
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1440
      Style           =   2  'Dropdown List
      TabIndex        =   0
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "N_SQR"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_click()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Source = "select * from dt_tsfw where tsfw='" & Trim(Combo1.Text) & "'"
Set rs.ActiveConnection = objConn
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic
rs.Open

 Text2.Text = Combo1.Text
 Text3.Text = IIf(IsNull(rs.Fields("zdzk")) = True, "*", rs.Fields("zdzk"))
 rs.Close
 Set rs = Nothing
End Sub


Private Sub Command1_Click(Index As Integer)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
'rs.Source = sql
'Set rs.ActiveConnection = objConn
'rs.CursorType = adOpenDynamic
'rs.LockType = adLockOptimistic

 Select Case Index
   Case 0
     If Trim(Text2.Text) = "" Then
        MsgBox "错误:授权人不能为空!"
        Exit Sub
     End If
     
     If Trim(Text3.Text) = "" Then
        MsgBox "请输入授权折扣率!"
        Exit Sub
     End If
     
     sql = "select * from DT_TSFW where TSFW='" & Trim(Text2.Text) & "'"
     rs.Source = sql
     Set rs.ActiveConnection = objConn
     rs.CursorType = adOpenDynamic
     rs.LockType = adLockOptimistic
     rs.Open
     
     If Not rs.EOF Then
     MsgBox "错误:此授权人已存在!"
     Exit Sub
     Else
     rs.AddNew
     rs.Fields("tsfw") = Trim(Text2.Text)
     rs.Fields("zdzk") = Trim(Text3.Text)
     rs.Update
     End If
     Text2.Text = ""
     Text3.Text = ""
     Combo1.Clear
     Call PUB_GetCMSG("DT_TSFW", "TSFW", Combo1)
  Case 1
     Dim rs1 As ADODB.Recordset
     Set rs1 = New ADODB.Recordset
     rs1.Source = "select * from DT_TSFW where TSFW='" & Trim(Text2.Text) & "'and zdzk='" & Trim(Text3.Text) & "'"
     Set rs1.ActiveConnection = objConn
     rs1.CursorType = adOpenDynamic
     rs1.LockType = adLockOptimistic
     rs1.Open
     If Not rs1.EOF Then
        MsgBox "错误:记录已存在!"
        Exit Sub
     End If
     
     sql = "select * from DT_TSFW where TSFW='" & Trim(Combo1.Text) & "'"
     rs.Source = sql
     Set rs.ActiveConnection = objConn
     rs.CursorType = adOpenDynamic
     rs.LockType = adLockOptimistic
     rs.Open
     
     If rs.EOF Then
        MsgBox "错误:记录不存在!"
        Exit Sub
     Else
        rs.Fields("tsfw") = Trim(Text2.Text)
        rs.Fields("zdzk") = Trim(Text3.Text)
        rs.Update
    End If
    Text2.Text = ""
    Text3.Text = ""
     Combo1.Clear
     Call PUB_GetCMSG("DT_TSFW", "TSFW", Combo1)
  Case 2
     sql = "select * from DT_TSFW where TSFW='" & Trim(Combo1.Text) & "'"
     rs.Source = sql
     Set rs.ActiveConnection = objConn
     rs.CursorType = adOpenDynamic
     rs.LockType = adLockOptimistic
     rs.Open
     
     If Not rs.EOF Then
        rs.Delete
        rs.Update
     Else
        MsgBox "未找到记录!"
        Exit Sub
     End If
     Text2.Text = ""
     Text3.Text = ""
     Combo1.Clear
     Call PUB_GetCMSG("DT_TSFW", "TSFW", Combo1)
End Select
End Sub

Private Sub Form_Load()
 Call PUB_GetCMSG("DT_TSFW", "TSFW", Combo1)
 Skin1.LoadSkin App.Path + "\棋牌界面"
Skin1.ApplySkin hWnd
End Sub

Private Sub Text2_Click()
 If Text2.SelLength = 0 Then
  Text2.SelStart = 0
  Text2.SelLength = Len(Text2.Text)
 Else
  Text2.SelStart = Len(Text2.Text) + 1
  Text2.SelLength = 0
 End If
End Sub

⌨️ 快捷键说明

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