Ejemplo n.º 1
0
        private bool isRosterValueChanged(RosterAttributes roster, Shift _selectedShift)
        {
            DayOfWeek day       = roster.DutyDate.DayOfWeek;
            bool      isChanged = roster.DutyTime == _selectedShift.StartTime ? false : true;

            switch (day)
            {
            case DayOfWeek.Monday:
                if (roster.WorkMin != _selectedShift.MonMin)
                {
                    isChanged = true;
                }
                break;

            case DayOfWeek.Tuesday:
                if (roster.WorkMin != _selectedShift.TueMin)
                {
                    isChanged = true;
                }
                break;

            case DayOfWeek.Wednesday:
                if (roster.WorkMin != _selectedShift.WedMin)
                {
                    isChanged = true;
                }
                break;

            case DayOfWeek.Thursday:
                if (roster.WorkMin != _selectedShift.ThuMin)
                {
                    isChanged = true;
                }
                break;

            case DayOfWeek.Friday:
                if (roster.WorkMin != _selectedShift.FriMin)
                {
                    isChanged = true;
                }
                break;

            case DayOfWeek.Saturday:
                if (roster.WorkMin != _selectedShift.SatMin)
                {
                    isChanged = true;
                }
                break;

            case DayOfWeek.Sunday:
                if (roster.WorkMin != _selectedShift.SunMin)
                {
                    isChanged = true;
                }
                break;
            }
            return(isChanged);
        }
Ejemplo n.º 2
0
 private bool isRosterValueChanged(RosterAttributes roster, Shift _selectedShift)
 {
     DayOfWeek day = roster.DutyDate.DayOfWeek;
     bool isChanged = roster.DutyTime == _selectedShift.StartTime ? false : true;
     switch (day)
     {
         case DayOfWeek.Monday:
             if (roster.WorkMin != _selectedShift.MonMin)
                 isChanged = true;
             break;
         case DayOfWeek.Tuesday:
             if (roster.WorkMin != _selectedShift.TueMin)
                 isChanged = true;
             break;
         case DayOfWeek.Wednesday:
             if (roster.WorkMin != _selectedShift.WedMin)
                 isChanged = true;
             break;
         case DayOfWeek.Thursday:
             if (roster.WorkMin != _selectedShift.ThuMin)
                 isChanged = true;
             break;
         case DayOfWeek.Friday:
             if (roster.WorkMin != _selectedShift.FriMin)
                 isChanged = true;
             break;
         case DayOfWeek.Saturday:
             if (roster.WorkMin != _selectedShift.SatMin)
                 isChanged = true;
             break;
         case DayOfWeek.Sunday:
             if (roster.WorkMin != _selectedShift.SunMin)
                 isChanged = true;
             break;
     }
     return isChanged;
 }