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
|
If ErrorProceso Then
|
||||||
ObjClientes.RollBack()
|
ObjClientes.RollBack()
|
||||||
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 = ""
|
||||||
@@ -2540,13 +2536,8 @@ Partial Class Clientes
|
|||||||
|
|
||||||
ObjClientes.Commit()
|
ObjClientes.Commit()
|
||||||
|
|
||||||
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,19 +2554,22 @@ 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
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user