Changeset 1511 for Scheduling/trunk/cs


Ignore:
Timestamp:
Aug 9, 2012, 1:30:57 PM (12 years ago)
Author:
Sam Habiel
Message:

Fixed AddAppointmentEnabled to check for the presence of resources in a resource group; otherwise you are given the ability to make an appointment on the resource group itself which causes a crash. Fixes bug EHS#000342.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs

    r1474 r1511  
    16271627        private bool AddAppointmentEnabled()
    16281628        {
     1629            //new in 1.7: If there are no resources in the resource group, just say false.
     1630            //otherwise, we end up with being able to add appointments to empty resource groups.
     1631            if (this.Document.Resources.Count == 0)
     1632                return false;
     1633
     1634            //No cells selected for appointment. False.
    16291635            if (this.calendarGrid1.SelectedRange.Cells.CellCount < 1)
    16301636                return false;
    16311637
     1638            //If manager, can always make appointment
    16321639            bool bManager = this.DocManager.ScheduleManager;
    16331640            if (bManager == true)
     
    16351642                return (true);
    16361643            }
     1644            // otherwise, check permissions, then check slots.
    16371645            else
    16381646            {
Note: See TracChangeset for help on using the changeset viewer.