📄 frmcustomervisitingupdate.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmCustomerVisitingUpdate
BorderStyle = 3 'Fixed Dialog
Caption = "修改客户拜访"
ClientHeight = 6975
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 9960
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6975
ScaleWidth = 9960
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.Frame Frame1
Caption = "客户合同"
Height = 6015
Left = 90
TabIndex = 2
Top = 120
Width = 9735
Begin VB.TextBox txtSummary
Height = 1245
Left = 1290
MultiLine = -1 'True
TabIndex = 7
Top = 2970
Width = 8355
End
Begin VB.TextBox txtTransTitle
Height = 345
Left = 1320
TabIndex = 6
Top = 1980
Width = 3225
End
Begin VB.TextBox txtResult
Height = 1365
Left = 1290
MultiLine = -1 'True
TabIndex = 3
Text = "frmCustomerVisitingUpdate.frx":0000
Top = 4380
Width = 8295
End
Begin ClassSystem.GCombo gcbVisiterID
Height = 315
Left = 1320
TabIndex = 4
Top = 2430
Width = 3225
_ExtentX = 5689
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontSize = 8.25
FontName = "MS Sans Serif"
ListIndex = -1
Text = ""
End
Begin ClassSystem.InputNumber intFee
Height = 345
Left = 6660
TabIndex = 5
Top = 1920
Width = 2505
_ExtentX = 4419
_ExtentY = 609
BorderStyle = 1
End
Begin MSComCtl2.DTPicker dtpTransDate
Height = 345
Left = 6630
TabIndex = 8
Top = 1380
Width = 2565
_ExtentX = 4524
_ExtentY = 609
_Version = 393216
Format = 61145088
CurrentDate = 37570
End
Begin ClassSystem.GCombo gcbCustomerID
Height = 315
Left = 1320
TabIndex = 9
Top = 1500
Width = 3225
_ExtentX = 5689
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontSize = 8.25
FontName = "MS Sans Serif"
ListIndex = -1
Text = ""
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "拜访日期"
Height = 195
Left = 5730
TabIndex = 16
Top = 1440
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "拜访摘要"
Height = 195
Left = 360
TabIndex = 15
Top = 3000
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "拜访标题"
Height = 195
Left = 330
TabIndex = 14
Top = 2010
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "客户名称"
Height = 195
Left = 330
TabIndex = 13
Top = 1530
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "拜访花费"
Height = 195
Left = 5760
TabIndex = 12
Top = 2010
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "拜访者"
Height = 195
Left = 390
TabIndex = 11
Top = 2460
Width = 540
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "拜访结果"
Height = 195
Left = 330
TabIndex = 10
Top = 4350
Width = 720
End
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 495
Left = 8280
TabIndex = 1
Top = 6390
Width = 1335
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Height = 495
Left = 6540
TabIndex = 0
Top = 6390
Width = 1575
End
End
Attribute VB_Name = "frmCustomerVisitingUpdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
'修改客户访问
Dim objCustomerVisiting As New clsCustomerVisiting
With objCustomerVisiting
.m_ID = frmCustomerVisiting.ExcelGrid1.DataRecordset.Fields("ID").value
.m_CustomerID = Me.gcbCustomerID.Item("ID")
.m_Fee = Me.intFee.Text
.m_Result = Me.txtResult.Text
.m_Summary = Me.txtSummary.Text
.m_TransDate = Me.dtpTransDate.value
.m_TransTitle = Me.txtTransTitle.Text
.m_VisiterID = Me.gcbVisiterID.Item("ID")
If Not .Update Then
MsgBox "修改失败,请检查数据合法性!", vbInformation, "修改客户访问"
Else
Unload Me
frmCustomerVisiting.RefreshData
End If
End With
End Sub
Private Sub Form_Load()
Dim objCustomer As New clsCustomer
Dim objEmployee As New clsEmployee
Dim objCustomerVisiting As New clsCustomerVisiting
'center the form
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
Call objCustomer.FillByID(frmCustomerVisiting.ExcelGrid1.DataRecordset.Fields("CustomerID").value)
gcbCustomerID.AddItem objCustomer.m_Name
gcbCustomerID.Item("ID", gcbCustomerID.NewIndex) = objCustomer.m_ID
gcbCustomerID.Enabled = False
gcbCustomerID.ListIndex = 0
Me.gcbVisiterID.RelativeList objEmployee.GetList("ID,Name", , "No"), "Name"
With objCustomerVisiting
Call .FillByID(frmCustomerVisiting.ExcelGrid1.DataRecordset.Fields("ID").value)
Me.dtpTransDate.value = .m_TransDate
objEmployee.FillByID .m_VisiterID
Me.gcbVisiterID.Text = objEmployee.m_Name
Me.txtResult.Text = .m_Result
Me.txtSummary.Text = .m_Summary
Me.txtTransTitle.Text = .m_TransTitle
Me.intFee.Text = .m_Fee
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -