public Form1()
        {
            InitializeComponent();

            oXL  = new ExcelHelper();
            oAPI = new PWFAPIHelper();

            dateToPicker.MaxDate   = DateTime.Today;
            dateFromPicker.MaxDate = DateTime.Today;

            string timeFrom = DateTime.Today.ToString("yyyy-MM");

            timeFrom = timeFrom + "-01";
            string timeTo     = DateTime.Today.ToString("yyyy-MM-dd");
            string reportName = dateFromPicker.Value.Date.ToString("yyyy-MM");
            // Populate DataGridView with Projects
            List <JsonResultTasks> oTasks    = new List <JsonResultTasks>();
            JsonResultProjects     oProjects = oAPI.GetProjects();
            JsonResultTimes        oTimes    = oAPI.GetTime(timeFrom, timeTo);


            foreach (JsonResultProject project in oProjects.projects)
            {
                JsonResultTasks tasks = oAPI.GetTasks(project.id.ToString());
                oTasks.Add(tasks);
            }

            oXL.PopulateProjects(oProjects, oTasks);
            oXL.PopulateTime(oTimes, reportName);
            //oXL.PopulateBilling(oTimes);
        }
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Release helper class instances
     oAPI = null;
 }