Beispiel #1
0
        private void ExportParliamentData()
        {
            IExcelAdapter parliamentAdapter = new ParliamentVM();

            excel.AddNewSheet("Folketinget");
            excel.AddColumnsToSheet(parliamentAdapter.GetColumnNames());
            excel.AddDataToSheet(parliamentAdapter.ConvertData());
        }
        //load the members to the datagrid
        private void Load(int selectedYear)
        {
            parliament = null;
            parliament = new ParliamentVM();
            var politicians = parliament.GetParliamentWithMembers();

            foreach (var politician in politicians)
            {
                if (politician != null)
                {
                    parliamentGrid.Items.Add(politician);
                    insertBtn.IsEnabled = true;
                }
            }
        }