コード例 #1
0
        public async Task ExecuteDelete()
        {
            var deleteResponse = await DataService.Delete($"Clinic/{Preferences.Get("TeamId", "")}/{SelectedClinic?.FId}");

            if (deleteResponse == "ConnectionError")
            {
                StandardMessagesDisplay.NoConnectionToast();
            }
            else if (deleteResponse == "Error")
            {
                StandardMessagesDisplay.Error();
            }
            else if (deleteResponse == "ErrorTracked")
            {
                StandardMessagesDisplay.ErrorTracked();
            }
            else if (deleteResponse == "null")
            {
                _ = await DataService.Put((--StaticDataStore.TeamStats.TotalClinics).ToString(), $"Team/{Preferences.Get("ClusterId", "")}/{Preferences.Get("TeamFId", "")}/TotalClinics");

                StandardMessagesDisplay.ItemDeletedToast();

                if (SelectedClinic != null)
                {
                    Clinics?.Remove(SelectedClinic);
                }
            }
        }