📄 frmclient.vb
字号:
Me.tlvCoop.TabIndex = 31
'
'btnDelCoop
'
Me.btnDelCoop.BackColor = System.Drawing.SystemColors.Control
Me.btnDelCoop.Cursor = System.Windows.Forms.Cursors.Default
Me.btnDelCoop.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnDelCoop.Location = New System.Drawing.Point(259, 232)
Me.btnDelCoop.Name = "btnDelCoop"
Me.btnDelCoop.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnDelCoop.Size = New System.Drawing.Size(97, 24)
Me.btnDelCoop.TabIndex = 29
Me.btnDelCoop.Text = "删除"
'
'btnModifyCoop
'
Me.btnModifyCoop.BackColor = System.Drawing.SystemColors.Control
Me.btnModifyCoop.Cursor = System.Windows.Forms.Cursors.Default
Me.btnModifyCoop.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnModifyCoop.Location = New System.Drawing.Point(144, 232)
Me.btnModifyCoop.Name = "btnModifyCoop"
Me.btnModifyCoop.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnModifyCoop.Size = New System.Drawing.Size(97, 24)
Me.btnModifyCoop.TabIndex = 28
Me.btnModifyCoop.Text = "修改"
'
'btnAddCoop
'
Me.btnAddCoop.BackColor = System.Drawing.SystemColors.Control
Me.btnAddCoop.Cursor = System.Windows.Forms.Cursors.Default
Me.btnAddCoop.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnAddCoop.Location = New System.Drawing.Point(29, 232)
Me.btnAddCoop.Name = "btnAddCoop"
Me.btnAddCoop.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnAddCoop.Size = New System.Drawing.Size(97, 24)
Me.btnAddCoop.TabIndex = 27
Me.btnAddCoop.Text = "添加"
'
'btnCoopInfo
'
Me.btnCoopInfo.BackColor = System.Drawing.SystemColors.Control
Me.btnCoopInfo.Cursor = System.Windows.Forms.Cursors.Default
Me.btnCoopInfo.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnCoopInfo.Location = New System.Drawing.Point(394, 232)
Me.btnCoopInfo.Name = "btnCoopInfo"
Me.btnCoopInfo.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnCoopInfo.Size = New System.Drawing.Size(97, 24)
Me.btnCoopInfo.TabIndex = 30
Me.btnCoopInfo.Text = "查看"
'
'_SSTabClient_TabPage3
'
Me._SSTabClient_TabPage3.Controls.Add(Me.fraScore)
Me._SSTabClient_TabPage3.Location = New System.Drawing.Point(4, 22)
Me._SSTabClient_TabPage3.Name = "_SSTabClient_TabPage3"
Me._SSTabClient_TabPage3.Size = New System.Drawing.Size(569, 285)
Me._SSTabClient_TabPage3.TabIndex = 3
Me._SSTabClient_TabPage3.Text = "客户评价"
'
'fraScore
'
Me.fraScore.BackColor = System.Drawing.SystemColors.Control
Me.fraScore.Controls.Add(Me.ctbSatisfaction)
Me.fraScore.Controls.Add(Me.ctbFriendly)
Me.fraScore.Controls.Add(Me.ctbImportance)
Me.fraScore.Controls.Add(Me.Label23)
Me.fraScore.Controls.Add(Me.Label22)
Me.fraScore.Controls.Add(Me.Label21)
Me.fraScore.ForeColor = System.Drawing.SystemColors.ControlText
Me.fraScore.Location = New System.Drawing.Point(24, 16)
Me.fraScore.Name = "fraScore"
Me.fraScore.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.fraScore.Size = New System.Drawing.Size(529, 251)
Me.fraScore.TabIndex = 56
Me.fraScore.TabStop = False
Me.fraScore.Text = "客户评价"
'
'ctbSatisfaction
'
Me.ctbSatisfaction.BarBorderColor = System.Drawing.Color.Black
Me.ctbSatisfaction.BarColor = System.Drawing.Color.White
Me.ctbSatisfaction.BarOrientation = GradientControls.Orientations.Horizontal
Me.ctbSatisfaction.ControlCornerStyle = GradientControls.CornerStyles.Rounded
Me.ctbSatisfaction.Location = New System.Drawing.Point(104, 152)
Me.ctbSatisfaction.Maximum = 100
Me.ctbSatisfaction.MaximumValueSide = GradientControls.Poles.Right
Me.ctbSatisfaction.Minimum = 0
Me.ctbSatisfaction.Name = "ctbSatisfaction"
Me.ctbSatisfaction.Size = New System.Drawing.Size(392, 24)
Me.ctbSatisfaction.TabIndex = 62
Me.ctbSatisfaction.TrackerBorderColor = System.Drawing.Color.Black
Me.ctbSatisfaction.TrackerColor = System.Drawing.Color.Red
Me.ctbSatisfaction.TrackerSize = 24
Me.ctbSatisfaction.Value = 50
'
'ctbFriendly
'
Me.ctbFriendly.BarBorderColor = System.Drawing.Color.Black
Me.ctbFriendly.BarColor = System.Drawing.Color.White
Me.ctbFriendly.BarOrientation = GradientControls.Orientations.Horizontal
Me.ctbFriendly.ControlCornerStyle = GradientControls.CornerStyles.Rounded
Me.ctbFriendly.Location = New System.Drawing.Point(104, 96)
Me.ctbFriendly.Maximum = 100
Me.ctbFriendly.MaximumValueSide = GradientControls.Poles.Right
Me.ctbFriendly.Minimum = 0
Me.ctbFriendly.Name = "ctbFriendly"
Me.ctbFriendly.Size = New System.Drawing.Size(392, 24)
Me.ctbFriendly.TabIndex = 61
Me.ctbFriendly.TrackerBorderColor = System.Drawing.Color.Black
Me.ctbFriendly.TrackerColor = System.Drawing.Color.Red
Me.ctbFriendly.TrackerSize = 24
Me.ctbFriendly.Value = 50
'
'ctbImportance
'
Me.ctbImportance.BarBorderColor = System.Drawing.Color.Black
Me.ctbImportance.BarColor = System.Drawing.Color.White
Me.ctbImportance.BarOrientation = GradientControls.Orientations.Horizontal
Me.ctbImportance.ControlCornerStyle = GradientControls.CornerStyles.Rounded
Me.ctbImportance.Location = New System.Drawing.Point(104, 40)
Me.ctbImportance.Maximum = 100
Me.ctbImportance.MaximumValueSide = GradientControls.Poles.Right
Me.ctbImportance.Minimum = 0
Me.ctbImportance.Name = "ctbImportance"
Me.ctbImportance.Size = New System.Drawing.Size(392, 24)
Me.ctbImportance.TabIndex = 60
Me.ctbImportance.TrackerBorderColor = System.Drawing.Color.Black
Me.ctbImportance.TrackerColor = System.Drawing.Color.Red
Me.ctbImportance.TrackerSize = 24
Me.ctbImportance.Value = 50
'
'Label23
'
Me.Label23.BackColor = System.Drawing.SystemColors.Control
Me.Label23.Cursor = System.Windows.Forms.Cursors.Default
Me.Label23.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label23.Location = New System.Drawing.Point(16, 160)
Me.Label23.Name = "Label23"
Me.Label23.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label23.Size = New System.Drawing.Size(64, 28)
Me.Label23.TabIndex = 59
Me.Label23.Text = " 满意度 (0-100)"
'
'Label22
'
Me.Label22.BackColor = System.Drawing.SystemColors.Control
Me.Label22.Cursor = System.Windows.Forms.Cursors.Default
Me.Label22.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label22.Location = New System.Drawing.Point(16, 103)
Me.Label22.Name = "Label22"
Me.Label22.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label22.Size = New System.Drawing.Size(64, 25)
Me.Label22.TabIndex = 58
Me.Label22.Text = " 友好度 (0-100)"
'
'Label21
'
Me.Label21.BackColor = System.Drawing.SystemColors.Control
Me.Label21.Cursor = System.Windows.Forms.Cursors.Default
Me.Label21.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label21.Location = New System.Drawing.Point(16, 43)
Me.Label21.Name = "Label21"
Me.Label21.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label21.Size = New System.Drawing.Size(64, 29)
Me.Label21.TabIndex = 57
Me.Label21.Text = " 重要度 (0-100)"
'
'btnCancel
'
Me.btnCancel.BackColor = System.Drawing.SystemColors.Control
Me.btnCancel.Cursor = System.Windows.Forms.Cursors.Default
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnCancel.Location = New System.Drawing.Point(480, 327)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnCancel.Size = New System.Drawing.Size(97, 27)
Me.btnCancel.TabIndex = 1
Me.btnCancel.Text = "取消"
'
'btnOK
'
Me.btnOK.BackColor = System.Drawing.SystemColors.Control
Me.btnOK.Cursor = System.Windows.Forms.Cursors.Default
Me.btnOK.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnOK.Location = New System.Drawing.Point(365, 327)
Me.btnOK.Name = "btnOK"
Me.btnOK.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnOK.Size = New System.Drawing.Size(97, 27)
Me.btnOK.TabIndex = 0
Me.btnOK.Text = "确定"
'
'frmClient
'
Me.AcceptButton = Me.btnOK
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.BackColor = System.Drawing.SystemColors.Control
Me.CancelButton = Me.btnCancel
Me.ClientSize = New System.Drawing.Size(598, 366)
Me.Controls.Add(Me.btnModifyInfo)
Me.Controls.Add(Me.tabClient)
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnOK)
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Location = New System.Drawing.Point(184, 250)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmClient"
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
Me.Text = "客户信息管理"
Me.tabClient.ResumeLayout(False)
Me.tabPageBasicInfo.ResumeLayout(False)
Me.frabaseInfo.ResumeLayout(False)
Me.fracomInfo.ResumeLayout(False)
Me._SSTabClient_TabPage1.ResumeLayout(False)
Me.fraWork.ResumeLayout(False)
Me.fraRemark.ResumeLayout(False)
Me._SSTabClient_TabPage2.ResumeLayout(False)
Me.fraCoop.ResumeLayout(False)
Me._SSTabClient_TabPage3.ResumeLayout(False)
Me.fraScore.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
#Region "定义变量"
Private m_bOK As Boolean '确定用户按了OK还是CANCEL按钮
Private m_dmViewType As clientMgrBusiness.dmViewType '显示类型,即表示当前是添加、查看、修改
Private m_dmClient As clientMgrBusiness.ClientDataModel '存储客户信息对象
Private m_iTypeId As Integer '所在客户类型的ID,在新增时记录所添加的客户类别
Private m_bBirthdayWarn As Boolean '标识是否启用生日提醒
#End Region
#Region "属性"
'显示类型,即表示当前是添加、查看、修改
Public ReadOnly Property ViewType() As clientMgrBusiness.dmViewType
Get
ViewType = m_dmViewType
End Get
End Property
'标识是否启用生日提醒
Public ReadOnly Property ShowBirthdayWarn() As Boolean
Get
ShowBirthdayWarn = m_bBirthdayWarn
End Get
End Property
#End Region
#Region "合作页消息响应"
Private Sub UpdateCooperateCmdUI()
Dim bEnableModifyCmd As Boolean = False
If Me.tlvCoop.SelectedItems.Count = 0 Then
bEnableModifyCmd = False
Else
bEnableModifyCmd = True
End If
Me.btnCoopInfo.Enabled = bEnableModifyCmd
Me.btnModifyCoop.Enabled = bEnableModifyCmd
Me.btnDelCoop.Enabled = bEnableModifyCmd
End Sub
'新增合作
Private Sub btnAddCoop_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnAddCoop.Click
Dim coopObj As New clientMgrBusiness.Cooperate
Dim dmCoop As New clientMgrBusiness.CooperateDataModel
Dim frm As New frmAddCoop
'显示对话框
If frm.RetriveCoop(dmCoop, clientMgrBusiness.dmViewType.vtadd, m_dmClient) = False Then Exit Sub
'更新数据库
Dim ErrMsg As String
ErrMsg = coopObj.AddNew(dmCoop)
If ErrMsg = "" Then
AddCooperateToListView(dmCoop, tlvCoop, False)
Else
MsgBox(ErrMsg, MsgBoxStyle.Critical + MsgBoxStyle.OKOnly)
End If
End Sub
'查看合作
Private Sub btnCoopInfo_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnCoopInfo.Click
Dim dmCoop As New clientMgrBusiness.CooperateDataModel
'获取选中的合作记录
If GetCoopFromListView(tlvCoop, dmCoop) <> "" Then Exit Sub
'显示对话框
Dim frm As New frmAddCoop
If frm.RetriveCoop(dmCoop, clientMgrBusiness.dmViewType.vtInfo, m_dmClient) = False Then Exit Sub
'如果转入了修改状态,则更新数据库
If frm.ViewType = clientMgrBusiness.dmViewType.vtModify Then
Dim ErrMsg As String
Dim coopObj As New clientMgrBusiness.Cooperate
ErrMsg = coopObj.Update(dmCoop)
If ErrMsg = "" Then
AddCooperateToListView(dmCoop, tlvCoop, True)
Else
MsgBox(ErrMsg, MsgBoxStyle.Critical + MsgBoxStyle.OKOnly)
End If
End If
End Sub
'删除合作
Private Sub btnDelCoop_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles btnDelCoop.Click
If MsgBox("要删除合作?", MsgBoxStyle.Question + MsgBoxStyle.YesNo + MsgBoxStyle.DefaultButton2) = MsgBoxResult.No Then Exit Sub
Dim dmCoop As New clientMgrBusiness.CooperateDataModel
'获取选中的合作记录,
'此步可保证下面调用tlvCoop.SelectedItem(0)是安全的
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -