CARGA DE TRABAJO 1 Y 2

This commit is contained in:
Antonio Gonzalez
2020-06-14 17:48:44 -07:00
parent aae6187f95
commit cd24b5128a
11 changed files with 291 additions and 138 deletions

View File

@@ -400,6 +400,8 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
else
{
ObjGeneral.Commit();
string notificacionCorreos = getCorreoString();
MandaCorreoNotificacionGuia(notificacionCorreos);
if (Guia == "-1")
{
if (CveVenta > 0 || CveOC > 0 || CveMovimiento > 0 || CveCompra > 0)
@@ -718,7 +720,6 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
}
Destinatario = $"{DbRowVenta["Mail"].ToString()};{DbRowVenta["CorreoVendedorVenta"].ToString()}{CorreoAsistente}";
if (ObjVentas.GetVentaDetalle(CveVenta))
{
DTMovimientos = ObjVentas.DtResultados;
@@ -727,6 +728,32 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
}
}
}
private string getCorreoString()
{
ClsVentas ObjVentas = new ClsVentas();
if (ObjVentas.GetVenta(CveVenta,UsuarioActual.CveEmpresa))
{
int CveVendedor = ObjVentas.DtResultados.Rows[0]["CveVendedor"].ToEntero();
int CveCliente = ObjVentas.DtResultados.Rows[0]["CveCliente"].ToEntero();
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}",CveVendedor));
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
string CorreosConcat = "{0};{1};{2};{3};{4}";
return CorreosConcat;
}
ObjVentas.Dispose();
return "";
}
private void MandaCorreoNotificacionGuia(string Correos)
{
Correos.GuardaLog();
ClsSisMail MailCls = new ClsSisMail();
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, "Se enviara la compra a su dirección", "Pendiente", Correos);
MailCls = null;
}
#endregion
}