public Page2(QA qa) { InitializeComponent(); this.BindingContext = qa; this.qa = qa; if (string.IsNullOrWhiteSpace(qa.PartitionKey)) { ToolbarItems.RemoveAt(1); qa.PartitionKey = Guid.NewGuid().ToString(); } }
public static async Task <bool> DeleteRiddle(QA qa) { try { await ConnectToTable(); var operation = TableOperation.Delete(qa); var delete = await songsTable.ExecuteAsync(operation); return(delete.HttpStatusCode == 204); } catch (Exception ex) { } return(false); }
public static async Task <bool> SaveRiddle(QA qa) { try { await ConnectToTable(); var operation = TableOperation.Insert(qa); var upsert = await songsTable.ExecuteAsync(operation); return(upsert.HttpStatusCode == 204); } catch (Exception ex) { } return(false); }