private void Novo_Click(object sender, EventArgs e)
 {
     if (this.funcionarioBindingSource.Current != null)
     {
         frmFerias form = new frmFerias(this.funcionarioBindingSource.Current as funcionario);
         form.ShowDialog();
     }
 }
 private void feriasDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     ferias ferias = feriasDataGridView.SelectedRows[e.RowIndex].DataBoundItem as ferias;
     if(ferias != null)
     {
         frmFerias form = new frmFerias(ferias);
         form.ShowDialog();
     }
 }