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

📄 设备维修管理.frm

📁 VB版的毕业设计作品
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form6 
   Caption         =   "设备维修管理"
   ClientHeight    =   7245
   ClientLeft      =   2535
   ClientTop       =   2520
   ClientWidth     =   10440
   Icon            =   "设备维修管理.frx":0000
   LinkTopic       =   "Form6"
   MDIChild        =   -1  'True
   ScaleHeight     =   7245
   ScaleWidth      =   10440
   Begin VB.Frame Frame2 
      Height          =   2775
      Left            =   240
      TabIndex        =   23
      Top             =   4320
      Width           =   9975
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Bindings        =   "设备维修管理.frx":08CA
         Height          =   2415
         Left            =   120
         TabIndex        =   24
         Top             =   240
         Width           =   9735
         _ExtentX        =   17171
         _ExtentY        =   4260
         _Version        =   393216
         BackColor       =   12648447
         BackColorFixed  =   16777215
         BackColorBkg    =   12640511
      End
   End
   Begin VB.Frame Frame1 
      Height          =   3975
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   9975
      Begin VB.CommandButton Command5 
         Caption         =   "查  找"
         Height          =   375
         Left            =   8160
         TabIndex        =   25
         Top             =   2760
         Width           =   1215
      End
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   "D:\zj\db.mdb"
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   285
         Left            =   7920
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   "设备维修管理"
         Top             =   3120
         Visible         =   0   'False
         Width           =   1695
      End
      Begin VB.CommandButton Command4 
         Caption         =   "下一条"
         Height          =   375
         Left            =   8160
         TabIndex        =   22
         Top             =   2160
         Width           =   1215
      End
      Begin VB.CommandButton Command3 
         Caption         =   "上一条"
         Height          =   375
         Left            =   8160
         TabIndex        =   21
         Top             =   1560
         Width           =   1215
      End
      Begin VB.CommandButton Command2 
         Caption         =   "删  除"
         Height          =   375
         Left            =   8160
         TabIndex        =   20
         Top             =   960
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Caption         =   "添  加"
         Height          =   375
         Left            =   8160
         TabIndex        =   19
         Top             =   360
         Width           =   1215
      End
      Begin VB.TextBox Text9 
         BackColor       =   &H00C0FFFF&
         DataField       =   "维修内容"
         DataSource      =   "Data1"
         Height          =   855
         Left            =   1560
         TabIndex        =   18
         Top             =   2880
         Width           =   5535
      End
      Begin VB.TextBox Text8 
         BackColor       =   &H00C0FFFF&
         DataField       =   "费用合计"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   5160
         TabIndex        =   17
         Top             =   2240
         Width           =   1935
      End
      Begin VB.TextBox Text7 
         BackColor       =   &H00C0FFFF&
         DataField       =   "物料费用"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   1560
         TabIndex        =   16
         Top             =   2240
         Width           =   1935
      End
      Begin VB.TextBox Text6 
         BackColor       =   &H00C0FFFF&
         DataField       =   "服务费用"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   5160
         TabIndex        =   15
         Top             =   1640
         Width           =   1935
      End
      Begin VB.TextBox Text5 
         BackColor       =   &H00C0FFFF&
         DataField       =   "维修人员"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   1560
         TabIndex        =   14
         Top             =   1640
         Width           =   1935
      End
      Begin VB.TextBox Text4 
         BackColor       =   &H00C0FFFF&
         DataField       =   "完成日期"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   5160
         TabIndex        =   13
         Top             =   1040
         Width           =   1935
      End
      Begin VB.TextBox Text3 
         BackColor       =   &H00C0FFFF&
         DataField       =   "维修日期"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   1560
         TabIndex        =   12
         Top             =   1040
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H00C0FFFF&
         DataField       =   "设备名称"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   5160
         TabIndex        =   11
         Top             =   440
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00C0FFFF&
         DataField       =   "单据编号"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   1560
         TabIndex        =   10
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label9 
         Caption         =   "维修内容:"
         Height          =   255
         Left            =   480
         TabIndex        =   9
         Top             =   2880
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "费用合计:"
         Height          =   255
         Left            =   4080
         TabIndex        =   8
         Top             =   2280
         Width           =   975
      End
      Begin VB.Label Label7 
         Caption         =   "物料费用:"
         Height          =   255
         Left            =   480
         TabIndex        =   7
         Top             =   2280
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "服务费用:"
         Height          =   255
         Left            =   4080
         TabIndex        =   6
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "维修人员:"
         Height          =   255
         Left            =   480
         TabIndex        =   5
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "完成日期:"
         Height          =   255
         Left            =   4080
         TabIndex        =   4
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "维修日期:"
         Height          =   255
         Left            =   480
         TabIndex        =   3
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "设备名称:"
         Height          =   255
         Left            =   4080
         TabIndex        =   2
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "单据编号:"
         Height          =   255
         Left            =   480
         TabIndex        =   1
         Top             =   480
         Width           =   975
      End
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Command1.Caption = "添  加" Then
   Command1.Caption = "保  存"
   Data1.Recordset.AddNew
    Text1.Locked = False
    Text2.Locked = False
    Text3.Locked = False
    Text4.Locked = False
    Text5.Locked = False
    Text6.Locked = False
    Text7.Locked = False
    Text8.Locked = False
    Text9.Locked = False
    Text1.SetFocus
  
   Command2.Enabled = False
    Command3.Enabled = False
    Command4.Enabled = False
    Exit Sub
   Else

    Text1.Locked = True
    Text2.Locked = True
    Text3.Locked = True
    Text4.Locked = True
    Text5.Locked = True
    Text6.Locked = True
    Text7.Locked = True
    Text8.Locked = True
    Text9.Locked = True
    Data1.Recordset.Update
    Data1.Recordset.MoveLast
    Command1.Caption = "添  加"

    Data1.Refresh
    Command2.Enabled = True
    Command3.Enabled = True
    Command4.Enabled = True
End If
End Sub

Private Sub Command2_Click()
Dim d
d = MsgBox("是否真的删除吗?", vbYesNo + vbQuestion, "删除")
If d = vbYes Then
   Data1.Recordset.Delete
   Data1.Recordset.MoveNext
    If Data1.Recordset.EOF = True Then
       Command4.Enabled = False
       Data1.Recordset.MovePrevious
       If Data1.Recordset.BOF = True Then
            Command3.Enabled = False
            Command2.Enabled = False
       End If
    End If
End If
Data1.Refresh
End Sub
Private Sub Command3_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
    Command3.Enabled = False
    Data1.Recordset.MoveNext
Else
    Command3.Enabled = True
End If

Command4.Enabled = True
End Sub

Private Sub Command4_Click()

Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then

    Command4.Enabled = False
    Data1.Recordset.MovePrevious
Else
    Command4.Enabled = True
End If
Command3.Enabled = True
End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\db.mdb"
Data1.Refresh
Me.Width = 10560
Me.Height = 7650
If Data1.Recordset.EOF Then
    Command2.Enabled = False
    Command3.Enabled = False
    Command4.Enabled = False
End If

    Text1.Locked = True
    Text2.Locked = True
    Text3.Locked = True
    Text4.Locked = True
    Text5.Locked = True
    Text6.Locked = True
    Text7.Locked = True
    Text8.Locked = True
    Text9.Locked = True
End Sub
Private Sub Command5_Click()
If Text1.Locked = True Or Text2.Locked = True Or Text3.Locked = True Or Text4.Locked = True Or Text5.Locked = True Then
    Text1.Locked = False
    Text2.Locked = False
    Text3.Locked = False
    Text4.Locked = False
    Text5.Locked = False
    MsgBox "请输入查找编号"
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text1.SetFocus
    Else
    Dim a
    a = "单据编号=" & "'" & Text1.Text & "'"
    Data1.Recordset.FindFirst a
    If Data1.Recordset.NoMatch Then
       MsgBox "没有此记录"
       Else
           Text1.Locked = True
           Text2.Locked = True
           Text3.Locked = True
           Text4.Locked = True
           Text5.Locked = True
    End If
End If
End Sub
'Download by http://www.codefans.net

⌨️ 快捷键说明

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