Ignore:
Timestamp:
Nov 18, 2010, 7:47:04 AM (14 years ago)
Author:
Sam Habiel
Message:

UCPatientAppts: Fixes printing empty table bug reported by EHS.
DAccessTemplate: Various usability improvements.
CGDocumentManager: Fixed Delegate code so that it can operate asynchronously
CGAVView: Some temporary fixes (not totally usable): Added non-functional Delete Slots menu option; Added Background worker for saving acccess slots
In the future, Delete Slots will work; and will use ADO.net Updatable datatable for saving access slots.
calendarGrid: just some comments for now
AssemblyInfo: bumped version up to v1.4.2

File:
1 edited

Legend:

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

    r853 r1011  
    9595                       
    9696                        string sResName;
     97            // for each resource
    9798                        for (int i = 0; i < nSize; i++)
    9899                        {
    99100                                sResName = saryResourceNames[i].ToString();
    100 
     101                //Gets all the slots (or Availabities, if you like)
    101102                                rsSlotSchedule = CGSchedLib.CreateAssignedSlotSchedule(docManager, sResName, StartTime, EndTime, saryApptTypes,/**/ stType, sSearchInfo);
    102103                                OutputArray(rsSlotSchedule, "rsSlotSchedule");
    103 
     104                //if we have slots
    104105                                if (rsSlotSchedule.Rows.Count > 0 )
    105106                                {
     107                    // Get appointment count to substract from the slots
    106108                                        rsApptSchedule = CGSchedLib.CreateAppointmentSlotSchedule(docManager, sResName, StartTime, EndTime, stType);
    107109                                        OutputArray(rsApptSchedule, "rsApptSchedule");
     110                    // Perform the substraction
    108111                                        rsTemp1 = CGSchedLib.SubtractSlotsRS2(rsSlotSchedule, rsApptSchedule, sResName);
    109112                                        OutputArray(rsTemp1, "rsTemp1");
     
    114117                                        OutputArray(rsTemp1, "rsTemp1");
    115118                                }
     119                // if only one resource was passed in, its availablility is what we want
    116120                                if (i == 0)
    117121                                {
     
    586590                }
    587591
     592        /// <summary>
     593        /// My guess is that this calculates remaining slots
     594        /// </summary>
     595        /// <param name="rsBlocks1"></param>
     596        /// <param name="rsBlocks2"></param>
     597        /// <param name="sResource"></param>
     598        /// <returns></returns>
    588599                public static DataTable SubtractSlotsRS2(DataTable rsBlocks1, DataTable rsBlocks2, string sResource)
    589600                {
     
    770781                }//end IntersectBlocks
    771782
    772 
     783        /// <summary>
     784        /// Number of minutes since Jan 1 1980
     785        /// </summary>
     786        /// <param name="d">Date to compare</param>
     787        /// <returns>Minutes as integer</returns>
    773788                public static int MinSince80(DateTime d)
    774789                {
     
    878893                        rect1.Height = CGSchedLib.MinSince80(dEnd1) - rect1.Y;
    879894
     895            //for each row in the availability schedule
    880896                        foreach (DataRow r in rsBlock.Rows)
    881897                        {
Note: See TracChangeset for help on using the changeset viewer.