public void CompleteWithPeriodicWorkSchedule(List <WorkScheduleForUnitModel> workScheduleList, ref bool hasError) { hasError = false; try { List <DateTime> UramDayOffDates = UnitForceMapBusiness.GetDayOffList(StartDate.Value, EndDate.Value, "URAM"); this.WorkScheduleImported.CompleteWithPeriodicWorkSchedule (workScheduleList, StartDate.Value, EndDate.Value, UramDayOffDates, this.IsMergingWorkSchedule); } catch (Exception ex) { hasError = true; MessageBox.Show(String.Format("Ocorreu um erro ao gerar as escalas periódicas: {0}", ex.Message)); } }