- error de no existir objeto

This commit is contained in:
rrene
2020-07-24 18:51:27 -07:00
parent 4dc85cf261
commit aa6b319c3b

View File

@@ -8,6 +8,7 @@ using Extensiones;
using System.Data;
using System.Text;
using Microsoft.Reporting.WebForms;
using System.Activities.Expressions;
public partial class General_PopUpPaqueteriasGuias : ClsPaginas
{
@@ -811,13 +812,23 @@ 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 Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente : CveCliente).FiltroPrimero("");
string CobranzaCorreo = "";
string CorreoEntregaAlmacen = "";
string CorreoEntregaCompras = "";
string CorreoVendedor = "";
string CorreoAdicionalNotificacionesVendedor = "";
string CobranzaCorreo = Cliente["CobranzaCorreo"].ToString();
string CorreoEntregaAlmacen = Cliente["CorreoEntregaAlmacen"].ToString();
string CorreoEntregaCompras = Cliente["CorreoEntregaCompras"].ToString();
string CorreoVendedor = Vendedor["Correo"].ToString();
string CorreoAdicionalNotificacionesVendedor = Vendedor["CorreoAdicionalNotificaciones"].ToString();
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();
}
string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CobranzaCorreo, CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoAdicionalNotificacionesVendedor);
return CorreosConcat;