public wnwCompletaEntrega(int pkFactura)
        {
            InitializeComponent();
            DataClasses1DataContext dc = new DataClasses1DataContext();
            SIGEEA_spObtenerAsociadoFacturaResult informacion = dc.SIGEEA_spObtenerAsociadoFactura(pkFactura).First();

            lblAsociado.Content   += " " + informacion.NombreAsociado;
            lblCedula.Content     += " " + informacion.CedParticular_Persona;
            lblCodigo.Content     += " " + informacion.Codigo_Asociado;
            lblFactura.Content    += " " + pkFactura;
            lblFecEntrega.Content += " " + informacion.Fecha;

            PK_Factura = pkFactura;
            List <SIGEEA_spObtenerInformacionEntregaResult> listaDetalles = dc.SIGEEA_spObtenerInformacionEntrega(pkFactura).ToList();

            PK_UMedida = dc.SIGEEA_spObtenerUnidadMedidaPorTipo(listaDetalles.First().FK_Id_TipProducto).First().PK_Id_UniMedida;
            bool color = true;

            foreach (SIGEEA_spObtenerInformacionEntregaResult e in listaDetalles)
            {
                uc_ItemEntrega item = new uc_ItemEntrega(e.Informacion, e.PK_Id_DetFacAsociado, e.FK_Id_TipProducto);
                item.Color(color);
                color = !color;
                stpContenedor.Children.Add(item);
            }
        }
        public wnwFacturasPendientesPago(int pFactura)
        {
            InitializeComponent();
            //    Factura = pFactura;

            try
            {
                SIGEEA_DiagramaDataContext dc = new SIGEEA_DiagramaDataContext();
                List <SIGEEA_spObtenerDetallesFacturaSinCancelarAsocResult> lista = dc.SIGEEA_spObtenerDetallesFacturaSinCancelarAsoc(pFactura).ToList();
                SIGEEA_spObtenerAsociadoFacturaResult informacion = dc.SIGEEA_spObtenerAsociadoFactura(pFactura).First();
                lblAsociado.Content   += " " + informacion.NombreAsociado;
                lblCedula.Content     += " " + informacion.CedParticular_Persona;
                lblCodigo.Content     += " " + informacion.Codigo_Asociado;
                lblFactura.Content    += " " + informacion.Numero_FacAsociado;
                lblFecEntrega.Content += " " + informacion.Fecha;
                if (lista.Count <= 0)
                {
                    throw new Exception("No se encontraron registros");
                }
                bool color = true;
                foreach (SIGEEA_spObtenerDetallesFacturaSinCancelarAsocResult df in lista)
                {
                    uc_ItemDetallePagoAsoc item = new uc_ItemDetallePagoAsoc(df, color);
                    item.cbxSeleccionar.Checked   += CbxSeleccionar_Checked;
                    item.cbxSeleccionar.Unchecked += CbxSeleccionar_Unchecked;
                    color = !color;
                    stpContenedor.Children.Add(item);
                }
            }
            catch (Exception ex)
            {
                Label lblVacio = new Label();
                lblVacio.Foreground = Brushes.IndianRed;
                lblVacio.FontSize   = 18;
                lblVacio.Width      = 430;
                lblVacio.Content    = "Error: " + ex.Message;
                lblVacio.FontWeight = FontWeights.ExtraBold;
                stpContenedor.Children.Add(lblVacio);
            }
        }