📄 frmcustomeredit.frm
字号:
Top = 345
Width = 720
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "发证日期"
Height = 180
Left = 5280
TabIndex = 15
Top = 345
Width = 720
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "驾驶证号"
Height = 180
Left = 120
TabIndex = 14
Top = 345
Width = 720
End
End
Begin VB.Frame Frame1
Caption = "基本信息"
Height = 1095
Left = 120
TabIndex = 0
Top = 600
Width = 9855
Begin VB.TextBox txtEmail
Height = 300
Left = 8280
TabIndex = 35
Top = 720
Width = 1335
End
Begin VB.ComboBox cob_Sex
Height = 300
ItemData = "FrmCustomerEdit.frx":0F21
Left = 2760
List = "FrmCustomerEdit.frx":0F28
TabIndex = 28
Text = "男"
Top = 300
Width = 735
End
Begin VB.TextBox txtZipCode
Height = 270
Left = 6600
TabIndex = 25
Top = 735
Width = 855
End
Begin VB.TextBox txtAddress
Height = 270
Left = 3600
TabIndex = 24
Top = 735
Width = 2175
End
Begin VB.TextBox txtTelephone
Height = 300
Left = 8280
TabIndex = 11
Top = 360
Width = 1335
End
Begin VB.TextBox txtIdCard
Height = 300
Left = 5760
TabIndex = 9
Top = 300
Width = 1935
End
Begin VB.TextBox txtWorkPlace
Height = 300
Left = 960
TabIndex = 7
Top = 720
Width = 1935
End
Begin VB.TextBox txtAge
Height = 300
Left = 4200
TabIndex = 4
Top = 300
Width = 495
End
Begin VB.TextBox txtName
Height = 300
Left = 720
TabIndex = 2
Top = 300
Width = 1095
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "Email"
Height = 180
Left = 7680
TabIndex = 36
Top = 780
Width = 450
End
Begin VB.Label Label28
AutoSize = -1 'True
Caption = "邮编"
Height = 180
Left = 6120
TabIndex = 23
Top = 780
Width = 360
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "地址"
Height = 180
Left = 3120
TabIndex = 12
Top = 780
Width = 360
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "电话"
Height = 180
Left = 7800
TabIndex = 10
Top = 360
Width = 360
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "身份证号"
Height = 180
Left = 4920
TabIndex = 8
Top = 360
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "工作单位"
Height = 180
Left = 120
TabIndex = 6
Top = 780
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "性别"
Height = 180
Left = 2280
TabIndex = 5
Top = 360
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "年龄"
Height = 180
Left = 3720
TabIndex = 3
Top = 360
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "姓名"
Height = 180
Left = 120
TabIndex = 1
Top = 360
Width = 360
End
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "客户编号"
Height = 180
Left = 240
TabIndex = 46
Top = 240
Width = 720
End
End
Attribute VB_Name = "FrmCustomerEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As String
Public IsMember As Boolean
Private Sub Cmd_Exit_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
If Len(Trim(txtId)) = 0 Then
MsgBox ("请输入客户编号")
txtId.SetFocus
Exit Sub
End If
If Len(Trim(txtName)) = 0 Then
MsgBox "请输入驾驶员姓名"
txtName.SetFocus
Exit Sub
End If
If Len(Trim(txtAge)) = 0 Then
MsgBox "请输入年龄"
txtAge.SetFocus
Exit Sub
End If
If Len(Trim(txtIdCard)) = 0 Then
MsgBox "请输入身份证号"
txtIdCard.SetFocus
Exit Sub
End If
If Len(Trim(txtTelephone)) = 0 Then
MsgBox "请输入联系电话"
txtTelephone.SetFocus
Exit Sub
End If
If Len(Trim(txtLNo)) = 0 Then
MsgBox "请输入驾驶证号"
txtLNo.SetFocus
Exit Sub
End If
If Len(Trim(cob_LType.Text)) = 0 Then
MsgBox "请选择驾驶证类别"
cob_LType.SetFocus
Exit Sub
End If
If Len(Trim(cob_Cert.Text)) = 0 Then
MsgBox "请选择抵押证件名称"
cob_Cert.SetFocus
Exit Sub
End If
If Len(Trim(txtWName)) = 0 Then
MsgBox "请输入担保人姓名"
txtWName.SetFocus
Exit Sub
End If
If Len(Trim(txtWIdCard)) = 0 Then
MsgBox "请输入担保人身份证号"
txtWIdCard.SetFocus
Exit Sub
End If
With MyCustomer
.Id = MakeStr(txtId)
.Name = MakeStr(txtName)
.Age = Val(txtAge)
.Sex = MakeStr(cob_Sex.Text)
.IdCard = MakeStr(txtIdCard)
.Telephone = MakeStr(txtTelephone)
.WorkPlace = MakeStr(txtWorkPlace)
.ZipCode = MakeStr(txtZipCode)
.Address = MakeStr(txtAddress)
.Email = MakeStr(txtEmail)
.LicenseNo = MakeStr(txtLNo)
.LicenseType = MakeStr(cob_LType.Text)
.GetDate = MakeStr(txtGetDate)
.ExpiredDate = MakeStr(txtExpiredDate)
.DriverAge = Val(txtDriverAge)
.Certificate = MakeStr(cob_Cert.Text)
.Warrantor = MakeStr(txtWName)
.WIdCard = MakeStr(txtWIdCard)
.WWorkPlace = MakeStr(txtWWorkPlace)
If Modify = False Then
If .In_DB(Trim(txtId)) = True Then
MsgBox ("已经存在此客户编号")
txtId.SetFocus
Exit Sub
End If
.Insert
Else
If IsMember = False Then
.TypeId = 0
Call .Update(OriId)
Else
If Len(Trim(dco_MemType.Text)) = 0 Then
MsgBox ("请选择会员类型")
dco_MemType.SetFocus
Exit Sub
End If
.TypeId = Val(dco_MemType.BoundText)
Call .Update(OriId)
End If
End If
MsgBox "成功", vbInformation
End With
Unload Me
End Sub
Private Sub dco_MemType_Click(Area As Integer)
If Len(Trim(dco_MemType.BoundText)) = 0 Then
Exit Sub
End If
If MyMemberType.GetInfo(dco_MemType.BoundText) = True Then
txtRate = Format(MyMemberType.Rate, "0.##")
Else
txtRate = 1
End If
End Sub
Private Sub Form_Load()
DataSetup
End Sub
Private Sub DataSetup()
Adodc1.ConnectionString = Conn
Adodc1.RecordSource = "SELECT * FROM MemberType ORDER BY Id"
Adodc1.Refresh
Set dco_MemType.RowSource = Adodc1
dco_MemType.ListField = "TypeName"
dco_MemType.BoundColumn = "Id"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -