示例#1
0
        private async void AddConsultant_Clicked(object sender, EventArgs e)
        {
            if (Email.Text == "")
            {
                await DisplayAlert("Warning", "You have to fill in an email.", "Ok");
            }
            else
            {
                bool b = await companyServices.AddUserToCompanyByIdAsync(int.Parse(idCompany), Email.Text);

                if (b == true)
                {
                    await DisplayAlert("Warning", "Email is send to consultant.", "Ok");

                    Application.Current.MainPage = new CompanyUserListPage();
                }
                else
                {
                    await DisplayAlert("Warning", "Email is not send because the consultant doesn't exist or is already added to this company.", "Ok");
                }
            }
        }