Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaaPa.UserMaps"/> class.
 /// </summary>
 /// <param name="UserMapsId">UserMapsId .</param>
 /// <param name="UserId">UserId .</param>
 /// <param name="MapId">MapId .</param>
 public UserMapsWrapper(UserMaps usermaps)
 {
     UserMaps = usermaps;
 }
Exemplo n.º 2
0
        public async Task CheckUserMaps(UserMaps usermap)
        {
            if (client == null) {
                return;
            }

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

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

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

            // Create a new item
            var usermap = new UserMaps
            {
                //Text = textNewToDo.Text

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

                Complete = false
            };

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

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

            //textNewToDo.Text = "";
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaaPa.UserMaps"/> class.
 /// </summary>
 /// <param name="UserMapsId">UserMapsId .</param>
 /// <param name="UserId">UserId .</param>
 /// <param name="MapId">MapId .</param>
 public UserMapsWrapper(UserMaps usermaps)
 {
     UserMaps = usermaps;
 }