/// <summary> /// Adds or Updates a Child and Syncs with mobile API values /// </summary> /// <param name="child">DataObjects.HistoricalSession row to add or update</param> /// <returns>System.Threading.Tasks.Task</returns> public async Task AddChild(DataObjects.Children child) { // Make sure the user is logged in so UserId and ProfileId are valid if (_isLoggedIn) { child.ProfileId = _currentProfileId; if (null == await childrenTable.LookupAsync(child.Id)) { await childrenTable.InsertAsync(child); } else { await childrenTable.UpdateAsync(child); } await SyncChild(); } }
/// <summary> /// Deletes Pump From Local Tables the Syncs Changes with mobile api /// </summary> /// <param name="pump">DataObjects.Pump row to delete</param> /// <returns></returns> public async Task RemoveChild(DataObjects.Children child) { await childrenTable.DeleteAsync(child); await SyncChild(); }