public async Task CheckUsers(Users user)
        {
            if (client == null) {
                return;
            }

            // Set the item as completed and update it in the table
            user.Complete = true;

            try {
                await usersTable.UpdateAsync(user); // update the new item in the local database
                await SyncAsync(); // send changes to the mobile service

                if (user.Complete)
                    adapter.Remove (user);

            } catch (Exception e) {
                CreateAndShowDialog (e, "Error");
            }
        }
        public async void AddUsers(View view) {
      
            if (client == null || string.IsNullOrWhiteSpace (textNewToDo.Text)) {
                return;
            }

            // Create a new item
            var user = new Users
            {
                //Text = textNewToDo.Text

                //add collum = value
                //for each collumn
                //leave complete it is nessecary for the localdb

                Complete = false
            };

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

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

            //textNewToDo.Text = "";
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaaPa.Users"/> class.
 /// </summary>
 /// <param name="UserId ">UserId .</param>
 /// <param name="UserName  ">UserName  .</param>
 /// <param name="UserFirstName  ">UserFirstName  .</param>
 /// <param name="UserLastName ">UserLastName .</param>
 /// <param name="Home">eMail .</param>
 /// <param name="Home">Home .</param>
 /// <param name="Mobile">Mobile .</param>
 /// <param name="DeviceMACDongle">DeviceMACDongle .</param>
 public UsersWrapper(Users user)
 {
     Users = user;
 }