Example #1
0
        public void CargarDatos()
        {
            btnCompletar.Text = "Guardar";
            BindingContext    = _Global.CurrentAccount;

            pkr_pais.IsEnabled   = false;
            txt_phone1.IsEnabled = false;

            try
            {
                var pais = _Global.CurrentAccount.country.ToString();
                Prefijo = Pais.GetPrefijo(pais);
                _Global.Vistas.PageNewListaPaises.Selected = new EPais {
                    PrefijoTelefonico = Prefijo, Nombre = pais
                };
                _Global.PaisSeleccionado = new EPais {
                    PrefijoTelefonico = Prefijo, Nombre = pais
                };
                ;
            }
            catch
            {
                DisplayAlert("Prefijo", "no existe prefijo del pais:" + _Global.CurrentAccount.country, "ok");
            }
            try
            {
                var cantidad = Prefijo.Count <char>();
                var phone    = _Global.CurrentAccount.phone1.Remove(0, cantidad);
                txt_phone1.Text = phone;
            }
            catch (Exception ex)
            {
                DisplayAlert("ex", ex.Message, "ok");
            }
        }