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

📄 frm_deluser.frm

📁 提供给入门级别的GPRS编程人员
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Width           =   960
         End
         Begin VB.Label Label11 
            BackStyle       =   0  'Transparent
            Caption         =   "联系电话:"
            Height          =   240
            Left            =   360
            TabIndex        =   41
            Top             =   1650
            Width           =   960
         End
         Begin VB.Label Label12 
            BackStyle       =   0  'Transparent
            Caption         =   "联系手机:"
            Height          =   240
            Left            =   360
            TabIndex        =   40
            Top             =   2250
            Width           =   975
         End
         Begin VB.Label Label13 
            BackStyle       =   0  'Transparent
            Caption         =   "用户密码:"
            Height          =   345
            Left            =   360
            TabIndex        =   39
            Top             =   2760
            Width           =   960
         End
         Begin VB.Label Label14 
            BackStyle       =   0  'Transparent
            Caption         =   "用户SIM号:"
            Height          =   330
            Left            =   360
            TabIndex        =   38
            Top             =   3270
            Width           =   1275
         End
         Begin VB.Label Label15 
            BackStyle       =   0  'Transparent
            Caption         =   "电价:"
            Height          =   300
            Left            =   360
            TabIndex        =   37
            Top             =   3750
            Width           =   870
         End
         Begin VB.Label Label16 
            BackStyle       =   0  'Transparent
            Caption         =   "用户线路:"
            Height          =   300
            Left            =   5700
            TabIndex        =   36
            Tag             =   "STRETCHH"
            Top             =   3750
            Width           =   945
         End
         Begin VB.Label Label17 
            BackStyle       =   0  'Transparent
            Caption         =   "用户台区:"
            Height          =   330
            Left            =   360
            TabIndex        =   35
            Top             =   4245
            Width           =   960
         End
         Begin VB.Label Label18 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表编号:"
            Height          =   330
            Left            =   5700
            TabIndex        =   34
            Tag             =   "STRETCHH"
            Top             =   360
            Width           =   1185
         End
         Begin VB.Label Label19 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表型号:"
            Height          =   210
            Left            =   5700
            TabIndex        =   33
            Tag             =   "STRETCHH"
            Top             =   960
            Width           =   1185
         End
         Begin VB.Label Label20 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表常数:"
            Height          =   165
            Left            =   5700
            TabIndex        =   32
            Tag             =   "STRETCHH"
            Top             =   1455
            Width           =   1185
         End
         Begin VB.Label Label21 
            BackStyle       =   0  'Transparent
            Caption         =   "变压器编号:"
            Height          =   180
            Left            =   5700
            TabIndex        =   31
            Tag             =   "STRETCHH"
            Top             =   2040
            Width           =   1185
         End
         Begin VB.Label Label22 
            BackStyle       =   0  'Transparent
            Caption         =   "变压器型号:"
            Height          =   210
            Left            =   5700
            TabIndex        =   30
            Tag             =   "STRETCHH"
            Top             =   2655
            Width           =   1185
         End
         Begin VB.Label Label23 
            BackStyle       =   0  'Transparent
            Caption         =   "互感器比例:"
            Height          =   330
            Left            =   5700
            TabIndex        =   29
            Tag             =   "STRETCHH"
            Top             =   3150
            Width           =   1185
         End
         Begin VB.Label Label24 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表起始读数有功:"
            Height          =   285
            Left            =   360
            TabIndex        =   28
            Top             =   5325
            Width           =   1950
         End
         Begin VB.Label Label25 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表起始读数无功:"
            Height          =   285
            Left            =   5700
            TabIndex        =   27
            Tag             =   "STRETCHH"
            Top             =   5325
            Width           =   1815
         End
         Begin VB.Label Label26 
            BackStyle       =   0  'Transparent
            Caption         =   "电能表起用日期:"
            Height          =   240
            Left            =   5700
            TabIndex        =   26
            Tag             =   "STRETCHH"
            Top             =   4935
            Width           =   1485
         End
         Begin VB.Label Label1 
            BackStyle       =   0  'Transparent
            Caption         =   "用户地址:"
            Height          =   225
            Left            =   360
            TabIndex        =   25
            Top             =   4680
            Width           =   960
         End
         Begin VB.Label Label2 
            BackStyle       =   0  'Transparent
            Caption         =   "开户日期:"
            Height          =   330
            Left            =   5700
            TabIndex        =   24
            Tag             =   "STRETCHH"
            Top             =   4245
            Width           =   1185
         End
      End
      Begin VB.TextBox txt_qurry 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   5760
         MaxLength       =   12
         TabIndex        =   1
         Top             =   360
         Width           =   2055
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "请输入请求消户的客户信息:"
         Height          =   375
         Left            =   360
         TabIndex        =   2
         Top             =   480
         Width           =   2535
      End
   End
End
Attribute VB_Name = "frm_deluser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    frm_deluser.xpcmdbutton1.Enabled = False
    frm_deluser.txt_id.Text = ""
    frm_deluser.txt_name.Text = ""
    frm_deluser.txt_addr.Text = ""
    frm_deluser.txt_tel.Text = ""
    frm_deluser.txt_mobile.Text = ""
    frm_deluser.txt_pw.Text = ""
    frm_deluser.txt_biaohao.Text = ""
    frm_deluser.txt_biaoconst.Text = ""
    frm_deluser.txt_biaosnumy.Text = ""
    frm_deluser.txt_biaosnumn.Text = ""
    frm_deluser.txt_byqid.Text = ""
    frm_deluser.txt_byqxinghao.Text = ""
    frm_deluser.txt_hgqbili.Text = ""
    frm_deluser.txt_sim.Text = ""
    frm_deluser.txt_price.Text = ""
    frm_deluser.txt_biaotime.Text = ""
    frm_deluser.txt_usertime.Text = ""
    frm_deluser.txt_usertime.Text = ""
    frm_deluser.txt_line.Text = ""
    frm_deluser.txt_taiqu.Text = ""
End Sub

Private Sub txt_id_KeyPress(KeyAscii As Integer)
   If KeyAscii <> 0 Then KeyAscii = 0
End Sub

Private Sub txt_id_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Or Button = 2 Then
'        MsgBox ("您不能修改客户编号"), vbOKOnly + vbInformation, "提示"
        Exit Sub
    End If
End Sub

Private Sub xpcmdbutton1_Click() '消户
    Dim strsql As String
    Dim idel As Integer
    idel = MsgBox("该操作将删除该用户的所有资料,您确实要消户吗?", vbYesNo + vbQuestion, "提示")
    If idel = vbYes Then
        '删除该用户所有相关记录//////////////////////////////////////////////////
        strsql = "select * from userbasic where user_id='" & Trim(txt_id.Text) & "'" '找到原始记录
        openrs strsql
        rs.Delete '删除原始记录
        rs.UpdateBatch
        clors
        strsql = "select * from userpower where user_id='" & Trim(txt_id.Text) & "'" '找到原始记录
        openrs strsql
        While Not rs.EOF And Not rs.BOF
            rs.Delete '删除原始记录
            rs.UpdateBatch
            rs.MoveNext
        Wend
        clors
        strsql = "select * from collection where user_id='" & Trim(txt_id.Text) & "'" '找到原始记录
        openrs strsql
        While Not rs.EOF And Not rs.BOF
            rs.Delete '删除原始记录
            rs.UpdateBatch
            rs.MoveNext
        Wend
        clors
        
        MsgBox ("已经删除该用户!"), vbOKOnly + vbInformation, "提示"
        Exit Sub
    End If
    If idel = vbNo Then
        Exit Sub
    End If
End Sub

Private Sub xpcmdbutton4_Click() '查询用户资料
    Dim strsql
    If Option1.Value = False And Option2.Value = False Then
       MsgBox ("您没有选择查询条件!"), vbOKOnly + vbInformation, "提示"
       Exit Sub
    End If
    If Trim(txt_qurry.Text) = "" Then
       MsgBox ("查询值不能为空!"), vbOKOnly + vbInformation, "提示"
       Exit Sub
    End If
    If Option1.Value = True Then
       strsql = "select * from userbasic where user_id='" & Trim(txt_qurry.Text) & "'"
       openrs strsql
       If rs.EOF Then
          MsgBox ("不存在该用户!"), vbOKOnly + vbInformation, "提示"
          clors
          Exit Sub
       End If
    End If
    If Option2.Value = True Then
       strsql = "select * from userbasic where user_sim='" & Trim(txt_qurry.Text) & "'"
       openrs strsql
       If rs.EOF Then
          MsgBox ("不存在该用户!"), vbOKOnly + vbInformation, "提示"
          clors
          Exit Sub
       End If
    End If
    txt_id.Text = rs.Fields("user_id").Value
    txt_name.Text = rs.Fields("user_name").Value
    txt_addr.Text = rs.Fields("user_addr").Value
    txt_tel.Text = rs.Fields("user_tel").Value
    txt_mobile.Text = rs.Fields("user_mobile").Value
    txt_pw.Text = rs.Fields("user_dtupw").Value
    txt_biaohao.Text = rs.Fields("user_biaohao").Value
    txt_biaoxinghao.Text = rs.Fields("user_biaoxinghao").Value
    txt_biaoconst.Text = rs.Fields("user_biaoconst").Value
    txt_biaosnumy.Text = rs.Fields("user_biaosnumy").Value
    txt_biaosnumn.Text = rs.Fields("user_biaosnumn").Value
    txt_byqid.Text = rs.Fields("user_byqid").Value
    txt_byqxinghao.Text = rs.Fields("user_byqxinghao").Value
    txt_hgqbili.Text = rs.Fields("user_hgqbili").Value
    txt_sim.Text = rs.Fields("user_sim").Value
    txt_price.Text = rs.Fields("user_powerprice").Value
'    txt = rs.Fields("user_powernum").Value
    txt_biaotime.Text = rs.Fields("user_biaostime")
    txt_usertime.Text = rs.Fields("user_regtime").Value
    txt_line.Text = rs.Fields("user_line").Value
    txt_taiqu.Text = rs.Fields("user_taiqu").Value
    xpcmdbutton1.Enabled = True
End Sub

⌨️ 快捷键说明

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