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

📄 frm_carrecord.frm

📁 汽修厂管理软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frm_CarRecord 
   Caption         =   "来车详细情况"
   ClientHeight    =   8265
   ClientLeft      =   4740
   ClientTop       =   2220
   ClientWidth     =   6090
   Icon            =   "frm_CarRecord.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   ScaleHeight     =   8265
   ScaleWidth      =   6090
   Begin VB.Frame Frame2 
      Caption         =   "车辆情况"
      Height          =   3135
      Left            =   240
      TabIndex        =   23
      Top             =   240
      Width           =   5655
      Begin VB.CommandButton Cmd_CarSelect 
         Caption         =   "按车牌查找"
         Height          =   255
         Left            =   3480
         TabIndex        =   36
         Top             =   360
         Width           =   1815
      End
      Begin VB.TextBox Txt_Setup 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   1200
         TabIndex        =   34
         Text            =   "未填"
         Top             =   2640
         Width           =   4095
      End
      Begin VB.TextBox Txt_InDate 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   1200
         TabIndex        =   32
         Text            =   "Text1"
         Top             =   2160
         Width           =   1935
      End
      Begin VB.TextBox Txt_Engine 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   1200
         TabIndex        =   30
         Text            =   "未填"
         Top             =   1680
         Width           =   1935
      End
      Begin VB.ComboBox Comb_color 
         BackColor       =   &H80000004&
         Height          =   300
         Left            =   1200
         TabIndex        =   28
         Text            =   "未填"
         Top             =   1200
         Width           =   1935
      End
      Begin VB.ComboBox Comb_type 
         BackColor       =   &H80000004&
         Height          =   300
         Left            =   1200
         TabIndex        =   26
         Text            =   "Combo1"
         Top             =   720
         Width           =   1935
      End
      Begin VB.TextBox Txt_Chepai 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   1200
         TabIndex        =   25
         Text            =   "Text1"
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label7 
         Caption         =   "其他说明:"
         Height          =   255
         Left            =   240
         TabIndex        =   35
         Top             =   2640
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "日期:"
         Height          =   255
         Left            =   240
         TabIndex        =   33
         Top             =   2160
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "发动机:"
         Height          =   255
         Left            =   240
         TabIndex        =   31
         Top             =   1680
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "颜色:"
         Height          =   255
         Left            =   240
         TabIndex        =   29
         Top             =   1200
         Width           =   375
      End
      Begin VB.Label Label2 
         Caption         =   "型号:"
         Height          =   255
         Left            =   240
         TabIndex        =   27
         Top             =   720
         Width           =   615
      End
      Begin VB.Label Label14 
         Caption         =   "车牌:"
         Height          =   255
         Left            =   240
         TabIndex        =   24
         Top             =   360
         Width           =   615
      End
   End
   Begin VB.CommandButton Cmd_Edit 
      Caption         =   "完成编辑"
      Height          =   255
      Left            =   3240
      TabIndex        =   22
      Top             =   7320
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "客户情况"
      Height          =   3735
      Left            =   240
      TabIndex        =   4
      Top             =   3480
      Width           =   5655
      Begin VB.CommandButton Cmd_SearchDriver 
         Caption         =   "按姓名查找"
         Height          =   255
         Left            =   3600
         TabIndex        =   21
         Top             =   480
         Width           =   1815
      End
      Begin VB.TextBox Txt_Fax 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   3480
         TabIndex        =   20
         Top             =   1920
         Width           =   1695
      End
      Begin VB.TextBox Txt_Address 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   960
         TabIndex        =   18
         Top             =   2760
         Width           =   4215
      End
      Begin RichTextLib.RichTextBox RichTextBox1 
         Height          =   495
         Left            =   960
         TabIndex        =   16
         Top             =   3120
         Width           =   4215
         _ExtentX        =   7435
         _ExtentY        =   873
         _Version        =   393217
         BackColor       =   -2147483644
         Enabled         =   -1  'True
         Appearance      =   0
         TextRTF         =   $"frm_CarRecord.frx":08CA
      End
      Begin VB.TextBox Txt_Account 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   960
         TabIndex        =   13
         Top             =   2280
         Width           =   4215
      End
      Begin VB.TextBox Txt_Mobile 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   960
         TabIndex        =   11
         Text            =   "13"
         Top             =   1920
         Width           =   1575
      End
      Begin VB.TextBox Txt_Tele 
         Appearance      =   0  'Flat
         BackColor       =   &H80000004&
         Height          =   270
         Left            =   960
         TabIndex        =   9
         Top             =   1440
         Width           =   1575
      End
      Begin VB.ComboBox Comb_Custom 
         BackColor       =   &H80000004&
         Height          =   300
         Left            =   960
         TabIndex        =   7
         Top             =   960
         Width           =   1575
      End
      Begin VB.TextBox Txt_Driver 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   960
         TabIndex        =   5
         Text            =   "Text1"
         Top             =   480
         Width           =   1575
      End
      Begin VB.Label Label11 
         Caption         =   "传真:"
         Height          =   255
         Left            =   2760
         TabIndex        =   19
         Top             =   1920
         Width           =   615
      End
      Begin VB.Label Label10 
         Caption         =   "住址:"
         Height          =   255
         Left            =   120
         TabIndex        =   17
         Top             =   2760
         Width           =   495
      End
      Begin VB.Label Label9 
         Caption         =   "备注:"
         Height          =   255
         Left            =   120
         TabIndex        =   15
         Top             =   3120
         Width           =   495
      End
      Begin VB.Label Label8 
         Caption         =   "银行帐号"
         Height          =   255
         Left            =   120
         TabIndex        =   14
         Top             =   2280
         Width           =   975
      End
      Begin VB.Label label18 
         Caption         =   "手机:"
         Height          =   255
         Left            =   120
         TabIndex        =   12
         Top             =   1920
         Width           =   615
      End
      Begin VB.Label Label13 
         Caption         =   "固话:"
         Height          =   375
         Left            =   120
         TabIndex        =   10
         Top             =   1440
         Width           =   495
      End
      Begin VB.Label Label3 
         Caption         =   "单位:"
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   960
         Width           =   495
      End
      Begin VB.Label Label4 
         Caption         =   "联系人"
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   480
         Width           =   975
      End
   End
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "退出"
      Height          =   255
      Left            =   4680
      TabIndex        =   3
      Top             =   7320
      Width           =   855
   End
   Begin VB.CommandButton Cmd_AddCar 
      Caption         =   "加入记录"
      Height          =   255
      Left            =   360
      TabIndex        =   2
      Top             =   7320
      Width           =   1095
   End
   Begin VB.TextBox Text7 
      BackColor       =   &H80000004&
      Height          =   270
      Left            =   360
      TabIndex        =   1
      Text            =   "Text7"
      Top             =   7800
      Width           =   3135
   End
   Begin VB.CommandButton Cmd_In 
      Caption         =   "进厂估价"
      Height          =   255
      Left            =   1800
      TabIndex        =   0
      Top             =   7320
      Width           =   975
   End
End
Attribute VB_Name = "frm_CarRecord"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim pmDriver As Parameter
Dim rsDriver As Recordset
Dim strOpenStyle As String
Dim wrkCarRec As Workspace
Dim dbCarRec As Database



Private Sub Cmd_AddCar_Click()
 Dim mRs As Recordset
 Dim intExistdriver As Integer
 On Error GoTo ErrHandle
 intExistdriver = IDofDriver()
 If intExistdriver < 0 Then 'if 1
      '联系人还未登入数据库
    Set mRs = DBSGRG.OpenRecordset("联系人", dbOpenTable, dbAppendOnly)
      With mRs
        .AddNew
        !客户名称 = Comb_Custom.Text & ""
        !联系人 = Txt_Driver.Text & ""
        !电话 = Txt_Tele.Text & ""
        !手机 = Txt_Mobile.Text & ""
        !传真 = Txt_Fax.Text & ""
        !帐号 = Txt_Account.Text & ""
        !地址 = Txt_Address.Text & ""
        .Update
      End With
    mRs.MoveLast
    intExistdriver = mRs.Fields("ID")
    mRs.Close
  End If 'if 1
  '将来车登如来车记录表
  '先检查该车是否有记录
   Set mRs = DBSGRG.QueryDefs("用车牌查找车记录").OpenRecordset
        If mRs.RecordCount = 0 Then
           mRs.Close
                    
            Set mRs = DBSGRG.OpenRecordset(TblCarRecord, dbOpenTable, dbAppendOnly) '将它借用于carRecord
               With mRs
                .AddNew
                !车牌 = Txt_Chepai.Text
                !型号 = Comb_type.Text
                !联系人ID = intExistdriver
                !颜色 = Comb_color.Text
                !发动机 = Txt_Engine.Text
                !配置 = Txt_Setup.Text
                !送修日期 = CDate(Txt_InDate.Text)
                .Update
               End With
              mRs.Close
          Else
           MsgBox "该车已经存档,毋需重新存档!", vbInformation, STRGARAGE
         End If
    ' if 2
  If MsgBox("已经将该车加入来车记录,是否进厂估价?", vbQuestion + vbOKCancel, STRGARAGE) = vbOK Then
        Txt_InDate.Text = Date
        Set mRs = DBSGRG.OpenRecordset("待修表", dbOpenTable, dbAppendOnly) '将它借用于carRecord
        
         With mRs
          .AddNew
          !车牌 = Txt_Chepai.Text
          !状态 = "估价"
          !送修日期 = Txt_InDate.Text
          .Update
         End With
        mRs.Close

⌨️ 快捷键说明

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