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}"; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Validate); var TextResult = FindViewById <TextView>(Resource.Id.ResultView); var ValidateButton = FindViewById <Button>(Resource.Id.ValidateButton); var EmailText = FindViewById <EditText>(Resource.Id.EmailText); var PasswordText = FindViewById <EditText>(Resource.Id.PasswordText); string EMail; string Password; string Device = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId); ValidateButton.Click += (sender, e) => { EMail = EmailText.Text; Password = PasswordText.Text; Validate(); }; async void Validate() { string Result; var ServiceClient = new SALLab10.ServiceClient(); var SvcResult = await ServiceClient.ValidateAsync(EMail, Password, Device); Result = $"{SvcResult.Status}\n{SvcResult.Fullname}\n{SvcResult.Token}"; TextResult.Text = Result; } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Validate); // Create your application here var EditTextEmail = FindViewById <EditText>(Resource.Id.editTextEmail); var EditTextPass = FindViewById <EditText>(Resource.Id.editTextPassword); var ValidateButton = FindViewById <Button>(Resource.Id.btnValidar); var TextViewResult = FindViewById <TextView>(Resource.Id.textViewResult); ValidateButton.Click += async(s, e) => { var ServiceClient = new SALLab10.ServiceClient(); string studentEmail = EditTextEmail.Text; string studentPassword = EditTextPass.Text; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(studentEmail, studentPassword, myDevice); TextViewResult.Text = $"{Result.Fullname}\n{Result.Status}\n{Result.Token}"; }; }
private async Task Validate() { SALLab10.ServiceClient client = new SALLab10.ServiceClient(); var response = await client.ValidateAsync(_email.Text, _password.Text, Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId)); _message.Text = $"{response.Status}\n{response.Fullname}\n{response.Token}"; }
private async Task ValidarActividad(string device, string email, string password) { var service = new SALLab10.ServiceClient(); var response = await service.ValidateAsync(email, password, device); string txtResponse = $"{response.Status}\n{response.Fullname}\n{response.Token}"; tvResult.Text = txtResponse; }
public async void Validate(string device, string correo, string contrasena) { var ValidationText = FindViewById <TextView>(Resource.Id.ValidationText); var ServiceClient = new SALLab10.ServiceClient(); var SvcResult = await ServiceClient.ValidateAsync( correo, contrasena, device); ValidationText.Text = $"{SvcResult.Fullname}\n{SvcResult.Status}\n{SvcResult.Token}"; }
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}"); }
async Task Validate(string correo, string pass) { SALLab10.ServiceClient ServiceClient = new SALLab10.ServiceClient(); string StudentMail = correo; string Password = pass; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentMail, Password, myDevice); var TextViewValidacion = FindViewById <TextView>(Resource.Id.ValidacionTextView); TextViewValidacion.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}"; }
//metodo para validar actividad private async void Validate(string email, string password) { var menssage = FindViewById <TextView>(Resource.Id.message); var ServiceClient = new SALLab10.ServiceClient(); string StudentEmail = email; string Password = password; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentEmail, Password, myDevice); menssage.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}"; }
private async void Validate() { var Email = FindViewById <EditText>(Resource.Id.EmailEditText); var Password = FindViewById <EditText>(Resource.Id.PasswordEditText); string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var ServiceClient = new SALLab10.ServiceClient(); var Result = await ServiceClient.ValidateAsync(Email.Text, Password.Text, myDevice); var ValidateMessage = FindViewById <TextView>(Resource.Id.ValidateMessageTextView); ValidateMessage.SetPadding(40, 20, 0, 0); ValidateMessage.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}"; }
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; }