notificación
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<asp:GridView ID="GvPaqueteriasGuias" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePaqueteriaGuia,Folio,FechaIng,Nombre,Contacto,Estatus,CobranzaCorreo,CorreoEntregaAlmacen,CorreoEntregaCompras,Correo,CorreoAdicionalNotificaciones"
|
||||
DataKeyNames="CvePaqueteriaGuia,Folio,FechaIng,Nombre,Contacto,Estatus,CobranzaCorreo,CorreoEntregaAlmacen,CorreoEntregaCompras,Correo,CorreoAdicionalNotificaciones,CveVenta,PedidoContrato,OrdenCompra,NombreComercial"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
|
||||
@@ -55,19 +55,20 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
TieneError = true;
|
||||
}else
|
||||
{
|
||||
string CobranzaCorreo = row.DataKey("CobranzaCorreo");
|
||||
string CorreoEntregaAlmacen = row.DataKey("CorreoEntregaAlmacen");
|
||||
string CorreoEntregaCompras = row.DataKey("CorreoEntregaCompras");
|
||||
string CorreoVendedor = row.DataKey("Correo");
|
||||
string CorreoAdicionalNotificacionesVendedor = row.DataKey("CorreoAdicionalNotificaciones");
|
||||
MandarNotificacionCorreo(row);
|
||||
//string CobranzaCorreo = row.DataKey("CobranzaCorreo");
|
||||
//string CorreoEntregaAlmacen = row.DataKey("CorreoEntregaAlmacen");
|
||||
//string CorreoEntregaCompras = row.DataKey("CorreoEntregaCompras");
|
||||
//string CorreoVendedor = row.DataKey("Correo");
|
||||
//string CorreoAdicionalNotificacionesVendedor = row.DataKey("CorreoAdicionalNotificaciones");
|
||||
|
||||
string CorreosCC = string.Format("{0};{1};{2};{3}", CorreoVendedor, CorreoAdicionalNotificacionesVendedor, CobranzaCorreo, CorreoEntregaCompras);
|
||||
string LogCorreo = string.Format("{0} -- {1} --- {2}", "Tipo de entrega", CorreoEntregaAlmacen, CorreosCC);
|
||||
LogCorreo.GuardaLog();
|
||||
//string CorreosCC = string.Format("{0};{1};{2};{3}", CorreoVendedor, CorreoAdicionalNotificacionesVendedor, CobranzaCorreo, CorreoEntregaCompras);
|
||||
//string LogCorreo = string.Format("{0} -- {1} --- {2}", "Tipo de entrega", CorreoEntregaAlmacen, CorreosCC);
|
||||
//LogCorreo.GuardaLog();
|
||||
|
||||
ClsSisMail MailCls = new ClsSisMail();
|
||||
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoVendedor, "Se enviara la compra a su dirección", "Pendiente", CorreosCC);
|
||||
MailCls = null;
|
||||
//ClsSisMail MailCls = new ClsSisMail();
|
||||
//MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoVendedor, "Se enviara la compra a su dirección", "Pendiente", CorreosCC);
|
||||
//MailCls = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,4 +122,57 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
|
||||
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF",RDSName:"DsInventarios");
|
||||
}
|
||||
|
||||
private byte[] DocumentoEntregaInterna(GridViewRow row)
|
||||
{
|
||||
string ClienteNombre = row.DataKey("NombreComercial");
|
||||
string FolioVenta = row.DataKey("Folio");
|
||||
string Pedido = row.DataKey("PedidoContrato");
|
||||
string OrdenCompra = row.DataKey("OrdenCompra");
|
||||
int CveVenta = row.DataKey("CveVenta").ToEntero();
|
||||
|
||||
DataTable DtDetalle = new DataTable();
|
||||
ClsVentas ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||
{
|
||||
DtDetalle = ObjVentas.DtResultados;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
|
||||
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||
RepParams.Add(new ReportParameter("Cliente", ClienteNombre));
|
||||
RepParams.Add(new ReportParameter("FolioVenta", FolioVenta));
|
||||
RepParams.Add(new ReportParameter("Pedido", Pedido));
|
||||
RepParams.Add(new ReportParameter("OrdenCompra", OrdenCompra));
|
||||
return StreamPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/GuiaInternaAsignada.rdlc", DtDetalle, RepParams, "Notificacion de Envio", "PDF", RDSName: "DsInventarios");
|
||||
}
|
||||
|
||||
private void MandarNotificacionCorreo(GridViewRow row)
|
||||
{
|
||||
string CobranzaCorreo = row.DataKey("CobranzaCorreo");
|
||||
string CorreoEntregaAlmacen = row.DataKey("CorreoEntregaAlmacen");
|
||||
string CorreoEntregaCompras = row.DataKey("CorreoEntregaCompras");
|
||||
string CorreoVendedor = row.DataKey("Correo");
|
||||
string CorreoAdicionalNotificacionesVendedor = row.DataKey("CorreoAdicionalNotificaciones");
|
||||
|
||||
string Para = string.Format("{0};{1};{2};{3}", CorreoVendedor, CorreoAdicionalNotificacionesVendedor, CobranzaCorreo, CorreoEntregaCompras);
|
||||
string LogCorreo = string.Format("{0} -- {1} --- {2}", "Tipo de entrega", CorreoEntregaAlmacen, Para);
|
||||
LogCorreo.GuardaLog();
|
||||
|
||||
byte[] ArchivoBinario = DocumentoEntregaInterna(row);
|
||||
|
||||
ClsSisMail MailCls = new ClsSisMail();
|
||||
List<ClsSisMail.ArchivoMail> LSRutasMail = new List<ClsSisMail.ArchivoMail>();
|
||||
ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail();
|
||||
|
||||
{
|
||||
var withBlock = itemMail;
|
||||
itemMail.ArchivoBinario = ArchivoBinario;
|
||||
itemMail.NombreArchivo = "Notificacion de Envio";
|
||||
}
|
||||
|
||||
LSRutasMail.Add(itemMail);
|
||||
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Para, "Se enviara la compra a su dirección", "Pendiente", Para);
|
||||
MailCls = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user