private void btnGetCronusEmployees_Click(object sender, EventArgs e) { CronusController controller = new CronusController(); DataTable dt = new DataTable(); dataGridView2.DataSource = dt; dataGridView2.ClearSelection(); // NAMN? dt.Columns.Add("Name"); dt.Columns.Add("Pnr"); dt.Columns.Add("Email"); dt.Columns.Add("Phone"); dt.Columns.Add("Address"); //List<string> cronusList = new List<string>(); string[][] cronusList = controller.GetCronusEmployees(); foreach (string[] row in cronusList) { dt.Rows.Add(row); } }
public CronusService() { string databaseFilePath = PathUtility.GetPhysicalPath("~/App_Data") + "/cronus-db.xml"; cronusController = new CronusController(databaseFilePath); }