public void Insert(MobileServiceTable <SpawnFlag> table, SpawnFlag item) { // Inserts new spawn flag into Azure table if (Validate(item)) { table.Insert <SpawnFlag>(item, OnInsertCompleted); } }
public static void SaveTask(TodoItem task) { MobileServiceTable <TodoItem> todoItemTable = App.MobileServiceClient.GetTable <TodoItem>(); if (task.Id >= 0) { var update = new JObject(); update["id"] = task.Id; update["text"] = task.Text; update["complete"] = task.Complete; todoItemTable.Update(update, err => { if (err != null) { Console.WriteLine("UPDATE FAILED"); } }); } else { todoItemTable.Insert(task, (res, err) => { if (err != null) { Console.WriteLine("INSERT FAILED"); return; } Console.WriteLine("SAVED " + res); }); } }
public void Insert() { Userdata userdata = GetUserData(); // if (Validate (score)) { StartCoroutine(_table.Insert <Userdata> (userdata, OnInsertCompleted)); // } }
public void Insert() { Highscore score = GetScore(); if (Validate(score)) { StartCoroutine(_table.Insert <Highscore> (score, OnInsertCompleted)); } }
/** * Add a new item * * @param view * The view that originated the call */ public void AddItem(View view) { if (mClient == null) { return; } // Create a new item ToDoItem item = new ToDoItem(); item.SetText(mTextNewToDo.GetText().ToString()); item.SetComplete(false); // Insert the new item mToDoTable.Insert(item, new MyInsertTableOperationCallback(this)); mTextNewToDo.SetText(""); }
private void InsertInventory() { RecalculateInventoryItems(); Debug.Log("Insert:" + _inventory.ToString()); StartCoroutine(_table.Insert <Inventory> (_inventory, OnInsertCompleted)); }
private void PopulateDBTable() { usrStatusTable = mobileServiceClient.GetTable<GlobalVideos>(); //Save data to windows azure Mobile service //create insert object usrStatusTable.Insert(item, (res, err) => //do the Insert { if (err != null) { //handle it errMsg.Text = "Failed!!!"; } else { errMsg.Text = "Finish!!!"; } item = res; StartRecord_BTN.Content = "OK"; StartRecord_BTN.IsEnabled = true; }); }