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

📄 weisheng.frm

📁 一个简单的大学宿舍管理系统环境:vb6.0+acce
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Left            =   360
            TabIndex        =   10
            Top             =   240
            Width           =   360
         End
      End
      Begin VB.Frame Frame5 
         Height          =   855
         Left            =   120
         TabIndex        =   1
         Top             =   3720
         Width           =   7215
         Begin VB.TextBox Text4 
            Height          =   495
            Left            =   840
            MultiLine       =   -1  'True
            ScrollBars      =   2  'Vertical
            TabIndex        =   4
            Top             =   240
            Width           =   4095
         End
         Begin VB.CommandButton Command1 
            Caption         =   "添加"
            Height          =   375
            Left            =   5400
            TabIndex        =   3
            Top             =   240
            Width           =   735
         End
         Begin VB.CommandButton Command2 
            Caption         =   "退出"
            Height          =   375
            Left            =   6360
            TabIndex        =   2
            Top             =   240
            Width           =   735
         End
         Begin VB.Label Label13 
            AutoSize        =   -1  'True
            Caption         =   "备注"
            Height          =   180
            Left            =   360
            TabIndex        =   5
            Top             =   240
            Width           =   360
         End
      End
      Begin VB.Label Label5 
         Caption         =   "Label5"
         Height          =   495
         Left            =   3480
         TabIndex        =   31
         Top             =   2520
         Width           =   1215
      End
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   375
      Left            =   5880
      Top             =   1560
      Visible         =   0   'False
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc2"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   5880
      Top             =   1200
      Visible         =   0   'False
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "weisheng"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
Adodc1.Refresh
Adodc1.Recordset.Find "公寓名称='" & Combo3.Text & "'"
If Adodc1.Recordset.EOF = True Then
MsgBox "查无此公寓", , "提示"
Adodc1.Recordset.MoveFirst
Exit Sub
End If
Adodc3.Refresh
Adodc3.Recordset.Find "寝室='" & Text5.Text & "'"
If Adodc3.Recordset.EOF = True Then
MsgBox "查无此寝室", , "提示"
Adodc3.Recordset.MoveFirst
Exit Sub
End If
If Combo3.Text = "" Or Combo2.Text = "" Or Text5.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
 MsgBox "请输入详细信息!", , "系统提示"
Else
With Adodc2
.Recordset.AddNew
.Recordset.Fields(0).Value = Combo3.Text
.Recordset.Fields(1).Value = Text5.Text
.Recordset.Fields(2).Value = Combo4.Text
.Recordset.Fields(3).Value = Combo5.Text
.Recordset.Fields(4).Value = Combo6.Text
.Recordset.Fields(5).Value = Combo7.Text
.Recordset.Fields(6).Value = Combo8.Text
.Recordset.Fields(7).Value = Text2.Text
.Recordset.Fields(8).Value = Text3.Text
.Recordset.Fields(9).Value = Combo2.Text
.Recordset.Fields(10).Value = Text4.Text
.Recordset.Fields(11).Value = Text1.Text
.Recordset.Update
End With
Set main.DataGrid1.datasource = Adodc2
main.DataGrid1.Refresh

End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Activate()

Combo3.Clear
Dim I As Integer
I = 1
If Adodc1.Recordset.RecordCount <> 0 Then
Do While I < Adodc1.Recordset.RecordCount
    Combo3.AddItem (Adodc1.Recordset.Fields("公寓名称"))
    Adodc1.Recordset.MoveNext
    I = I + 1
Loop
End If
End Sub

Private Sub Form_Load()
On Error Resume Next
provider = "provider=Microsoft.jet.oledb.4.0"
datasource = "data source=" & App.Path & "\DB.mdb"

With Adodc1
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdTable
.RecordSource = "gongyu"
.Refresh
End With


With Adodc2
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdTable
.RecordSource = "weisheng"
.Refresh
End With

With Adodc3
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdTable
.RecordSource = "qinshi"
.Refresh
End With

With Adodc4
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdTable
.RecordSource = "dengji"
.Refresh
End With


Text1.Text = Date
Text1.Enabled = False
Set main.DataGrid1.datasource = Adodc2
main.DataGrid1.Refresh

Combo4.AddItem ("门窗不干净")
Combo4.AddItem ("地面不干净")
Combo4.AddItem ("阳台不干净")
Combo4.AddItem ("床铺不整齐")
Combo4.AddItem ("不叠被")
Combo4.AddItem ("桌面不整齐")
Combo4.AddItem ("书柜摆放不整齐")
Combo5.AddItem ("门窗不干净")
Combo5.AddItem ("地面不干净")
Combo5.AddItem ("阳台不干净")
Combo5.AddItem ("床铺不整齐")
Combo5.AddItem ("不叠被")
Combo5.AddItem ("桌面不整齐")
Combo5.AddItem ("书柜摆放不整齐")
Combo6.AddItem ("门窗不干净")
Combo6.AddItem ("地面不干净")
Combo6.AddItem ("阳台不干净")
Combo6.AddItem ("床铺不整齐")
Combo6.AddItem ("不叠被")
Combo6.AddItem ("桌面不整齐")
Combo6.AddItem ("书柜摆放不整齐")
Combo7.AddItem ("门窗不干净")
Combo7.AddItem ("地面不干净")
Combo7.AddItem ("阳台不干净")
Combo7.AddItem ("床铺不整齐")
Combo7.AddItem ("不叠被")
Combo7.AddItem ("桌面不整齐")
Combo7.AddItem ("书柜摆放不整齐")
Combo8.AddItem ("门窗不干净")
Combo8.AddItem ("地面不干净")
Combo8.AddItem ("阳台不干净")
Combo8.AddItem ("床铺不整齐")
Combo8.AddItem ("不叠被")
Combo8.AddItem ("桌面不整齐")
Combo8.AddItem ("书柜摆放不整齐")

Dim J As Integer
J = 1
If Adodc4.Recordset.RecordCount <> 0 Then
Do While J < Adodc4.Recordset.RecordCount
    Combo2.AddItem (Adodc4.Recordset.Fields("等级"))
    Adodc4.Recordset.MoveNext
    J = J + 1
Loop
End If
Combo2.Text = "优秀"

End Sub

Private Sub Text2_Click()
On Error Resume Next
If Text3.Text = "" Then
Text3.Text = 0
End If
Text2.Text = 100 - Int(Text3.Text)
End Sub

⌨️ 快捷键说明

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