コード例 #1
0
        private async void LoadNotificaciones()
        {
            var content = new FormUrlEncodedContent(new[]
            {
                new KeyValuePair <string, string>("nus_id_usuario", Application.Current.Properties["IdUsuario"].ToString())
            });


            var response = await this.apiService.Get <NotificacionesReturn>("/notificaciones/", "usuarioNotificaciones", content);

            if (!response.IsSuccess)
            {
            }
            this.list = (NotificacionesReturn)response.Result;

            NotificacionesDetalle = new ObservableCollection <NotificacionesDetalle>(this.ToPromocionesItemViewModel());
        }
コード例 #2
0
        private async void LoadConfiguracionNotificaciones()
        {
            try
            {
                var content = new FormUrlEncodedContent(new[]
                {
                    new KeyValuePair <string, string>("nus_id_usuario", Application.Current.Properties["IdUsuario"].ToString())
                });


                var response = await this.apiService.Get <NotificacionesReturn>("/notificaciones/", "usuarioNotificaciones", content);

                if (!response.IsSuccess)
                {
                }
                this.listConfigNotificaciones = (NotificacionesReturn)response.Result;

                this.ConfigNotificacionesDetalle = new ObservableCollection <NotificacionesDetalle>(this.ToNotificacionesItemViewModel());


                foreach (var item in ConfigNotificacionesDetalle)
                {
                    switch (item.not_nombre)
                    {
                    case "Avisos":
                        this.Avisos = Convert.ToBoolean(item.nus_activa);
                        AvisosID    = item.nus_id_notificacion;
                        break;

                    case "Chat":
                        this.Chat = Convert.ToBoolean(item.nus_activa);
                        ChatID    = item.nus_id_notificacion;
                        break;

                    case "Eventos":
                        this.Eventos = Convert.ToBoolean(item.nus_activa);
                        EventosID    = item.nus_id_notificacion;
                        break;

                    case "Promociones":
                        this.Promociones = Convert.ToBoolean(item.nus_activa);

                        PromocionesID = item.nus_id_notificacion;
                        break;

                    case "Reservaciones":
                        this.Reservaciones = Convert.ToBoolean(item.nus_activa);

                        ReservacionesID = item.nus_id_notificacion;
                        break;

                    case "Shows":
                        this.Show = Convert.ToBoolean(item.nus_activa);
                        ShowID    = item.nus_id_notificacion;
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }