예제 #1
0
        private async void SignupClick(object sender, EventArgs e)
        {
            Android.Net.ConnectivityManager cm = (Android.Net.ConnectivityManager) this.GetSystemService(Context.ConnectivityService);
            if (ValidateData())
            {
                Vehicle vehicle = new Vehicle();
                vehicle.model   = spnModel.SelectedItem.ToString();
                vehicle.make    = spnMake.SelectedItem.ToString();
                vehicle.color   = spnColor.SelectedItem.ToString();
                vehicle.plateNo = etCarplate.Text.ToString().Trim();

                await RESTClient.CreateMemberVehicleAsync(this, iMember, vehicle);

                var intent = new Intent(this, typeof(LoginActivity));
                intent.SetFlags(ActivityFlags.NewTask | ActivityFlags.ClearTask);
                StartActivity(intent);

                RunOnUiThread(() =>
                {
                    progress.Dismiss();
                });
            }
        }