Exemple #1
0
        public bool ValidateUpdatingWorkSchedule()
        {
            bool isValid = true;

            foreach (WorkScheduleForUnitModel ws in WorkScheduleImported.WorkScheduleForUnitList)
            {
                if (!UnitForceMapBusiness.ExistsUnitForceMap(ws.UnitId, ws.ShiftDate.Value, ws.WorkshiftLabel))
                {
                    MessageBox.Show(String.Format("Não existe escala em {0:dd/MM/yyy} {1} para a AM {2}",
                                                  ws.ShiftDate.Value, ws.WorkshiftLabel, ws.UnitId));
                    isValid = false;
                    break;
                }
            }

            return(isValid);
        }