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

📄 suprecord.frm

📁 系统集成项目的售后服务管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form supRecord 
   Caption         =   "处理报告"
   ClientHeight    =   7395
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7455
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   12
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   7395
   ScaleWidth      =   7455
   StartUpPosition =   2  'CenterScreen
   Begin VB.ComboBox Combo2 
      ForeColor       =   &H00FF0000&
      Height          =   420
      Left            =   1320
      TabIndex        =   21
      Top             =   1320
      Width           =   5775
   End
   Begin VB.ComboBox Combo1 
      ForeColor       =   &H00FF0000&
      Height          =   420
      Left            =   1320
      TabIndex        =   18
      Top             =   720
      Width           =   5775
   End
   Begin VB.CommandButton Command2 
      Caption         =   "关  闭"
      Height          =   375
      Left            =   5040
      TabIndex        =   17
      Top             =   6840
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "提  交"
      Height          =   375
      Left            =   1440
      TabIndex        =   16
      Top             =   6840
      Width           =   1215
   End
   Begin VB.TextBox Text7 
      ForeColor       =   &H00FF0000&
      Height          =   420
      Left            =   5280
      TabIndex        =   15
      Top             =   1920
      Width           =   1815
   End
   Begin VB.TextBox Text6 
      Height          =   4095
      Left            =   360
      MaxLength       =   240
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   13
      Top             =   2520
      Width           =   6735
   End
   Begin VB.TextBox Text5 
      Alignment       =   2  'Center
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   6240
      TabIndex        =   5
      Top             =   120
      Width           =   495
   End
   Begin VB.TextBox Text4 
      Alignment       =   2  'Center
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   5160
      TabIndex        =   4
      Top             =   120
      Width           =   495
   End
   Begin VB.TextBox Text3 
      Alignment       =   2  'Center
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   4080
      TabIndex        =   3
      Top             =   120
      Width           =   495
   End
   Begin VB.TextBox Text2 
      Alignment       =   2  'Center
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   3000
      TabIndex        =   2
      Top             =   120
      Width           =   495
   End
   Begin VB.TextBox Text1 
      Alignment       =   2  'Center
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label13 
      Caption         =   "故障摘要"
      Height          =   255
      Left            =   240
      TabIndex        =   20
      Top             =   1440
      Width           =   975
   End
   Begin VB.Label Label11 
      Caption         =   "(少于120字)"
      ForeColor       =   &H00008000&
      Height          =   255
      Left            =   1320
      TabIndex        =   19
      Top             =   2040
      Width           =   1815
   End
   Begin VB.Label Label9 
      Caption         =   "报 告 人"
      Height          =   375
      Left            =   4200
      TabIndex        =   14
      Top             =   2040
      Width           =   975
   End
   Begin VB.Label Label8 
      Caption         =   "处理结果"
      Height          =   375
      Left            =   240
      TabIndex        =   12
      Top             =   2040
      Width           =   975
   End
   Begin VB.Label Label7 
      Caption         =   "客户名称"
      Height          =   255
      Left            =   240
      TabIndex        =   11
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label6 
      Caption         =   "分"
      Height          =   375
      Left            =   6960
      TabIndex        =   10
      Top             =   240
      Width           =   375
   End
   Begin VB.Label Label5 
      Caption         =   "时"
      Height          =   375
      Left            =   5880
      TabIndex        =   9
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label4 
      Caption         =   "日"
      Height          =   375
      Left            =   4680
      TabIndex        =   8
      Top             =   240
      Width           =   375
   End
   Begin VB.Label Label3 
      Caption         =   "月"
      Height          =   375
      Left            =   3720
      TabIndex        =   7
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label2 
      Caption         =   "年"
      Height          =   375
      Left            =   2640
      TabIndex        =   6
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label1 
      Caption         =   "报告时间"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "supRecord"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Atract As String
Dim Duty As String
Dim Unit As String
Dim Content As String
Dim Rectime As String

Private Sub Command1_Click()
Rectime = Text1.Text + "-" + Text2.Text + "-" + Text3.Text + " " + Text4.Text + ":" + Text5.Text
If Len(Rectime) < 16 Then
    rc = MsgBox("请输入登录时间!", vbOKOnly + vbExclamation, "输入数据不完整")
    Text1.SetFocus
    Exit Sub
End If

If Combo1.Text <> "" Then
    Unit = Combo1.Text
Else
    rc = MsgBox("请选择客户名称", vbOKOnly + vbExclamation, "输入数据不完整")
    Combo1.SetFocus
    Exit Sub
End If

If Combo2.Text <> "" Then
    Atract = Combo2.Text
Else
    rc = MsgBox("请选择故障摘要", vbOKOnly + vbExclamation, "输入数据不完整")
    Combo2.SetFocus
    Exit Sub
End If

If Text6.Text = "" Or Text7.Text = "" Then
    MsgBox "请在空格中填入数据!"
    Exit Sub
End If

Content = Text6.Text
Duty = Text7.Text
Unit = Combo1.Text
Atract = Combo2.Text

rc = SQLAllocStmt(hdbc, hstmt)
If rc = SQL_ERROR Then
    MsgBox "数据库连接失败。", vbCritical + vbOKOnly, "SQL出错"
    Unload Form1
    End
End If
SQLstmt = "INSERT INTO suprecord VALUES ('" & Rectime & "','" & _
Unit & "','" & Atract & "','" & Duty & "','" & Content & "')"
rc = SQLExecDirect(hstmt, SQLstmt, SQL_NTS)
If rc <> SQL_ERROR Then
    rc = MsgBox("以上数据已输入数据库中!", vbOKOnly + vbExclamation, "录入成功")
    Else: MsgBox "error", vbCritical, "unsuccess"
End If
rc = SQLFreeStmt(hstmt, SQL_DROP)

Combo1.Clear
Combo2.Clear
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Combo1.SetFocus

End Sub

Private Sub Command2_Click()
Unload Me

End Sub

Private Sub Form_Load()
Text1.Text = Year(Date)
Text2.Text = Month(Date)
If Len(Text2.Text) < 2 Then Text2.Text = "0" + Text2.Text
Text3.Text = Day(Date)
If Len(Text3.Text) < 2 Then Text3.Text = "0" + Text3.Text

Text4.Text = Hour(Time)
If Len(Text4.Text) < 2 Then Text4.Text = "0" + Text4.Text
Text5.Text = Minute(Time)
If Len(Text5.Text) < 2 Then Text5.Text = "0" + Text5.Text

RD2 = String(50, 0)
rc = SQLAllocStmt(hdbc, hstmt)
If rc = SQL_ERROR Then
    MsgBox "数据库连接失败。", vbCritical + vbOKOnly, "SQL出错"
    Unload Form1
    End
End If
SQLstmt = "SELECT partaname FROM prorecord"
rc = SQLExecDirect(hstmt, SQLstmt, SQL_NTS)
Do While SQLFetch(hstmt) <> SQL_NO_DATA_FOUND
    rc = SQLGetData(hstmt, 1, SQL_C_CHAR, RD2, Len(RD2), SQL_NULL_DATA)
    Combo1.additem RD2
Loop
rc = SQLFreeStmt(hstmt, SQL_DROP)

RD2 = String(50, 0)
rc = SQLAllocStmt(hdbc, hstmt)
SQLstmt = "SELECT atract FROM phonerecord"
rc = SQLExecDirect(hstmt, SQLstmt, SQL_NTS)
Do While SQLFetch(hstmt) <> SQL_NO_DATA_FOUND
    rc = SQLGetData(hstmt, 1, SQL_C_CHAR, RD2, Len(RD2), SQL_NULL_DATA)
    Combo2.additem RD2
Loop
rc = SQLFreeStmt(hstmt, SQL_DROP)

End Sub

Private Sub Form_Unload(Cancel As Integer)
Form1.Enabled = True

End Sub

⌨️ 快捷键说明

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