-
This commit is contained in:
@@ -812,25 +812,28 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
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 VendedorAsistente = get_GlobalDTVendedores(UsuarioActual.CveEmpresa,VendedorTipo:3).FiltroPrimero(string.Format("CveSuperior = {0}", CveVendedor));
|
||||
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente : CveCliente).FiltroPrimero("");
|
||||
string CobranzaCorreo = "";
|
||||
string CorreoEntregaAlmacen = "";
|
||||
string CorreoEntregaCompras = "";
|
||||
string CorreoVendedor = "";
|
||||
string CorreoAdicionalNotificacionesVendedor = "";
|
||||
string CorreoNotificaciones = ObjVentas.DtResultados.Rows[0]["CorreoNotificacion"] != null ? ObjVentas.DtResultados.Rows[0]["CorreoNotificacion"].ToString():"";
|
||||
string CorreoAsistente = "";
|
||||
|
||||
if (Cliente != null) {
|
||||
CobranzaCorreo=Cliente["CobranzaCorreo"].ToString();
|
||||
CorreoEntregaAlmacen=Cliente["CorreoEntregaAlmacen"].ToString();
|
||||
CorreoEntregaCompras = Cliente["CorreoEntregaCompras"].ToString();
|
||||
}
|
||||
if (Vendedor != null)
|
||||
{
|
||||
CorreoVendedor=Vendedor["Correo"].ToString();
|
||||
CorreoAdicionalNotificacionesVendedor=Vendedor["CorreoAdicionalNotificaciones"].ToString();
|
||||
//CorreoAdicionalNotificacionesVendedor=Vendedor["CorreoAdicionalNotificaciones"].ToString();
|
||||
}
|
||||
|
||||
string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CobranzaCorreo, CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoAdicionalNotificacionesVendedor);
|
||||
if (VendedorAsistente != null)
|
||||
{
|
||||
CorreoAsistente = VendedorAsistente["Correo"].ToString();
|
||||
}
|
||||
string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoNotificaciones, CorreoAsistente);
|
||||
return CorreosConcat;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
|
||||
@@ -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