Funcionalidad para enviar correo cuando se desactiva cliente

This commit is contained in:
janeth arvizu
2019-11-04 11:33:12 -07:00
parent 15e47a3c55
commit b103d0360b
2 changed files with 14 additions and 20 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2467,10 +2467,6 @@ Partial Class Clientes
Else Else
ObjClientes.Commit() ObjClientes.Commit()
If UsuarioActual.Empresa.Funcionalidad(571).ToEntero > 0 And ChkEstado.Checked = False Then
Dim Correo As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("", "")
End If
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM 'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
Dim MensajeCRM As String = "" Dim MensajeCRM As String = ""
If CveEmpresaCRM > 0 Then If CveEmpresaCRM > 0 Then
@@ -2542,11 +2538,6 @@ Partial Class Clientes
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
CargaHistorial()
CargaDatos()
UpDatos.Update()
UpnHistorial.Update()
If EstatusAnteriorCliente <> ChkEstado.Checked Then If EstatusAnteriorCliente <> ChkEstado.Checked Then
Dim DTVendedor As New DataTable Dim DTVendedor As New DataTable
@@ -2555,7 +2546,7 @@ Partial Class Clientes
If DTVendedor.Rows.Count > 0 Then If DTVendedor.Rows.Count > 0 Then
Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString
If _CorreoVendedor.Length > 0 Then If _CorreoVendedor.Length > 0 And UsuarioActual.Empresa.Funcionalidad(571).ToEntero > 0 Then
Dim Asunto As String = "" Dim Asunto As String = ""
Dim Para As String = _CorreoVendedor Dim Para As String = _CorreoVendedor
@@ -2563,18 +2554,21 @@ Partial Class Clientes
If ChkEstado.Checked Then If ChkEstado.Checked Then
Asunto = "Activación de cliente " & TxtNombre.Text Asunto = "Activación de cliente " & TxtNombre.Text
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} a sido activado.", TxtNombre.Text)) SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido activado.", TxtNombre.Text))
Else Else
Asunto = "Desactivación de cliente " & TxtNombre.Text Asunto = "Desactivación de cliente " & TxtNombre.Text
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} a sido desactivado.", TxtNombre.Text)) SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text))
End If End If
EstatusAnteriorCliente = ChkEstado.Checked MandaCorreo(Asunto, Para + ";adssistemas@adssistemas.mx", SBBody.ToString)
MandaCorreo(Asunto, Para, SBBody.ToString)
End If End If
End If End If
End If End If
CargaHistorial()
CargaDatos()
UpDatos.Update()
UpnHistorial.Update()
End If End If
End If End If