private async void btnInsert_Click(object sender, RoutedEventArgs e)
        {
            powerstatus obj1 = new powerstatus();
            obj1.status = "on";

            await userTable.InsertAsync(obj1);
        }
示例#2
0
        private async void btnInsert_Click(object sender, RoutedEventArgs e)
        {
            powerstatus obj1 = new powerstatus();

            obj1.status = "on";

            await userTable.InsertAsync(obj1);
        }
 private async void btnOff_Click(object sender, RoutedEventArgs e)
 {
     List<powerstatus> datalist = await App.MobileService.GetTable<powerstatus>().ToListAsync();
     powerstatus obj = new powerstatus();
     foreach (var x in datalist)
     {
         obj.id = x.id;
         obj.status = "off";
     }
     await userTable.UpdateAsync(obj);
 }
示例#4
0
        private async void btnOff_Click(object sender, RoutedEventArgs e)
        {
            List <powerstatus> datalist = await App.MobileService.GetTable <powerstatus>().ToListAsync();

            powerstatus obj = new powerstatus();

            foreach (var x in datalist)
            {
                obj.id     = x.id;
                obj.status = "off";
            }
            await userTable.UpdateAsync(obj);
        }