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

📄 in_manage.frm

📁 系统集成项目的售后服务管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Height          =   255
      Left            =   240
      TabIndex        =   29
      Top             =   5040
      Width           =   975
   End
   Begin VB.Label Labeltime 
      Alignment       =   2  'Center
      Appearance      =   0  'Flat
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   375
      Left            =   5040
      TabIndex        =   28
      ToolTipText     =   "系统当前日期"
      Top             =   120
      Width           =   1935
   End
   Begin VB.Label Label13 
      Caption         =   "合同文件"
      Height          =   255
      Left            =   240
      TabIndex        =   25
      Top             =   4440
      Width           =   975
   End
   Begin VB.Label Label11 
      Caption         =   "合同编号"
      Height          =   255
      Left            =   240
      TabIndex        =   23
      Top             =   3840
      Width           =   975
   End
   Begin VB.Label Label12 
      AutoSize        =   -1  'True
      Caption         =   "备        注"
      Height          =   300
      Left            =   240
      TabIndex        =   19
      Top             =   5760
      Width           =   960
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "日"
      Height          =   300
      Left            =   4200
      TabIndex        =   18
      Top             =   240
      Width           =   240
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "月"
      Height          =   300
      Left            =   3240
      TabIndex        =   17
      Top             =   240
      Width           =   240
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "年"
      Height          =   300
      Left            =   2280
      TabIndex        =   16
      Top             =   240
      Width           =   240
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "项目类别"
      Height          =   300
      Left            =   240
      TabIndex        =   15
      Top             =   840
      Width           =   960
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "项目经理"
      Height          =   300
      Left            =   4080
      TabIndex        =   14
      Top             =   840
      Width           =   960
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "甲方项目负责人"
      Height          =   300
      Left            =   240
      TabIndex        =   13
      Top             =   3240
      Width           =   1680
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "甲方名称"
      Height          =   300
      Left            =   240
      TabIndex        =   12
      Top             =   2640
      Width           =   960
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "项目位置"
      Height          =   300
      Left            =   240
      TabIndex        =   11
      Top             =   2040
      Width           =   960
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "项目名称"
      Height          =   300
      Left            =   240
      TabIndex        =   10
      Top             =   1440
      Width           =   960
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "登录日期"
      Height          =   300
      Left            =   240
      TabIndex        =   9
      Top             =   240
      Width           =   960
   End
End
Attribute VB_Name = "in_manage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim InDate As String
Dim Proclass As String
Dim Proname As String
Dim Promanager As String
Dim Propos As String
Dim Partaname As String
Dim Partacharge As String
Dim Contractnum As String
Dim Scheme As String
Dim Contractdoc As String
Dim Remarks As String

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

If Combo1.Text <> "" Then
    Proclass = Combo1.Text
Else
    rc = MsgBox("请选择项目类别", vbOKOnly + vbExclamation, "输入数据不完整")
    Combo1.SetFocus
    Exit Sub
End If
If Combo2.Text <> "" Then
    Promanager = Combo2.Text
Else
    rc = MsgBox("请选择项目经理!", vbOKOnly + vbExclamation, "输入数据不完整")
    Combo2.SetFocus
    Exit Sub
End If

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

Proname = Text4.Text
Propos = Text6.Text
Partaname = Text7.Text
Partacharge = Text8.Text
Contractnum = Text9.Text
Contractdoc = Text10.Text
Scheme = Text11.Text

Remarks = Text5.Text

rc = SQLAllocStmt(hdbc, hstmt)
If rc = SQL_ERROR Then
    MsgBox "数据库连接失败。", vbCritical + vbOKOnly, "SQL出错"
    Unload Form1
    End
End If
SQLstmt = "INSERT INTO prorecord VALUES ('" & InDate & "','" & _
Proclass & "','" & Proname & "','" & Propos & "','" & Promanager & "','" & _
Partaname & "','" & Partacharge & "','" & Contractnum & "','" & Contractdoc & "','" & Scheme & "','" & Remarks & "')"
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)

Combo2.Clear
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Combo1.SetFocus
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
CommonDialog1.ShowOpen
in_manage.Text10.Text = CommonDialog1.FileName
End Sub

Private Sub Command4_Click()
CommonDialog1.ShowOpen
in_manage.Text11.Text = CommonDialog1.FileName
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

Labeltime.Caption = CStr(Date)

RD2 = String(10, 0)
rc = SQLAllocStmt(hdbc, hstmt)
If rc = SQL_ERROR Then
    MsgBox "数据库连接失败。", vbCritical + vbOKOnly, "SQL出错"
    Unload Form1
    End
End If
SQLstmt = "SELECT per_name FROM person WHERE per_class = '经理'"
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)
Combo2.Clear
Form1.Enabled = True
End Sub

Private Sub Text2_LostFocus()
If Len(Text2.Text) < 2 Then
    Text2.Text = "0" + Text2.Text
End If
End Sub

Private Sub Text3_LostFocus()
If Len(Text3.Text) < 2 Then
    Text3.Text = "0" + Text3.Text
End If
End Sub

⌨️ 快捷键说明

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