Example #1
0
        public App()
        {
            LogonViewModel               = new LogonViewModel();
            MainPageViewModel            = new MainPageViewModel();
            LogonUserViewModel           = new LogonUserViewModel();
            UserManagerViewModel         = new UserManagerViewModel();
            FileTypeManagerViewModel     = new FileTypeManagerViewModel();
            TaxPayerTypeManagerViewModel = new TaxPayerTypeManagerViewModel();
            TaxPayerManagerViewModel     = new TaxPayerManagerViewModel();
            DocumentManagerViewModel     = new DocumentManagerViewModel();

            this.Startup            += this.Application_Startup;
            this.UnhandledException += this.Application_UnhandledException;
            this.CheckAndDownloadUpdateCompleted += new CheckAndDownloadUpdateCompletedEventHandler(App_CheckAndDownloadUpdateCompleted);
            InitializeComponent();
            WebContext webContext = new WebContext();

            webContext.Authentication = new FormsAuthentication();
            this.ApplicationLifetimeObjects.Add(webContext);
        }
        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            TaxPayerTypeManagerViewModel lTaxPayerTypeManagerViewModel = this.DataContext as TaxPayerTypeManagerViewModel;

            lTaxPayerTypeManagerViewModel.LoadData();
        }