Exemple #1
0
        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);
            }
        }
Exemple #2
0
    public CronusService()
    {
        string databaseFilePath = PathUtility.GetPhysicalPath("~/App_Data") + "/cronus-db.xml";

        cronusController = new CronusController(databaseFilePath);
    }