Пример #1
0
        private async void ProceedButton_Clicked(object sender, EventArgs e)
        {
            if (ToAddItems.Count == 0)
            {
                await DisplayAlert(ResxFile.str_error, ResxFile.err_NoPlanItem, ResxFile.err_confirm);

                return;
            }

            var assignPlan = await APIConnection.AssignPlan(ToAddPlan, ToAddItems, coachID, selectedStudent.Id);

            if (assignPlan.Errors != null)
            {
                await DisplayAlert(ResxFile.str_error, assignPlan.Errors[0].Message, ResxFile.err_confirm);

                return;
            }

            await DisplayAlert(ResxFile.msg_Success, ResxFile.msg_SuccNewPlan, ResxFile.btn_ok);

            await Navigation.PopToRootAsync();
        }