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

📄 dlginit.frm

📁 针对农资系统的商品进销存管理系统软件
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form DlgInit 
   AutoRedraw      =   -1  'True
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "系统初始设置"
   ClientHeight    =   2400
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   5355
   Icon            =   "DlgInit.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "DlgInit"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   160
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   357
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin MSComCtl2.DTPicker DTStartDate 
      Height          =   255
      Left            =   3480
      TabIndex        =   11
      Top             =   1155
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   450
      _Version        =   393216
      Format          =   55771136
      CurrentDate     =   36954
   End
   Begin VB.TextBox ID_UNIT_NAME 
      BackColor       =   &H80000018&
      Height          =   270
      Left            =   1320
      TabIndex        =   0
      Top             =   795
      Width           =   3855
   End
   Begin VB.TextBox ID_MASTER 
      BackColor       =   &H80000018&
      Height          =   270
      Left            =   1320
      TabIndex        =   1
      Top             =   1155
      Width           =   1215
   End
   Begin VB.TextBox ID_PASSWORD 
      BackColor       =   &H80000018&
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1485
      Width           =   1215
   End
   Begin VB.TextBox ID_PASSWORD1 
      BackColor       =   &H80000018&
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1830
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   375
      Left            =   2760
      TabIndex        =   4
      Top             =   1800
      Width           =   855
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   4200
      TabIndex        =   5
      Top             =   1800
      Width           =   855
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "启用日期"
      Height          =   255
      Left            =   2640
      TabIndex        =   12
      Top             =   1200
      Width           =   735
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "    您是首次运行本系统,请您输入您的单位名称与主管人员。这些信息非常重要,请仔细填写。"
      Height          =   495
      Left            =   300
      TabIndex        =   10
      Top             =   285
      Width           =   4995
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "验证密码"
      Height          =   255
      Left            =   360
      TabIndex        =   9
      Top             =   1830
      Width           =   855
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "密    码"
      Height          =   255
      Left            =   360
      TabIndex        =   8
      Top             =   1485
      Width           =   855
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "超级主管"
      Height          =   255
      Left            =   360
      TabIndex        =   7
      Top             =   1155
      Width           =   855
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "单位名称"
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   795
      Width           =   855
   End
End
Attribute VB_Name = "DlgInit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public m_bOK As Boolean
Dim m_rDepartAttribSet As ADODB.Recordset
Public m_sUnitName  As String
Public m_sMaster    As String
Public m_sPassword  As String
Public m_sPassWord1 As String
Private Sub Form_Load()
m_bOK = False
DTStartDate.Value = Date
m_sUnitName = ""
m_sMaster = ""
m_sPassword = ""
m_sPassWord1 = ""
End Sub
Private Sub cmdCancel_Click()
    m_bOK = False
    Me.Hide
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        SendKeys "{Tab}"
    End If
End Sub
Private Sub cmdOK_Click()
    Dim sMsg As String
    sMsg = ""
    m_sMaster = ID_MASTER.Text
    m_sUnitName = ID_UNIT_NAME.Text
    m_sPassword = ID_PASSWORD.Text
    m_sPassWord1 = ID_PASSWORD1.Text
    If m_sUnitName = "" Then
       sMsg = "请输入单位名称!"
       GoTo FAILED
    End If
    If m_sMaster = "" Then
       sMsg = "请输入主管名称!"
       GoTo FAILED
    End If
    If Len(m_sPassword) < 1 Then
       sMsg = "请输入密码!"
       GoTo FAILED
    End If
    If m_sPassword <> m_sPassWord1 Then
       sMsg = "密码设置错误!"
       GoTo FAILED
    End If
SUCCESS:
    Dim rTmpSet As ADODB.Recordset
    Dim StartDate As Date, LastDate As Date
    StartDate = DTStartDate.Value
    LastDate = StartDate - Day(StartDate)
    StartDate = LastDate + 1
    Set rTmpSet = New ADODB.Recordset
    rTmpSet.Open "Select * From System", m_gDBCnn, adOpenDynamic, adLockOptimistic, adCmdUnknown
    rTmpSet.AddNew
    rTmpSet![FSupperManager] = Trim(m_sMaster)
    rTmpSet![FPassword] = Trim(m_sPassword)
    rTmpSet![FUserUnitName] = Trim(m_sUnitName)
    rTmpSet![FSetupDate] = Format(Date, "YYYY-MM-DD")
    rTmpSet![FBuildAccDate] = Format(StartDate, "YYYY-MM-DD")
    rTmpSet![FCloseAccDate] = Format(LastDate, "YYYY-MM-DD")
    rTmpSet.Update
    SavePrivateSetting SYSTEM_SECTION, "LoginDate", StartDate
    m_bOK = True
    Me.Hide
    Exit Sub
FAILED:
   MsgBox sMsg, vbOKOnly + vbCritical, "提示:"
End Sub
Private Sub ID_MASTER_KeyPress(KeyAscii As Integer)
   Form_KeyPress (KeyAscii)
End Sub
Private Sub ID_PASSWORD_KeyPress(KeyAscii As Integer)
   Form_KeyPress (KeyAscii)
End Sub
Private Sub ID_PASSWORD1_KeyPress(KeyAscii As Integer)
   Form_KeyPress (KeyAscii)
End Sub
Private Sub ID_UNIT_NAME_KeyPress(KeyAscii As Integer)
   Form_KeyPress (KeyAscii)
End Sub

⌨️ 快捷键说明

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