diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index c3145cdcd..fcd6e3b9f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -592,12 +592,12 @@ Partial Class Ventas End Property Private ReadOnly Property Mail As String Get - Return ViewState("Mail").ToString() + Return IfNull(ViewState("Mail"), "").ToString() End Get End Property Private ReadOnly Property MailCC As String Get - Return ViewState("MailCC").ToString() + Return IfNull(ViewState("MailCC"), "").ToString() End Get End Property Private ReadOnly Property CveVenta As Integer @@ -21148,17 +21148,17 @@ Partial Class Ventas Dim ObjMail As New ClsSisMail() Dim ResultadoMail As Integer = 0 - - Dim CorreoDestino As String = "" + If Me.Mail.Trim.Length > 0 Then + CorreoDestino = Me.Mail + End If + If CorreoContactoCRM.Trim.Length > 0 Then CorreoDestino = CorreoContactoCRM ViewState("MailCC") = "" End If - - Try Dim Asunto As String = String.Empty