private bool podeSairIntervalo(TipoIntervalo tipoIntervalo) { if (ponto.intervaloFoiRegistrado(tipoIntervalo)) { var intervalo = ponto.getIntervalo(tipoIntervalo); return(!intervalo.Saida.HasValue); //Se não houver saída, então pode registrar } return(false); }
private bool WriteInterval(ExcelWorksheet ws, DiaTrabalho dia, Cell cell) { try { var almoco = dia.getIntervalo(tipoAlmoco); cell.nextColumn(); WriteTimeCell(ws, cell, almoco.Entrada.ToString()); cell.nextColumn(); WriteTimeCell(ws, cell, almoco.Saida.ToString()); return(true); } catch (InvalidOperationException) { return(false); } }