Esempio n. 1
0
		public HomePage()
        {
            InitializeComponent();
			BindingContext = viewModel = new HomeViewModel(this);

			ButtonDeduction.Clicked += async (sender, e) => 
				await Navigation.PushAsync (new OtherExpensePage ());

			ButtonReports.Clicked += async (sender, e) => 
				await Navigation.PushAsync (new ReportsPage ());

			ButtonMileage.Clicked += async (sender, e) => 
				await Navigation.PushAsync (new MileageExpensePage ());

			ButtonTaxServices.Clicked += async (sender, e) => 
				await Navigation.PushAsync (new TaxServicesPage ());

        }
        public HomePage()
        {
            InitializeComponent();
            BindingContext = viewModel = new HomeViewModel(this);

            ButtonDeduction.Clicked += async (sender, e) =>
                await Navigation.PushAsync(new OtherExpensePage());

            ButtonReports.Clicked += (sender, e) =>
            {
                var stream = CreateExcel();
                DependencyService.Get<IEmailHelper>().SendMail(stream);
            };

            ButtonMileage.Clicked += async (sender, e) =>
                await Navigation.PushAsync(new MileageExpensePage());

            ButtonTaxServices.Clicked += async (sender, e) =>
                await Navigation.PushAsync(new TaxServicesPage());
        }