using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Moshaverino.Models;
using Moshaverino.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace Moshaverino.Views.SignUp
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class EnterTypeInfo : ContentView
    {
        public EnterTypeInfo()
        {
            InitializeComponent();
        }

        private void SubmitTypeButton_OnClicked(object sender, EventArgs e)
        {
            (BindingContext as SignUpPageViewModel)?.SubmitInfoButtonCommand.Execute(new Student
            {
                StudyGrade = gradeTextBox.SelectedItem as string,
                AverageNumber = averageTextBox.Text,
                FullName = fullNameTextBox.Text,
                StudyField = fieldTextBox.SelectedItem as string
            });
        }
    }
}