コード例 #1
0
        private async Task UploadCowStatus(CowStatusDto status)
        {
            HttpResponseMessage response;

            if (InputMode.Equals("dryoff"))
            {
                response = await ApiManager.CreateCowStatus(status);
            }
            else
            {
                response = await ApiManager.UpdateCowStatus(status);
            }


            if (!response.IsSuccessStatusCode)
            {
                await PageDialog.AlertAsync("Unable to save cow status data", "Error", "OK");
            }
            else
            {
                PageDialog.Toast("Cow status saved");
            }
        }