Exemplo n.º 1
0
        public async Task <ObservableCollection <Patient_Table> > GetPatientIDAsync()
        {
#if OFFLINE_SYNC_ENABLED//din zidta biex ngib il patients
            if (syncItems)
            {
                await this.SyncAsync();
            }
#endif
            IEnumerable <Patient_Table> items = await patient_Table
                                                .ToEnumerableAsync();

            return(new ObservableCollection <Patient_Table>(items));
        }
Exemplo n.º 2
0
        //test get stuff//
        public async Task <IEnumerable <MissionDataModel> > GetStuff4Async(string maker)
        {
            Initialize();
            IEnumerable <MissionDataModel> x = await missionsTable.ToEnumerableAsync();

            return(x);
        }
Exemplo n.º 3
0
        public async Task <ObservableCollection <AlertItem> > GetAlertItemsAsync(bool syncItems = false)
        {
            try
            {
#if OFFLINE_SYNC_ENABLED
                if (syncItems)
                {
                    await this.SyncAsync();
                }
#endif
                IEnumerable <AlertItem> items = await alertTable
                                                // .Where(alertItem => !alertItem.Done)
                                                .ToEnumerableAsync();

                return(new ObservableCollection <AlertItem>(items));
            }
            catch (MobileServiceInvalidOperationException msioe)
            {
                Debug.WriteLine(@"Invalid sync operation: {0}", msioe.Message);
            }
            catch (Exception e)
            {
                Debug.WriteLine(@"Sync error: {0}", e.Message);
            }
            return(null);
        }
Exemplo n.º 4
0
        private async void LeerTabla()
        {
            IEnumerable <_13090371> elementos = await Tabla.ToEnumerableAsync();

            Items          = new ObservableCollection <_13090371>(elementos);
            BindingContext = this;
        }
Exemplo n.º 5
0
        public async Task <ObservableCollection <Boardgames> > GetBoardgamesAsync(bool syncItems = false)
        {
            try
            {
#if OFFLINE_SYNC_ENABLED
                if (syncItems)
                {
                    await this.SyncAsync();
                }
#endif
                IEnumerable <Boardgames> items = await boardgamesTable
                                                 .ToEnumerableAsync();

                return(new ObservableCollection <Boardgames>(items));
            }
            catch (MobileServiceInvalidOperationException msioe)
            {
                Debug.WriteLine(@"Invalid sync operation: {0}", msioe.Message);
            }
            catch (Exception e)
            {
                Debug.WriteLine(@"Sync error: {0}", e.Message);
            }
            return(null);
        }
        public async Task Carregar()
        {
            IEnumerable <Atividade> items = await atividadeTable
                                            .ToEnumerableAsync();

            Atividades = new ObservableCollection <Atividade>(items);
        }
Exemplo n.º 7
0
        private async void leerAlumnos()
        {
            IEnumerable <Registrosusuarios> elementos = await tabla.ToEnumerableAsync();

            Items          = new ObservableCollection <Registrosusuarios>(elementos);
            BindingContext = this;
            InitializeComponent();
        }
Exemplo n.º 8
0
        private async void LeerTareas()
        {
            IEnumerable <tareasmire> elementos = await Tabla2.ToEnumerableAsync();

            Items2         = new ObservableCollection <tareasmire>(elementos);
            BindingContext = this;
            InitializeComponent();
        }
Exemplo n.º 9
0
        private async void LeerTabla()
        {
            IEnumerable <Registrosusuarios> elementos = await Tabla.ToEnumerableAsync();

            Items          = new ObservableCollection <Registrosusuarios>(elementos);
            BindingContext = this;
            //Lista.ItemsSource = Items;
        }
Exemplo n.º 10
0
        public Task <IEnumerable <Expense> > GetExpensesAsync()
        {
            if (expenseTable == null)
            {
                return(Task.FromResult(Enumerable.Empty <Expense>()));
            }

            return(expenseTable.ToEnumerableAsync());
        }
Exemplo n.º 11
0
        public async Task Refresh()
        {
            Headlines.Clear();
            var headlines = await table.ToEnumerableAsync();

            foreach (var headline in headlines)
            {
                Headlines.Add(headline);
            }
        }
Exemplo n.º 12
0
        public Task <IEnumerable <Expense> > GetExpensesAsync()
        {
            if (expenseTable == null)
            {
                return(Task <IEnumerable <Expense> > .Factory.StartNew(() => { return new List <Expense>(); }));
            }


            return(expenseTable.ToEnumerableAsync());
        }
Exemplo n.º 13
0
        //llenar la lista
        public async void lista2(Object sender, object EventArgs)
        {
            IEnumerable <tabletareas> items = await tabla.ToEnumerableAsync();

            string[] arreglo1 = new string[items.Count()];

            int i = 0;

            foreach (var x in items)
            {
                arreglo1[i] = x.Titulo;
                i++;
            }

            Lista2.ItemsSource = arreglo1;
        }
        private async Task RefreshItems()
        {
            _myNotesTable = App.MobileService.GetTable <MyNote>();

            IEnumerable <MyNote> items = await _myNotesTable.ToEnumerableAsync();

            _myNotesList         = new ObservableCollection <MyNote>(items);
            listView.ItemsSource = _myNotesList;

            listView.IsRefreshing = false;
        }
Exemplo n.º 15
0
        public async Task <ObservableCollection <Recipe> > GetRecipesAsync(bool syncItems = false)
        {
            try{
                IEnumerable <Recipe> recipes = await RecipeTable.ToEnumerableAsync();

                return(new ObservableCollection <Recipe>(recipes));
            } catch (MobileServiceInvalidOperationException msioe) {
                Debug.WriteLine("Invalid sync operation: {0}", new[] { msioe.Message });
            } catch (Exception e) {
                Debug.WriteLine("Sync error: {0}", new[] { e.Message });
            }
            return(null);
        }
Exemplo n.º 16
0
        public async Task <List <ActivityItem> > GetAllActivityAync()
        {
            List <ActivityItem> activity = new List <ActivityItem>();

            try {
                IEnumerable <ActivityItem> items = await activitiesTable.ToEnumerableAsync();

                activity = new List <ActivityItem>(items.OrderByDescending(o => o.ActivityDate));
            }
            catch { }

            return(activity);
        }
Exemplo n.º 17
0
        public async Task <IEnumerable <Contact> > GetContacts()
        {
            var empty = new Contact[0];

            try
            {
                return(await _table.ToEnumerableAsync());
            }
            catch (Exception ex)
            {
                return(empty);
            }
        }
Exemplo n.º 18
0
        public async Task <ObservableCollection <Fear_Table> > GetFearItemsCountAsync()
        {
#if OFFLINE_SYNC_ENABLED
            if (syncItems)
            {
                await this.SyncAsync();
            }
#endif
            IEnumerable <Fear_Table> items = await fear_Table
                                             .ToEnumerableAsync();

            return(new ObservableCollection <Fear_Table>(items));
        }
Exemplo n.º 19
0
        public async Task <IEnumerable <FrutasAzure> > ObterFrutas()
        {
            var empty = new FrutasAzure[0];

            try
            {
                return(await _table.ToEnumerableAsync());
            }
            catch (System.Exception ex)
            {
                return(empty);
            }
        }
Exemplo n.º 20
0
        public async Task <IEnumerable <TEntity> > RetonarAll()
        {
            var empty = new TEntity[0];

            try
            {
                return(await Table.ToEnumerableAsync());
            }
            catch (Exception)
            {
                return(empty);
            }
        }
Exemplo n.º 21
0
        public async Task <ObservableCollection <Alarm_Table> > GetAlarmTableItemsAsync()
        {
#if OFFLINE_SYNC_ENABLED
            if (syncItems)
            {
                await this.SyncAsync();
            }
#endif
            IEnumerable <Alarm_Table> items = await alarm_Table
                                              .ToEnumerableAsync();

            return(new ObservableCollection <Alarm_Table>(items));
        }
        public async Task <IEnumerable <Projeto> > GetAll()
        {
            var empty = new Projeto[0];

            try
            {
                return(await Table.ToEnumerableAsync());
            }
            catch (Exception)
            {
                return(empty);
            }
        }
Exemplo n.º 23
0
        public async Task <ObservableCollection <LUT_Alarm_Danger_Category> > GetLUT_Alarm_Danger_CategoryTableItemsAsync()
        {
#if OFFLINE_SYNC_ENABLED
            if (syncItems)
            {
                await this.SyncAsync();
            }
#endif
            IEnumerable <LUT_Alarm_Danger_Category> items = await lut_alarm_danger_table
                                                            .ToEnumerableAsync();

            return(new ObservableCollection <LUT_Alarm_Danger_Category>(items));
        }
Exemplo n.º 24
0
        public async Task <List <Court> > GetAllCourtsAync()
        {
            var courts = new List <Court>();

            try
            {
                var items = await m_courtTable.ToEnumerableAsync();

                courts.AddRange(items);
            }
            catch { }

            return(courts);
        }
Exemplo n.º 25
0
        public async Task <List <Player> > GetAllPlayersAync()
        {
            var activity = new List <Player>();

            try
            {
                var items = await m_playerTable.ToEnumerableAsync();

                activity.AddRange(items);
            }
            catch { }

            return(activity);
        }
Exemplo n.º 26
0
        private async void Tareas()
        {
            IEnumerable <litho> elementos = await Tabla.ToEnumerableAsync();

            items = new ObservableCollection <litho>(elementos);
            int cont = items.Count;
            var List = new List <string>();

            for (int i = 0; i < cont; i++)
            {
                List.Add(items[i].Titulo);
            }
            Dependencia.ItemsSource = List;
        }
        public async Task <ObservableCollection <UserItem> > GetUsersAsync()
        {
            try
            {
                IEnumerable <UserItem> users = await userTable.ToEnumerableAsync();

                return(new ObservableCollection <UserItem>(users));
            }
            catch (Exception e)
            {
                Debug.WriteLine(@"Sync error: {0}", e.Message);
            }
            return(null);
        }
Exemplo n.º 28
0
        public async Task <List <Venue.Venue> > GetAllVenuesAync()
        {
            var venues = new List <Venue.Venue>();

            try
            {
                var items = await m_venueTable.ToEnumerableAsync();

                venues.AddRange(items);
            }
            catch { }

            return(venues);
        }
Exemplo n.º 29
0
        private async void LeerTareasAsignada()
        {
            IEnumerable <asignaciontareas> elementos2 = await Tabla2.ToEnumerableAsync();

            Items2 = new ObservableCollection <asignaciontareas>(elementos2);
            int cont = Items2.Count;
            var List = new List <string>();

            for (int i = 0; i < cont; i++)
            {
                List.Add(Items2[i].Tarea);
            }
            pkrDependenciaUser.ItemsSource = List;
        }
Exemplo n.º 30
0
        private async void leerTareasAsignadas()
        {
            IEnumerable <asignaciontareas> elementos2 = await Tabla1.ToEnumerableAsync();

            Items = new ObservableCollection <asignaciontareas>(elementos2);
            int cont = Items.Count;
            var ListaTareasAsignadas = new List <string>();
            var codigo = new List <string>();

            for (int i = 0; i < cont; i++)
            {
                ListaTareasAsignadas.Add(Items[i].Id + " Tarea :" + Items[i].Tarea + " asignada a :" + Items[i].Id_usuario);
            }
            pkrDependencia.ItemsSource = ListaTareasAsignadas;
        }