コード例 #1
0
ファイル: DataSource.cs プロジェクト: Hitchhikrr/code.fun.do
        public async Task sendinglocationrequest(string latitude, string longitude)
        {
            List_FacilityBean_Location = new List<items>();
            var response = await App.MobileService.GetTable<items>().ToListAsync();

            IMobileServiceTable<items> todoTable = App.MobileService.GetTable<items>();
            // var x = await App.MobileService.GetTable<registerTable>().ToListAsync();
            List<items> items = await todoTable.Where(todoItem => (todoItem.latitude == latitude && todoItem.longitude == longitude)).ToListAsync();
            for (int i = 0; i < items.Count(); i++)
            {
                SampleDataItem item_1 = new SampleDataItem(items[i].title, items[i].type, items[i].status, i.ToString(), items[i].image, "Location");
                List_FacilityBean_Location.Add(items[i]);

               
                this.Groups1.Add(item_1);
            }      
        }
コード例 #2
0
ファイル: DataSource.cs プロジェクト: Hitchhikrr/code.fun.do
 private async Task GetAllAsync()
 {
     List_FacilityBean_Favourite = new List<items>();
     _groups = new ObservableCollection<SampleDataItem>();
     if (Util.checkInternetConnection())
     {
         var response = await App.MobileService.GetTable<items>().ToListAsync();
         for (int i = 0; i < response.Count(); i++)
         {
             SampleDataItem item_1 = new SampleDataItem(response[i].title, response[i].type, response[i].status, i.ToString(), response[i].image , "All");
             List_FacilityBean_Favourite.Add(response[i]);
             this.Groups.Add(item_1);
             Util.debugLog(response[i].image, response[i].id, item_1.grouping, i.ToString());
         }
     }
     else
     {
         await Util.displayMessage("No Internet Connection", "Caution");
     }
 }
コード例 #3
0
ファイル: DataSource.cs プロジェクト: Hitchhikrr/code.fun.do
 private async Task GetSearchResults(string text, string section)
 {
     if (section.Equals("Groups"))
     {
         _searchgroups = new ObservableCollection<SampleDataItem>();
         foreach (var x in _groups)
         {
             Debug.WriteLine(x.Title);
             String title = x.Title.ToUpper();
             if (title.Contains(text.ToUpper()))
             {
                 Debug.WriteLine("Entered Search2");
                 SampleDataItem item = new SampleDataItem(x.Title, x.type, x.status, x.Index, x.image, x.grouping);
                 Util.debugLog(item.Title, item.type, item.status, "****000****");
                 this.SearchGroups.Add(item);
                 Debug.WriteLine("1:" + x.Title);
             }
         }
     }
     else if (section.Equals("Groups1"))
     {
         _searchgroups1 = new ObservableCollection<SampleDataItem>();
         foreach (var x in _groups1)
         {
             Debug.WriteLine(x.Title);
             String title = x.Title.ToUpper();
             if (title.Contains(text.ToUpper()))
             {
                 Debug.WriteLine("Entered Search2");
                 SampleDataItem item = new SampleDataItem(x.Title, x.type, x.status, x.Index, x.image, x.grouping);
                 Util.debugLog(item.Title, item.type, item.status, "****000****");
                 this.SearchGroups1.Add(item);
                 Debug.WriteLine("1:" + x.Title);
             }
         }
     }
     else if (section.Equals("Groups2"))
     {
         _searchgroups2 = new ObservableCollection<SampleDataItem>();
         foreach (var x in _groups2)
         {
             Debug.WriteLine(x.Title);
             String title = x.Title.ToUpper();
             if (title.Contains(text.ToUpper()))
             {
                 Debug.WriteLine("Entered Search2");
                 SampleDataItem item = new SampleDataItem(x.Title, x.type, x.status, x.Index, x.image, x.grouping);
                 Util.debugLog(item.Title, item.type, item.status, "****000****");
                 this.SearchGroups2.Add(item);
                 Debug.WriteLine("1:" + x.Title);
             }
         }
     }
     await Task.Delay(TimeSpan.FromSeconds(0));
 }