fix colors when deleting
This commit is contained in:
parent
a049166d83
commit
c859a721e6
@ -12,7 +12,6 @@ Public Class ReceiverModel
|
||||
End Sub
|
||||
|
||||
Private Function ToReceiver(pRow As DataRow, pColorIndex As Integer) As EnvelopeReceiver
|
||||
|
||||
Dim EmailAdress As String = pRow.ItemEx("EMAIL_ADDRESS", "")
|
||||
Dim EnvelopeId As Integer = pRow.ItemEx("ENVELOPE_ID", 0)
|
||||
Dim SignedDate As DateTime = DateTime.MinValue
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.Export.Xl
|
||||
Imports DevExpress.Utils.Drawing
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraGrid
|
||||
@ -345,10 +346,15 @@ Partial Public Class frmEnvelopeEditor
|
||||
|
||||
Private Sub ViewReceivers_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles ViewReceivers.InitNewRow
|
||||
Dim oReceiver As EnvelopeReceiver = ViewReceivers.GetRow(e.RowHandle)
|
||||
Dim oRowCount = ViewReceivers.RowCount
|
||||
Dim oColorType = DirectCast(oRowCount, ColorType)
|
||||
|
||||
oReceiver.ColorType = oColorType
|
||||
Dim oUsedColors = Receivers.Select(Of Integer)(Function(r) r.ColorType).ToList()
|
||||
Dim oAllColors = [Enum].GetValues(GetType(ColorType)).Cast(Of Integer).ToList()
|
||||
Dim oUnusedColors = oAllColors.Except(oUsedColors)
|
||||
If oUnusedColors.Any() Then
|
||||
oReceiver.ColorType = oUnusedColors.Min()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmEnvelopeEditor_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
@ -419,13 +425,6 @@ Partial Public Class frmEnvelopeEditor
|
||||
RibbonPageGroupAddSignature_Enabled()
|
||||
End Sub
|
||||
|
||||
Private Sub ViewReceivers_CellValueChanging(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanging
|
||||
'If e.Column.FieldName = "Email" Then
|
||||
' Dim oEmailAdress As String = DirectCast(e.Value, String)
|
||||
' Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub ViewReceivers_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanged
|
||||
If e.Column.FieldName = "Email" Then
|
||||
Dim oLastCellValue = ViewReceivers.GetRowCellValue(e.RowHandle, "Name")
|
||||
@ -433,6 +432,9 @@ Partial Public Class frmEnvelopeEditor
|
||||
Dim oEmailAdress As String = DirectCast(e.Value, String)
|
||||
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns("Name"), oLastName)
|
||||
|
||||
|
||||
'ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns("Color"), Color.Red)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user