Beispiel #1
0
        public static void GetTask(int id, TaskDetailsPage page)
        {
            MobileServiceTable<TodoItem> todoItemTable = App.MobileServiceClient.GetTable<TodoItem>();

            var query = new MobileServiceQuery()
                .Filter("id eq '"+id+"'")
                .Top(1);

            todoItemTable.Get(query, (res, err) => {
                if (err != null) {
                    Console.WriteLine("GET FAILED " + id);
                    return;
                }
                foreach (TodoItem tdi in res) {
                    page.Task = tdi; // first one
                    return;
                }
            });
        }
Beispiel #2
0
        public static void GetTask(int id, TaskDetailsPage page)
        {
            MobileServiceTable <TodoItem> todoItemTable = App.MobileServiceClient.GetTable <TodoItem>();

            var query = new MobileServiceQuery()
                        .Filter("id eq '" + id + "'")
                        .Top(1);

            todoItemTable.Get(query, (res, err) => {
                if (err != null)
                {
                    Console.WriteLine("GET FAILED " + id);
                    return;
                }
                foreach (TodoItem tdi in res)
                {
                    page.Task = tdi;                     // first one
                    return;
                }
            });
        }