Agrupador filtro TipoCliente, Unificaion Correos de notificacion de Pago

This commit is contained in:
Rakcsle Supertramp
2020-07-04 14:18:41 -07:00
parent 99f99baaff
commit 828bee6c17
25 changed files with 2111 additions and 1985 deletions

View File

@@ -437,6 +437,22 @@ Partial Class Bancos_PopIECompras
End Set
End Property
Private Property NotificarA As String
Get
If ViewState("NotificarA") Is Nothing Then
Return ""
Else
Return ViewState("NotificarA").ToString
End If
End Get
Set(value As String)
ViewState("NotificarA") = value
End Set
End Property
#End Region
Private Sub Bancos_PopIECompras_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -724,6 +740,10 @@ Partial Class Bancos_PopIECompras
ViewState("CveCuentaRetIVA") = ObjProveedor.CveCuentaRetIVA
ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria
ViewState("NotificarA") = ObjProveedor.NotificarA.Trim()
Else
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
End If
@@ -3351,7 +3371,10 @@ Partial Class Bancos_PopIECompras
If IdPoliza > 0 Then
StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
End If
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False)
Else
ObjIE.RollBack()
Alert(MsgError, TipoMensaje.MsgError)
@@ -3359,11 +3382,60 @@ Partial Class Bancos_PopIECompras
ObjIE.Dispose()
ObjMov.Dispose()
End Sub
End Sub
#End Region
#Region "ENVIAR CORREO NOTIFICACION DE PAGO"
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
Try
Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
'Dim Hilo As New Threading.Thread( EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
Hilo.Start()
If MostarAlert Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
End If
Catch ex As Exception
If MostarAlert Then
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
End Try
End Sub
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
Try
Dim ObjBancos As New ClsBancos()
If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
Else
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
ObjBancos.Dispose()
Catch ex As Exception
GuardaLog("Error al enviar notificación de pago PopIECompras --> " & ex.StackTrace.ToString)
End Try
End Sub
#End Region
#Region "COMPLEMENTO DE PAGO"
Private Sub GeneraTimbre(CvePrePoliza As Integer)
Dim Str As New StringBuilder