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

📄 frmcar.frm

📁 出租车管理系统 功能强大
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmCar 
   Caption         =   "车辆管理"
   ClientHeight    =   4965
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9885
   LinkTopic       =   "Form1"
   Picture         =   "FrmCar.frx":0000
   ScaleHeight     =   4965
   ScaleWidth      =   9885
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Search 
      Caption         =   "查 找"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2640
      MouseIcon       =   "FrmCar.frx":E2C4
      TabIndex        =   7
      Top             =   80
      Width           =   855
   End
   Begin VB.CommandButton Cmd_Exit 
      Caption         =   "退 出"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   8160
      TabIndex        =   6
      Top             =   4320
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_Del 
      Caption         =   "删 除"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5680
      TabIndex        =   5
      Top             =   4320
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_Modi 
      Caption         =   "修 改"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3200
      TabIndex        =   4
      Top             =   4320
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_Add 
      Caption         =   "添 加"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   720
      TabIndex        =   3
      Top             =   4320
      Width           =   1095
   End
   Begin VB.TextBox txtCarNo 
      Height          =   270
      Left            =   1200
      TabIndex        =   2
      Text            =   "京"
      Top             =   120
      Width           =   975
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   0
      Top             =   4560
      Visible         =   0   'False
      Width           =   2055
      _ExtentX        =   3625
      _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
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   3735
      Left            =   120
      TabIndex        =   0
      Top             =   480
      Width           =   9615
      _ExtentX        =   16960
      _ExtentY        =   6588
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   14
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         MarqueeStyle    =   3
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "车牌号"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   720
   End
End
Attribute VB_Name = "FrmCar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private SchCnd As String
Private Sub Cmd_Add_Click()
 
  FrmCarEdit.Modify = False
  FrmCarEdit.txtCarNo = ""
  FrmCarEdit.dco_Type.Text = ""
  FrmCarEdit.txtCarName = ""
  FrmCarEdit.cbo_Color.Text = ""
  FrmCarEdit.txtOilNo = "93#"
  FrmCarEdit.txtEngineNo = ""
  FrmCarEdit.txtCarCase = ""
  FrmCarEdit.dco_Sale.Text = ""
  FrmCarEdit.txtBuyDate = Date
  FrmCarEdit.txtInsurNo = ""
  FrmCarEdit.dco_Insu.Text = ""
  FrmCarEdit.txtInsurType = ""
  FrmCarEdit.txtSDate = Date
  FrmCarEdit.txtEDate = ""
  FrmCarEdit.txtDeposit = 0
  FrmCarEdit.txtDayPrice = 0
  FrmCarEdit.txtWeekEndPrice = 0
  FrmCarEdit.txtWeekPrice = 0
  FrmCarEdit.txtMonthPrice = 0
  FrmCarEdit.txtDayKM = 0
  FrmCarEdit.txtOTPrice = 0
  FrmCarEdit.txtOKMPrice = 0
  FrmCarEdit.cob_Status.Text = "待命"
  FrmCarEdit.txtComment = ""
  FrmCarEdit.Show 1
  GridRefresh
End Sub

Private Sub GridRefresh()
  If Len(Trim(txtCarNo)) = 0 Then
    SchCnd = ""
  Else
    SchCnd = " AND c.CarNo Like '%" + Trim(txtCarNo) + "%'"
  End If
  Adodc1.ConnectionString = Conn
  Adodc1.RecordSource = "SELECT c.CarNo AS 车牌号,c.Status AS 状态," _
     + "c.CarName AS 车名,t.TypeName AS 分类,c.Color AS 颜色,c.Deposit AS 押金, " _
     + "c.DayPrice AS 日租金,c.WeekEndPrice AS 周末租金,c.WeekPrice AS 周租金,c.MonthPrice AS 月租金 " _
     + " FROM CARS c,Types t WHERE c.TypeId=t.Id " _
     + SchCnd + " ORDER BY CarNo"
  Adodc1.Refresh
  Set DataGrid1.DataSource = Adodc1
  DataGrid1.Columns(0).Width = 1600
  DataGrid1.Columns(1).Width = 1200
  DataGrid1.Columns(2).Width = 1600
  DataGrid1.Columns(3).Width = 1000
  DataGrid1.Columns(4).Width = 1000
  DataGrid1.Columns(5).Width = 1000
  DataGrid1.Columns(6).Width = 1000
  DataGrid1.Columns(7).Width = 1000
  DataGrid1.Columns(8).Width = 1000
  DataGrid1.Columns(9).Width = 1000
End Sub

Private Sub Cmd_Del_Click()
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择记录"
    Exit Sub
  End If
  If MsgBox("是否确定要删除 ", vbYesNo, "请确认") = vbNo Then
    Exit Sub
  End If
  MyCar.Delete (Trim(Adodc1.Recordset.Fields(0)))
   MsgBox "成功", vbInformation
  GridRefresh
End Sub

Private Sub Cmd_Exit_Click()
  Unload Me
End Sub

Private Sub Cmd_Modi_Click()
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择记录"
    Exit Sub
  End If
  FrmCarEdit.Modify = True
  FrmCarEdit.sCarNo = Trim(Adodc1.Recordset.Fields(0))
  FrmCarEdit.txtCarNo = Trim(Adodc1.Recordset.Fields(0))
  If MyCar.GetInfo(Trim(Adodc1.Recordset.Fields(0))) = True Then
    If MyType.GetInfo(MyCar.TypeId) = True Then
      FrmCarEdit.dco_Type.Text = Trim(MyType.TypeName)
    Else
      FrmCarEdit.dco_Type.Text = ""
    End If
    FrmCarEdit.txtCarName = Trim(MyCar.CarName)
    FrmCarEdit.cbo_Color.Text = Trim(MyCar.Color)
    FrmCarEdit.txtOilNo = Trim(MyCar.OilNo)
    FrmCarEdit.txtEngineNo = Trim(MyCar.EngineNo)
    FrmCarEdit.txtCarCase = Trim(MyCar.CarCase)
    If MyCompany.GetInfo(MyCar.SaleId) = True Then
      FrmCarEdit.dco_Sale.Text = Trim(MyCompany.Company)
    Else
      FrmCarEdit.dco_Sale.Text = ""
    End If
    FrmCarEdit.txtBuyDate = Trim(MyCar.BuyDate)
    FrmCarEdit.txtInsurNo = Trim(MyCar.InsurNo)
    If MyCompany.GetInfo(MyCar.InsurId) = True Then
      FrmCarEdit.dco_Insu.Text = Trim(MyCompany.Company)
    Else
      FrmCarEdit.dco_Insu.Text = ""
    End If
    FrmCarEdit.txtInsurType = Trim(MyType.GetTypeNames(Trim(MyCar.InsurType)))
    sInsuItems = Trim(MyType.GetTypeNames(Trim(MyCar.InsurType)))
    sInsuKeys = Trim(MyCar.InsurType)
    FrmCarEdit.txtSDate = Trim(MyCar.InsurSdate)
    FrmCarEdit.txtEDate = Trim(MyCar.InsurEdate)
    FrmCarEdit.txtDeposit = MyCar.Deposit
    FrmCarEdit.txtDayPrice = MyCar.DayPrice
    FrmCarEdit.txtWeekEndPrice = MyCar.WeekEndPrice
    FrmCarEdit.txtWeekPrice = MyCar.WeekPrice
    FrmCarEdit.txtMonthPrice = MyCar.MonthPrice
    FrmCarEdit.txtDayKM = MyCar.DayKM
    FrmCarEdit.txtOTPrice = MyCar.OverTimePrice
    FrmCarEdit.txtOKMPrice = MyCar.OverKMPrice
    FrmCarEdit.cob_Status.Text = Trim(MyCar.Status)
    FrmCarEdit.txtComment = Trim(MyCar.Comment)
  End If
  FrmCarEdit.txtCarNo.Enabled = False
  FrmCarEdit.Show 1
  GridRefresh
End Sub

Private Sub Cmd_Search_Click()
  GridRefresh
End Sub

Private Sub Form_Load()
  GridRefresh
End Sub

⌨️ 快捷键说明

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