se agregó consulta de correos para mandar norificaciones en caso de permisos de 280

This commit is contained in:
Antonio Gonzalez
2020-06-15 15:14:03 -07:00
parent ec4624c5b5
commit 75a8477d52

View File

@@ -930,6 +930,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
DataRow DbRowVenta = ObjVentas.DtResultados.Rows[0];
int CveCliente = DbRowVenta["CveCliente"].ToString().ToEntero();
int CveVendedor = DbRowVenta["CveVendedor"].ToString().ToEntero();
SerieFolio = String.Format("{0}-{1}", DbRowVenta["Serie"].ToString(), DbRowVenta["Folio"].ToString().ToEntero());
NombreCliente = DbRowVenta["ClienteNombre"].ToString();
@@ -947,6 +948,10 @@ 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);
//}
if (ObjVentas.GetVentaDetalle(CveVenta))
{
@@ -957,6 +962,22 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
}
}
}
private string getCorreoNotificacion(int CveCliente, int CveVendedor)
{
DataRow DatosCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
DataRow DatosVendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {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()));
return correos.ToString();
}
return "";
}
#endregion
protected void Reasignar_Click(object sender, EventArgs e)