コード例 #1
0
        public async void ReadInboxItems()
        {
            var inboxItems = await FirestoreInboxHelper.ReadInboxItems();

            InboxItems.Clear();
            foreach (var i in inboxItems)
            {
                InboxItems.Add(i);
            }
        }
コード例 #2
0
        private void SaveInboxItem(object obj)
        {
            var result = FirestoreInboxHelper.InsertInboxItem(new Model.InboxItem
            {
                Name      = Name,
                Notes     = Notes,
                UserId    = Auth.GetCurrentUserId(),
                StartDate = DateTime.Today,
                DueDate   = StartDate.AddDays(1),
                Id        = "nlfkjdbnjkfgds"
            });

            if (result.Keys.First())
            {
                App.Current.MainPage.Navigation.PopAsync();
            }
            else
            {
                App.Current.MainPage.DisplayAlert("Error", result.Values.First(), "Ok");
            }
        }