示例#1
0
        public async Task AddNewEntry()
        {
            var entry    = new Models.Entry();
            int affected = await EntriesStore.SaveItemAsync(entry);

            if (affected > 0)
            {
                Entries.Add(entry);
            }
        }
示例#2
0
        async Task SaveEntryCommand(Models.Entry entry)
        {
            if (entry == null)
            {
                return;
            }

            try
            {
                await EntriesStore.SaveItemAsync(entry);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }