コード例 #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;
 }
コード例 #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");
            }
        }
コード例 #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 = "";
        }
コード例 #4
0
ファイル: UserMaps.cs プロジェクト: FishSaidNo/IAB330-CaAPA
 /// <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;
 }