Ignore:
Timestamp:
Mar 30, 2011, 4:19:15 AM (13 years ago)
Author:
Sam Habiel
Message:

Updated Release exes.
CGDocument: Appointment Creation Code now reuses appt object passed in rather than creating a new one.
CGView:
ctxPrintScheduleT3 added. Print schedule in 3 days. For weekday after weekend.
Scaling of grid now restricted. You can't scale down from the original TimeScale, but you can scale up.
DCheckIn: Remove unused variables.
DResource: Remove unused variables.

File:
1 edited

Legend:

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

    r1123 r1124  
    337337            try
    338338            {
    339                 //Create new Document
    340339                this.SelectedDate = dDate.Date;
    341340
     
    361360                //If this document already has a view, the use it
    362361                //SAM: Why do this again???
     362                //SAM: I think it's not needed; b/c
    363363                Hashtable h = CGDocumentManager.Current.Views;
    364364                CGDocument d;
     
    952952        public int CreateAppointment(CGAppointment rApptInfo, bool bWalkin)
    953953        {
    954             string sStart;
    955             string sEnd;
    956             string sPatID;
    957             string sResource;
    958             string sNote;
    959             string sLen;
     954            // i18n code -- Use culture neutral FMDates
     955            string sStart = FMDateTime.Create(rApptInfo.StartTime).FMDateString;
     956            string sEnd = FMDateTime.Create(rApptInfo.EndTime).FMDateString;
     957
     958            TimeSpan sp = rApptInfo.EndTime - rApptInfo.StartTime;
     959            string sLen = sp.TotalMinutes.ToString();
     960            string sPatID = rApptInfo.PatientID.ToString();
     961            string sNote = rApptInfo.Note;
     962            string sResource = rApptInfo.Resource;
     963
    960964            string sApptID;
    961965
    962             //sStart = rApptInfo.StartTime.ToString("M-d-yyyy@HH:mm");
    963             //sEnd = rApptInfo.EndTime.ToString("M-d-yyyy@HH:mm");
    964 
    965             // i18n code -- Use culture neutral FMDates
    966             sStart = FMDateTime.Create(rApptInfo.StartTime).FMDateString;
    967             sEnd = FMDateTime.Create(rApptInfo.EndTime).FMDateString;
    968 
    969             TimeSpan sp = rApptInfo.EndTime - rApptInfo.StartTime;
    970             sLen = sp.TotalMinutes.ToString();
    971             sPatID = rApptInfo.PatientID.ToString();
    972             sNote = rApptInfo.Note;
    973             sResource = rApptInfo.Resource;
    974966            if (bWalkin == true)
    975967            {
     
    980972                sApptID = rApptInfo.AccessTypeID.ToString();
    981973            }
    982 
    983             CGAppointment aCopy = new CGAppointment();
    984             aCopy.CreateAppointment(rApptInfo.StartTime, rApptInfo.EndTime, sNote, 0, sResource);
    985             aCopy.PatientID = rApptInfo.PatientID;
    986             aCopy.PatientName = rApptInfo.PatientName;
    987             aCopy.HealthRecordNumber = rApptInfo.HealthRecordNumber;
    988             aCopy.AccessTypeID = rApptInfo.AccessTypeID;
    989             aCopy.WalkIn = bWalkin ? true : false;
    990974
    991975            string sSql = "BSDX ADD NEW APPOINTMENT^" + sStart + "^" + sEnd + "^" + sPatID + "^" + sResource + "^" + sLen + "^" + sNote + "^" + sApptID;
    992976            System.Data.DataTable dtAppt = m_DocManager.RPMSDataTable(sSql, "NewAppointment");
    993             int nApptID;
    994977
    995978            Debug.Assert(dtAppt.Rows.Count == 1);
    996979            DataRow r = dtAppt.Rows[0];
    997             nApptID = Convert.ToInt32(r["APPOINTMENTID"]);
     980            int nApptID = Convert.ToInt32(r["APPOINTMENTID"]);
    998981            string sErrorID;
    999982            sErrorID = r["ERRORID"].ToString();
     
    1002985                throw new Exception(sErrorID);
    1003986            }
    1004             aCopy.AppointmentKey = nApptID;
    1005             this.m_appointments.AddAppointment(aCopy);
    1006            
    1007             //TODO: Improve
    1008             //Yucky hack for now... haven't investigated why we need to create a new CGAppointment beyond
    1009             //the one that we pass.
     987
     988            //next line is probably done elsewhere
     989            rApptInfo.WalkIn = bWalkin ? true : false;
    1010990            rApptInfo.AppointmentKey = nApptID;
     991
     992            this.m_appointments.AddAppointment(rApptInfo);
    1011993
    1012994            //Have make appointment from CGView responsible for requesting an update for the avialability.
Note: See TracChangeset for help on using the changeset viewer.