/// <summary>
 ///     Recibe la lista de ausencias del alumno del cliente http
 /// </summary>
 private async Task GetStudentAbsences()
 {
     try
     {
         this.absences = await AbsenceHttpService.GetByStudent(_student.Id);
     }
     catch (ServerErrorException ex)
     {
         new CustomErrorMessageWindow(ex.Message).ShowDialog();
     }
 }
        /// <summary>
        ///     Evento al hacer click en una celda de la tabla de retrasos:
        ///     Si se hace click en una celda de la columna "Justificado",
        ///     se marca el retraso como justificado o no
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void dgvDelays_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int col = -1;
            int row = -1;
            DataGridViewCell cell = null;

            try
            {
                cell = this.dgvDetails.CurrentCell;
                // se recupera la celda clickeada
                col = cell.ColumnIndex;

                row = cell.RowIndex;
            }
            catch (Exception ex)
            {
            }


            if (col == 4)
            {
                int selectedId = int
                                 .Parse(this.dgvDetails.Rows[row].Cells[0].Value.ToString());

                bool isExcused = !(bool)cell.Value;

                try
                {
                    await AbsenceHttpService.SetExcused(selectedId, isExcused);

                    cell.Value = isExcused;

                    if (isExcused)
                    {
                        _totalExcused++;
                    }
                    else
                    {
                        _totalExcused--;
                    }

                    //Refresco el contador de ausencias justificadas
                    this.labelTotalExcused.Text = _totalExcused.ToString();
                }
                catch (ServerErrorException ex)
                {
                    new CustomErrorMessageWindow(ex.Message).ShowDialog();
                }
            }
        }