-
This commit is contained in:
@@ -175,6 +175,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
ViewState["Folio"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1008,6 +1009,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
|
||||
int CveCliente = DbRowVenta["CveCliente"].ToString().ToEntero();
|
||||
int CveVendedor = DbRowVenta["CveVendedor"].ToString().ToEntero();
|
||||
string CorreoNotificacion = DbRowVenta["CorreoNotificacion"] != null ? DbRowVenta["CorreoNotificacion"].ToString():"";
|
||||
SerieFolio = String.Format("{0}-{1}", DbRowVenta["Serie"].ToString(), DbRowVenta["Folio"].ToString().ToEntero());
|
||||
NombreCliente = DbRowVenta["ClienteNombre"].ToString();
|
||||
|
||||
@@ -1027,7 +1029,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
Destinatario = "sig.buzon02@gmail.com"; // CORREO PRUEBA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(280) == "1" && CveCliente > 0 && CveVendedor > 0)
|
||||
{
|
||||
Destinatario = getCorreoNotificacion(CveCliente, CveVendedor);
|
||||
Destinatario = getCorreoNotificacion(CveCliente, CveVendedor,CorreoNotificacion);
|
||||
}
|
||||
|
||||
if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||
@@ -1037,20 +1039,24 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
|
||||
}
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private string getCorreoNotificacion(int CveCliente, int CveVendedor)
|
||||
private string getCorreoNotificacion(int CveCliente, int CveVendedor,string CorreoNotificacion)
|
||||
{
|
||||
DataRow DatosCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}", CveCliente));
|
||||
DataRow DatosVendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}", CveVendedor));
|
||||
string CorreoAsistente = get_GlobalDTVendedores(UsuarioActual.CveEmpresa,VendedorTipo:3).FiltroPrimeroValor("Correo", string.Format("CveSuperior = {0}", CveVendedor));
|
||||
if (DatosCliente != null && DatosVendedor != null)
|
||||
{
|
||||
StringBuilder correos = new StringBuilder("");
|
||||
if (DatosCliente["CorreoEntregaCompras"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaCompras"].ToString()));
|
||||
if (DatosCliente["CorreoEntregaAlmacen"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaAlmacen"].ToString()));
|
||||
if (DatosVendedor["Correo"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["Correo"].ToString()));
|
||||
if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString()));
|
||||
correos.Append(CorreoNotificacion + ";");
|
||||
correos.Append(CorreoAsistente + ";");
|
||||
//if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString()));
|
||||
return correos.ToString();
|
||||
}
|
||||
return "";
|
||||
@@ -1104,7 +1110,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
string detalle = string.Format("<tr><td style='width:25%'>{0}</td><td style='width:25%'>{1}</td><td style='width:50%'>{2}</td></tr>", dRow["Codigo"], dRow["Cantidad"], dRow["PS"]);
|
||||
DetalleTable += detalle;
|
||||
}
|
||||
|
||||
CargaDatosCorreo(CveVenta);
|
||||
StringBuilder strBody = new StringBuilder();
|
||||
strBody.Append("<html>");
|
||||
strBody.Append("<head>");
|
||||
|
||||
Reference in New Issue
Block a user