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

📄 createuser.frm

📁 适合乡镇供电所使用电费处理系统v3 软件
💻 FRM
📖 第 1 页 / 共 5 页
字号:
         EndProperty
         Height          =   315
         IMEMode         =   2  'OFF
         Index           =   0
         Left            =   1215
         MaxLength       =   4
         TabIndex        =   0
         ToolTipText     =   "用户编码为4位!"
         Top             =   345
         Width           =   3060
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         IMEMode         =   1  'ON
         Index           =   2
         Left            =   1215
         TabIndex        =   2
         ToolTipText     =   "比如xx加工厂,xx公司."
         Top             =   1245
         Width           =   3060
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         IMEMode         =   1  'ON
         Index           =   3
         Left            =   1200
         TabIndex        =   3
         Top             =   1680
         Width           =   3060
      End
      Begin VB.Label Label11 
         Caption         =   "台变类型:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   -1  'True
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   240
         Left            =   150
         TabIndex        =   53
         Top             =   2145
         Width           =   1035
      End
      Begin VB.Label Label8 
         Caption         =   "台区:"
         Height          =   180
         Left            =   150
         TabIndex        =   30
         Top             =   2505
         Width           =   825
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "用户简称:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   -1  'True
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   195
         Left            =   150
         TabIndex        =   23
         Top             =   930
         Width           =   1005
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "用户地址:"
         Height          =   210
         Left            =   150
         TabIndex        =   22
         Top             =   1785
         Width           =   915
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "全称:"
         Height          =   210
         Left            =   150
         TabIndex        =   21
         Top             =   1335
         Width           =   645
      End
      Begin VB.Label Label16 
         BackStyle       =   0  'Transparent
         Caption         =   "用户编码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   -1  'True
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   255
         Left            =   165
         TabIndex        =   20
         Top             =   390
         Width           =   1005
      End
   End
   Begin VB.Label Label18 
      Caption         =   "注意:凡标记为红色的即是必输项目!."
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   240
      Index           =   0
      Left            =   135
      TabIndex        =   32
      Top             =   5880
      Width           =   3000
   End
End
Attribute VB_Name = "CreateUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'抄表号
Dim MeterID As String
'主表标识
Dim zMeter As Boolean
'自动编码
Dim AutoCoding As Boolean
Dim jls As Long, hjs As Long, zis As Long
Dim XSBS As String

Private Sub Check1_Click()
    SaveSetting App.EXEName, "SysStart", "AutoCode", Check1.Value
    If Check1.Value = 1 Then
       Text1(4).Enabled = False
    Else
       Text1(4).Enabled = True
    End If
End Sub

Private Sub Command2_Click(Index As Integer)
    On Error Resume Next
    Select Case Index
           Case 0
                If Len(Combo1(1)) = 0 Or Len(Combo1(2)) = 0 Then
                   If Len(Combo1(1)) = 0 Then
                      MsgBox "请选择电表类型!", vbCritical
                      Combo1(1).SetFocus
                      Exit Sub
                   End If
                   If Len(Combo1(2)) = 0 Then
                      MsgBox "请选择电价类型!", vbCritical
                      Combo1(2).SetFocus
                      Exit Sub
                   End If
                End If
                If Len(Text1(5)) = 0 Or Len(Text1(6)) = 0 Or Len(Text1(7)) = 0 Then
                   If MsgBox("数据输入不完整,系统将采用默认值,确定吗?(Y/N)", vbInformation + vbDefaultButton1 + vbYesNo) = vbYes Then
                        '标识主表,在保存时若用户为多表只,增加只在主表字段中标识一次
                      If zMeter = True Then
                           '调用保存主表过程
                         Call AppeData(True)
                            '清现场
                         Text1(4) = ""
                         Text1(5) = ""
                         Text1(6) = ""
                         Text1(7) = ""
                         If Check1.Value = 1 Then
                            Text1(4).Text = Format(zis + 1, "000000")
                            zis = Val(Text1(4))
                            Combo1(1).SetFocus
                         Else
                            Text1(4).Enabled = True
                            Text1(4).SetFocus
                         End If
                            '置主表为
                         zMeter = False
                      Else   '若不是主表(多表)
                            '调用保存从表过程
                            '清现场
                            Call AppeData(False)
                            Text1(4) = ""
                            Text1(5) = ""
                            Text1(6) = ""
                            Text1(7) = ""
                            If Check1.Value = 1 Then
                               Text1(4).Text = Format(zis + 1, "000000")
                               zis = Val(Text1(4))
                               Combo1(1).SetFocus
                            Else
                               Text1(4).Enabled = True
                               Text1(4).SetFocus
                            End If
                      End If
                   Else    '不保存
                      If Len(Text1(5)) = 0 Then
                         Text1(5).SetFocus
                         Exit Sub
                      End If
                      If Len(Text1(6)) = 0 Then
                         Text1(6).SetFocus
                         Exit Sub
                      End If
                      If Len(Text1(7)) = 0 Then
                         Text1(7).SetFocus
                         Exit Sub
                      End If
                   End If
                Else   '如都不为空,则判断是否主表后清空保存后
                      If zMeter = True Then
                            '调用保存主表过程
                            Call AppeData(True)
                            '清现场
                            Text1(4) = ""
                            Text1(5) = ""
                            Text1(6) = ""
                            Text1(7) = ""
                            Dim Uselect As Integer
                            Uselect = MsgBox("       该用户电表资料已保存!若该用户有多只电表" & Chr(13) & "请按[是]按钮开始增加下一块电表资料,否则请按" & Chr(13) & "[否]按钮增加新的用户资料!", vbInformation + vbYesNo + vbDefaultButton2)
                            If Uselect = 6 Then
                                If Check1.Value = 1 Then
                                   Text1(4).Text = Format(zis + 1, "000000")
                                   zis = Val(Text1(4))
                                   Combo1(1).SetFocus
                                Else
                                   Text1(4).Enabled = True
                                   Text1(4).SetFocus
                                End If
                             Else
                                Frame1.Enabled = True
                                Frame2.Enabled = False
                                Text1(0).Text = ""
                                Text1(0).SetFocus
                             End If
                            '置主表为
                            
                            zMeter = False
                      Else   '若不是主表(多表)
                            '调用保存从表过程
                            Call AppeData(False)
                            '清现场
                            Text1(4) = ""
                            Text1(5) = ""
                            Text1(6) = ""
                            Text1(7) = ""
                            Uselect = MsgBox("       该用户电表资料已保存!若该用户有多只电表" & Chr(13) & "请按[是]按钮开始增加下一块电表资料,否则请按" & Chr(13) & "[否]按钮增加新的用户资料!", vbInformation + vbYesNo + vbDefaultButton2)
                            If Uselect = 6 Then
                                If Check1.Value = 1 Then
                                   Text1(4).Text = Format(zis + 1, "000000")
                                   zis = Val(Text1(4))
                                   Combo1(1).SetFocus
                                Else
                                   Text1(4).Enabled = True
                                   Text1(4).SetFocus
                                End If
                             Else
                                Frame1.Enabled = True
                                Frame2.Enabled = False
                                Text1(0).Text = ""
                                Text1(0).SetFocus
                             End If
                      End If
                
                End If
    Case 1
         Command2(0).Enabled = False
         Frame2.Enabled = False
         Frame1.Enabled = True
         Text1(0) = ""
         Text1(1) = ""
         Text1(2) = ""
         Text1(3) = ""
         Combo1(0).Text = ""
         Text1(0).SetFocus
    End Select

⌨️ 快捷键说明

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