public static void QuitarDeseo(string idProducto)
        {
            var Current        = HttpContext.Current;
            var logueadoStatic = (UsuarioEntidad)Current.Session["Usuario"];
            //List<ListaDeseoEntidad> unosDeseos = new List<ListaDeseoEntidad>();
            List <ProductoEntidad> unosProdDeseados = new List <ProductoEntidad>();
            ListaDeseosCore        ManagerDeseos    = new ListaDeseosCore();
            ListaDeseoEntidad      unaListaDeseo    = new ListaDeseoEntidad();
            ProductoCore           unProductoCore   = new ProductoCore();

            //Quitar al producto de la lista de deseos (solo de SESSION), no así de la bd
            unosProdDeseados = (List <ProductoEntidad>)Current.Session["ListaDeseos"];

            if (unosProdDeseados != null || unosProdDeseados.Any())
            {
                unosProdDeseados.RemoveAll(x => x.IdProducto == Int32.Parse(idProducto));
                Current.Session["ListaDeseos"] = unosProdDeseados;
            }

            //Quitar al producto en BD de la lista de deseos
            ListaDeseoEntidad DeseoEliminar = new ListaDeseoEntidad();

            DeseoEliminar.IdProducto    = Int32.Parse(idProducto);
            DeseoEliminar.NombreUsuario = logueadoStatic.NombreUsuario;
            ManagerDeseos.ListaDeseosDelete(DeseoEliminar);
        }
        public static string ComprarProducto(string IdProdC)
        {
            var Current = HttpContext.Current;
            var manager = new ProductoCore();

            producto = manager.Find(Int32.Parse(IdProdC), 1);
            List <ProductoEntidad> ListaDeseo = new List <ProductoEntidad>();
            UsuarioEntidad         logueadoStatic;

            logueadoStatic = (UsuarioEntidad)Current.Session["Usuario"];
            //var list = (List<ProductoEntidad>)Current.Session["ListaDeseos"];
            var list = (List <ProductoEntidad>)Current.Session["Productos"];

            if (logueadoStatic != null)
            {
                if (list == null || !list.Any())
                {
                    Current.Session["Productos"] = new List <ProductoEntidad>();
                    ((List <ProductoEntidad>)Current.Session["Productos"]).Add(producto);
                }
                else
                {
                    if (!list.Where(x => x.IdProducto == producto.IdProducto).Any())
                    {
                        ((List <ProductoEntidad>)Current.Session["Productos"]).Add(producto);
                    }
                }


                //Quitar al producto de la lista de deseos (solo de SESSION), no así de la bd
                ListaDeseo = (List <ProductoEntidad>)Current.Session["ListaDeseos"];

                if (ListaDeseo != null || ListaDeseo.Any())
                {
                    ListaDeseo.RemoveAll(x => x.IdProducto == producto.IdProducto);
                    //Current.Session["ListaDeseos"] = new List<ProductoEntidad>();
                    Current.Session["ListaDeseos"] = ListaDeseo;
                }

                //Quitar al producto en BD de la lista de deseos
                ListaDeseosCore   unListaDeseoCore = new ListaDeseosCore();
                ListaDeseoEntidad DeseoEliminar    = new ListaDeseoEntidad();
                DeseoEliminar.IdProducto    = producto.IdProducto;
                DeseoEliminar.NombreUsuario = logueadoStatic.NombreUsuario;
                unListaDeseoCore.ListaDeseosDelete(DeseoEliminar);
            }
            return(producto.DescripProducto);
        }