protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); string EMail = ""; string Password = ""; string Device = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId); var UserNameResTextView = FindViewById <TextView>(Resource.Id.UserNameResTextView); var StatusResTextView = FindViewById <TextView>(Resource.Id.StatusResTextView); var TokenResTextView = FindViewById <TextView>(Resource.Id.TokenResTextView); Validate(); async void Validate() { var ServiceClient = new SALLab09.ServiceClient(); var SvcResult = await ServiceClient.ValidateAsync(EMail, Password, Device); UserNameResTextView.Text = SvcResult.Fullname; StatusResTextView.Text = SvcResult.Status.ToString(); TokenResTextView.Text = SvcResult.Token; } }
public async void Validate(string Email, string Password, string Device) { var ServiceClient = new SALLab09.ServiceClient(); var response = await ServiceClient.ValidateAsync(Email, Password, Device); tvName.Text = response.Fullname; tvStatus.Text = response.Status.ToString(); tvToken.Text = response.Token; }
public async void Validate(string device, string correo, string contrasena) { var UserNameValue = FindViewById <TextView>(Resource.Id.UserNameValue); var StatusValue = FindViewById <TextView>(Resource.Id.StatusValue); var TokenValue = FindViewById <TextView>(Resource.Id.TokenValue); var ServiceClient = new SALLab09.ServiceClient(); var SvcResult = await ServiceClient.ValidateAsync( correo, contrasena, device); StatusValue.Text = $"{SvcResult.Status}"; UserNameValue.Text = $"{SvcResult.Fullname}"; TokenValue.Text = $"{SvcResult.Token}"; }
private async void Validate() { var ServiceClient = new SALLab09.ServiceClient(); string StudentEmail = "*****@*****.**"; string Password = "******"; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentEmail, Password, myDevice); string NameUserTextView = $"{Result.Fullname}"; string StatusTextView = $"{Result.Status}"; string TokenTextView = $"{Result.Token}"; FindViewById <TextView>(Resource.Id.UserNameValue).Text = NameUserTextView; FindViewById <TextView>(Resource.Id.StatusValue).Text = StatusTextView; FindViewById <TextView>(Resource.Id.TokenValue).Text = TokenTextView; }
async Task Validate() { SALLab09.ServiceClient ServiceClient = new SALLab09.ServiceClient(); string StudentMail = "*****@*****.**"; string Password = "******"; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentMail, Password, myDevice); var UserNameResultTextView = FindViewById <TextView>(Resource.Id.UserNameResultTextView); var StatusResultTextView = FindViewById <TextView>(Resource.Id.StatusResultTextView); var TokenResultTextView = FindViewById <TextView>(Resource.Id.TokenResultTextView); UserNameResultTextView.Text = Result.Fullname; StatusResultTextView.Text = Result.Status.ToString(); TokenResultTextView.Text = Result.Token; }
private async void Validate() { var ServiceClient = new SALLab09.ServiceClient(); var textVUsuarioR = FindViewById <TextView>(Resource.Id.textVUsuarioR); var textVEstatusR = FindViewById <TextView>(Resource.Id.textVEstatusR); var textVTokenR = FindViewById <TextView>(Resource.Id.textVTokenR); string StudentEmail = "*****@*****.**"; string Password = "******"; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentEmail, Password, myDevice); textVUsuarioR.Text = $"{Result.Fullname}"; textVEstatusR.Text = $"{Result.Status}"; textVTokenR.Text = $"{Result.Token}"; }
public async System.Threading.Tasks.Task Validate() { var txt1 = FindViewById <TextView>(Resource.Id.txt1); var txt2 = FindViewById <TextView>(Resource.Id.txt2); var txt3 = FindViewById <TextView>(Resource.Id.txt3); SALLab09.ServiceClient client = new SALLab09.ServiceClient(); string myD = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId); Result = await client.ValidateAsync( StudentEmail, Password, myD); txt1.Text = $"{Result.Fullname}"; txt2.Text = $"{Result.Status}"; txt3.Text = $"{Result.Token}"; }
private async Task ValidateActivityAsync() { SALLab09.ServiceClient client = new SALLab09.ServiceClient(); var response = await client.ValidateAsync("*****@*****.**", "c0nTr4$3Ѫ", Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId)); var txtStatus = FindViewById <TextView>(Resource.Id.StatusValue); txtStatus.Text = response.Status.ToString(); var txtName = FindViewById <TextView>(Resource.Id.UserNameValue); txtName.Text = response.Fullname; var txtToken = FindViewById <TextView>(Resource.Id.TokenValue); txtToken.Text = response.Token; }
private async void ValidateJC() { string StudentEmail = @"*****@*****.**"; string PasswordStudent = "*******"; //comentado 2018 string myDevice = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId); var userNameEdit = FindViewById <EditText>(Resource.Id.userNameEditText); var statusEdit = FindViewById <EditText>(Resource.Id.statusEditText); var tokenEdit = FindViewById <EditText>(Resource.Id.tokenEditText); var ServiceClient = new SALLab09.ServiceClient(); var Result = await ServiceClient.ValidateAsync(StudentEmail, PasswordStudent, myDevice); userNameEdit.Text = $"{Result.Fullname}"; statusEdit.Text = $"{Result.Status}"; tokenEdit.Text = $"{Result.Token}"; }
private async void ValidarActividad() { try { SALLab09.ServiceClient client = new SALLab09.ServiceClient(); SALLab09.ResultInfo result = await client.ValidateAsync("", "", Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId)); RunOnUiThread(() => { FindViewById <TextView>(Resource.Id.UserNameValue).Text = result.Fullname; FindViewById <TextView>(Resource.Id.StatusValue).Text = Enum.GetName(typeof(SALLab09.Status), result.Status); FindViewById <TextView>(Resource.Id.TokenValue).Text = result.Token; }); } catch (Exception ex) { Toast.MakeText(this, $"Error: {ex.Message}", ToastLength.Long).Show(); } }