Funcionalidad para enviar correo cuando se desactiva cliente
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2465,11 +2465,7 @@ Partial Class Clientes
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(571).ToEntero > 0 And ChkEstado.Checked = False Then
|
||||
Dim Correo As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("", "")
|
||||
End If
|
||||
ObjClientes.Commit()
|
||||
|
||||
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
|
||||
Dim MensajeCRM As String = ""
|
||||
@@ -2540,13 +2536,8 @@ Partial Class Clientes
|
||||
|
||||
ObjClientes.Commit()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
If EstatusAnteriorCliente <> ChkEstado.Checked Then
|
||||
|
||||
Dim DTVendedor As New DataTable
|
||||
@@ -2555,7 +2546,7 @@ Partial Class Clientes
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
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 Para As String = _CorreoVendedor
|
||||
@@ -2563,19 +2554,22 @@ Partial Class Clientes
|
||||
|
||||
If ChkEstado.Checked Then
|
||||
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
|
||||
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))
|
||||
End If
|
||||
EstatusAnteriorCliente = ChkEstado.Checked
|
||||
MandaCorreo(Asunto, Para, SBBody.ToString)
|
||||
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
|
||||
MandaCorreo(Asunto, Para + ";adssistemas@adssistemas.mx", SBBody.ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user