Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaaPa.Prompt"/> class.
 /// </summary>
 /// <param name="promptName">promptName .</param>
 /// <param name="promptDesc">promptDesc .</param>
 /// <param name="userId">userId .</param>
 public PromptWrapper(Prompt prompt)
 {
     Prompt = prompt;
 }
Exemplo n.º 2
0
        public async Task CheckPrompt(Prompt prompt)
        {
            if (client == null)
            {
                return;
            }

            // Set the item as completed and update it in the table
            prompt.Complete = true;
            try
            {
                await promptTable.UpdateAsync(prompt); // update the new item in the local database
                await SyncAsync(); // send changes to the mobile service

                if (prompt.Complete)
                    promptadapter.Remove(prompt);

            }
            catch (Exception e)
            {
                CreateAndShowDialog(e, "Error");
            }
        }
Exemplo n.º 3
0
        public async void AddPrompt(Prompt prompt)
        {
            if (client == null)
            {
                return;
            }

            try
            {
                await promptTable.InsertAsync(prompt); // insert the new item into the local database
                await SyncAsync(); // send changes to the mobile service

                if (!prompt.Complete)
                {
                    promptadapter.Add(prompt);
                }
            }
            catch (Exception e)
            {
                CreateAndShowDialog(e, "Error");
            }

        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaaPa.Prompt"/> class.
 /// </summary>
 /// <param name="promptName">promptName .</param>
 /// <param name="promptDesc">promptDesc .</param>
 /// <param name="userId">userId .</param>
 public PromptWrapper(Prompt prompt)
 {
     Prompt = prompt;
 }