示例#1
0
        private async void Añadir_Volver(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(cursillo.Text))
            {
                await DisplayAlert("Existen campos obligatorios vacíos", "Por favor, introduzca el nombre del nuevo curso.", "Ok");

                cursillo.Focus();
                return;
            }

            if (string.IsNullOrEmpty(durationnn.Text))
            {
                await DisplayAlert("Existen campos obligatorios vacíos", "Por favor, introduzca la duración del curso (en meses).", "Ok");

                durationnn.Focus();
                return;
            }

            modelo.CurseClassesView m = this.BindingContext as modelo.CurseClassesView;
            if ((m != null) && (m.Add.CanExecute(null)))
            {
                m.Add.Execute(null);
                await DisplayAlert("Curso Añadido Correctamente", "", "OK");

                var f = new MenuPrincipalAdmin();
                f.Detail = new NavigationPage((Page)Activator.CreateInstance(typeof(CursosAdmin)));

                App.Current.MainPage = f;
            }
        }
示例#2
0
        public Cursos()
        {
            InitializeComponent();

            BindingContext    = this;
            this.IsBusy       = false;
            overlay.IsVisible = false;

            Post_List.ItemSelected += async(sender, e) =>
            {
                modelo.CurseClassesView m = (modelo.CurseClassesView)e.SelectedItem;
                await Navigation.PushAsync(new paginas.Matricularse(m));
            };
        }
示例#3
0
 public Matricularse(modelo.CurseClassesView curse)
 {
     InitializeComponent();
     BindingContext = curse;
 }