Esempio n. 1
0
        private async void Btnvalidate_Click(object sender, EventArgs e)
        {
            var editemail    = FindViewById <EditText>(Resource.Id.editemail);
            var editpassword = FindViewById <EditText>(Resource.Id.editpassword);


            var studentemail = string.Empty;
            var password     = string.Empty;

            studentemail = (editemail.Text);
            password     = (editpassword.Text);

            SALLab10.ServiceClient ServiceClient = new SALLab10.ServiceClient();


            string myDevice = Android.Provider.Settings.Secure.GetString(

                ContentResolver,

                Android.Provider.Settings.Secure.AndroidId

                );

            SALLab10.ResultInfo Result = await ServiceClient.ValidateAsync(studentemail, password, myDevice);

            var txtvalidate = FindViewById <TextView>(Resource.Id.txtValidate);

            txtvalidate.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}";
        }
Esempio n. 2
0
        public async System.Threading.Tasks.Task <string> Validate()
        {
            SALLab10.ServiceClient client = new SALLab10.ServiceClient();
            string myD = Android.Provider.Settings.Secure.GetString(
                ContentResolver, Android.Provider.Settings.Secure.AndroidId);


            SALLab10.ResultInfo Result =
                await client.ValidateAsync(
                    Email, Password, myD);


            return($"{Result.Status}\n{Result.Fullname}\n{Result.Token}");
        }
Esempio n. 3
0
        private async void Validate(String Correo, string Clave)
        {
            SALLab10.ServiceClient ServiceClient = new
                                                   SALLab10.ServiceClient();

            string myDevice = Android.Provider
                              .Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId);

            SALLab10.ResultInfo Result = await
                                         ServiceClient.ValidateAsync(Correo, Clave, myDevice);

            // string mensaje = ($"{Result.Status} \n{Result.Fullname}\n {Result.Token}");


            var txtNombre = FindViewById <TextView>(Resource.Id.textNomUsu);
            var txtStatus = FindViewById <TextView>(Resource.Id.textStatus);
            var txtCodigo = FindViewById <TextView>(Resource.Id.textCodigo);
            var configReg = FindViewById <TextView>(Resource.Id.configReg);

            txtNombre.Text = ($"{Result.Fullname}");
            txtStatus.Text = ($"{Result.Status}");
            txtCodigo.Text = ($"{Result.Token}");
            configReg.Text = Resources.Configuration.Locale.ToString() + " " + Resources.Configuration.Locale.DisplayName;
        }