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

📄 frmmntenanceedit.frm

📁 银行设备管理系统,采用VB+SQL实现,包含源程序及数据库备份,完美运行,完整无缺.
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmMntenanceEdit 
   Caption         =   "编辑设备维护信息"
   ClientHeight    =   7665
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6180
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   7665
   ScaleWidth      =   6180
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame2 
      Caption         =   "维护信息"
      Height          =   4935
      Left            =   120
      TabIndex        =   14
      Top             =   1920
      Width           =   5895
      Begin VB.TextBox txtAccessoryList 
         Height          =   690
         Left            =   1320
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   30
         Top             =   2760
         Width           =   4455
      End
      Begin VB.CheckBox Check1 
         Caption         =   "是否更换配件"
         Height          =   255
         Left            =   1320
         TabIndex        =   29
         Top             =   2400
         Width           =   1575
      End
      Begin MSComCtl2.DTPicker dtReportDate 
         Height          =   330
         Left            =   1320
         TabIndex        =   26
         Top             =   240
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   582
         _Version        =   393216
         Format          =   23855105
         CurrentDate     =   38704
      End
      Begin VB.TextBox txtReason 
         Height          =   1050
         Left            =   1320
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   21
         Top             =   1200
         Width           =   4455
      End
      Begin VB.TextBox txtEngineer 
         Height          =   330
         Left            =   1320
         TabIndex        =   17
         Top             =   3600
         Width           =   1575
      End
      Begin VB.TextBox txtComment 
         Height          =   690
         Left            =   1320
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   16
         Top             =   4080
         Width           =   4455
      End
      Begin VB.TextBox txtAmount 
         Height          =   330
         Left            =   4200
         TabIndex        =   15
         Text            =   "0"
         Top             =   3600
         Width           =   1575
      End
      Begin MSComCtl2.DTPicker dtArriveDate 
         Height          =   330
         Left            =   4200
         TabIndex        =   27
         Top             =   240
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   582
         _Version        =   393216
         Format          =   23855105
         CurrentDate     =   38704
      End
      Begin MSComCtl2.DTPicker dtSolveDate 
         Height          =   330
         Left            =   1320
         TabIndex        =   28
         Top             =   742
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   582
         _Version        =   393216
         Format          =   23855105
         CurrentDate     =   38704
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         Caption         =   "更换配件列表"
         Height          =   180
         Left            =   120
         TabIndex        =   31
         Top             =   2880
         Width           =   1080
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         Caption         =   "设备报修时间"
         Height          =   180
         Left            =   120
         TabIndex        =   25
         Top             =   315
         Width           =   1080
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         Caption         =   "故障原因"
         Height          =   180
         Left            =   120
         TabIndex        =   24
         Top             =   1320
         Width           =   720
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "到达现场时间"
         Height          =   180
         Left            =   3000
         TabIndex        =   23
         Top             =   315
         Width           =   1080
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "故障解决时间"
         Height          =   180
         Left            =   120
         TabIndex        =   22
         Top             =   817
         Width           =   1080
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "备注"
         Height          =   180
         Left            =   120
         TabIndex        =   20
         Top             =   4200
         Width           =   360
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "维护人姓名"
         Height          =   180
         Left            =   120
         TabIndex        =   19
         Top             =   3675
         Width           =   900
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "维护费用"
         Height          =   180
         Left            =   3000
         TabIndex        =   18
         Top             =   3675
         Width           =   720
      End
   End
   Begin VB.CommandButton Cmd_Exit 
      Caption         =   "取 消"
      Height          =   375
      Left            =   3443
      TabIndex        =   8
      Top             =   7080
      Width           =   1215
   End
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Height          =   375
      Left            =   1523
      TabIndex        =   7
      Top             =   7080
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Caption         =   "设备信息"
      Height          =   1695
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5895
      Begin VB.CommandButton Cmd_DeviceSel 
         Caption         =   "选择"
         Height          =   375
         Left            =   2760
         TabIndex        =   13
         Top             =   285
         Width           =   735
      End
      Begin VB.TextBox txtDevNo 
         Enabled         =   0   'False
         Height          =   330
         Left            =   960
         TabIndex        =   11
         Top             =   285
         Width           =   1575
      End
      Begin VB.TextBox txtPlace 
         Enabled         =   0   'False
         Height          =   330
         Left            =   4200
         TabIndex        =   10
         Top             =   1200
         Width           =   1575
      End
      Begin VB.TextBox txtBranch 
         Enabled         =   0   'False
         Height          =   330
         Left            =   960
         TabIndex        =   9
         Top             =   1200
         Width           =   1575
      End
      Begin VB.TextBox txtModel 
         Enabled         =   0   'False
         Height          =   330
         Left            =   4200
         TabIndex        =   5
         Top             =   765
         Width           =   1575
      End
      Begin VB.TextBox txtEnterprise 
         Enabled         =   0   'False
         Height          =   330
         Left            =   960
         TabIndex        =   2
         Top             =   765
         Width           =   1575
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "设备编号"
         Height          =   180
         Left            =   120
         TabIndex        =   12
         Top             =   360
         Width           =   720
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "属性支行"
         Height          =   180
         Left            =   120
         TabIndex        =   6
         Top             =   1275
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "设备型号"
         Height          =   180
         Left            =   3360
         TabIndex        =   4
         Top             =   840
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "布放地点"
         Height          =   180
         Left            =   3360
         TabIndex        =   3
         Top             =   1245
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "设备品牌"
         Height          =   180
         Left            =   120
         TabIndex        =   1
         Top             =   840
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmMntenanceEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean '插入=false,修改=true
Public OriId As Long  '维护编号

Private Sub Check1_Click()
  If Check1.Value = 0 Then
    txtAccessoryList.Visible = False
  Else
    txtAccessoryList.Visible = True
  End If
End Sub

Private Sub Cmd_DeviceSel_Click()
  FrmDeviceSel.Show 1      '设备选择窗体
  '读取指定对象信息
  txtDevNo = Trim(MyDeviceSel.DevNo)        '设备编号
  MyBase.GetInfo (MyDeviceSel.EnterpriseID) '设备品牌
  txtEnterprise = Trim(MyBase.InfoName)
  txtModel = Trim(MyDeviceSel.Model)        '设备型号
  MyBase.GetInfo (MyDeviceSel.BranchID)
  txtBranch = Trim(MyBase.InfoName)         '属性支行
  txtPlace = Trim(MyDeviceSel.Place)        '布放地点
End Sub

Private Sub Cmd_Exit_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  '检查用户录入数据的有效性
  If Len(Trim(txtDevNo)) = 0 Then
    MsgBox ("请选择设备")
    Cmd_DeviceSel.SetFocus
    Exit Sub
  End If
  If Len(Trim(txtEngineer)) = 0 Then
    MsgBox "请输入维护人员"
    txtEngineer.SetFocus
    Exit Sub
  End If
  '把用户录入的数据赋值到数据库对象变量中
  With MyMaintenance
  .DevNo = MakeStr(txtDevNo)
  .ReportDate = Format(dtReportDate.Value, "yyyy-mm-dd")
  .ArriveDate = Format(dtArriveDate.Value, "yyyy-mm-dd")
  .SolveDate = Format(dtSolveDate.Value, "yyyy-mm-dd")
  .Reason = MakeStr(txtReason)
  .ChangeAccessory = Check1.Value
  If Check1.Value = 1 Then
    .AccessoryList = MakeStr(txtAccessoryList)
  Else
    .AccessoryList = ""
  End If
  .Engineer = MakeStr(txtEngineer)
  .Amount = Val(txtAmount)
  .Comment = MakeStr(txtComment)
  '根据变量Modify的值,决定是插入新数据,还是修改已有的数据
  If Modify = False Then
    .Insert
  Else
    .Update (OriId)
  End If
  End With
  '关闭窗口
  Unload Me
End Sub

⌨️ 快捷键说明

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