private void dgvTareas_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            this.indexTarea = e.RowIndex;

            var senderGrid = (DataGridView)sender;

            try
            {
                if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
                {
                    int idtarea = Convert.ToInt32(dgvTareas.Rows[this.indexTarea].Cells[0].Value.ToString());

                    FormDetalleTarea formulario = new FormDetalleTarea(tarea.buscar(idtarea));
                    formulario.ShowDialog();
                }
            }catch (Exception ex) {
            }
        }
        private void dgvTareas_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            this.indexTarea = e.RowIndex;

            var senderGrid = (DataGridView)sender;
            try
            {
                if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
                {
                    int idtarea = Convert.ToInt32(dgvTareas.Rows[this.indexTarea].Cells[0].Value.ToString());

                    FormDetalleTarea formulario = new FormDetalleTarea(tarea.buscar(idtarea));
                    formulario.ShowDialog();
                }
            }catch(Exception ex){

            }
        }