Esempio n. 1
0
        public Page2(QA qa)
        {
            InitializeComponent();

            this.BindingContext = qa;
            this.qa             = qa;

            if (string.IsNullOrWhiteSpace(qa.PartitionKey))
            {
                ToolbarItems.RemoveAt(1);
                qa.PartitionKey = Guid.NewGuid().ToString();
            }
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }