예제 #1
0
        ///<summary>The other overload should be called when the action is Deleted so that the appt's fields will be recorded.</summary>
        public static void CreateHistoryEntry(long apptNum, HistAppointmentAction action)
        {
            //No need for additional DB check when appt was already deleted.
            Appointment appt = (action == HistAppointmentAction.Deleted?null:Appointments.GetOneApt(apptNum));

            CreateHistoryEntry(appt, action, apptNum);
        }
예제 #2
0
        ///<summary>When appt is null you must provide aptNum and HistApptAction will be set to deleted.</summary>
        public static void CreateHistoryEntry(Appointment appt, HistAppointmentAction action, long aptNum = 0)
        {
            HistAppointment hist = new HistAppointment();

            hist.HistUserNum    = Security.CurUser.UserNum;
            hist.ApptSource     = Security.CurUser.EServiceType;
            hist.HistApptAction = action;
            if (appt != null)           //Null if deleted
            {
                hist.SetAppt(appt);
            }
            else
            {
                hist.AptNum         = aptNum;
                hist.HistApptAction = HistAppointmentAction.Deleted;
            }
            HistAppointments.Insert(hist);
        }
예제 #3
0
        ///<summary>When appt is null you must provide aptNum and HistApptAction will be set to deleted.</summary>
        public static void CreateHistoryEntry(Appointment appt, HistAppointmentAction action, long aptNum = 0)
        {
            if (Security.CurUser == null)
            {
                return;                //There is no user currently logged on so do not create a HistAppointment.
            }
            HistAppointment hist = new HistAppointment();

            hist.HistUserNum    = Security.CurUser.UserNum;
            hist.ApptSource     = Security.CurUser.EServiceType;
            hist.HistApptAction = action;
            if (appt != null)           //Null if deleted
            {
                hist.SetAppt(appt);
            }
            else
            {
                hist.AptNum         = aptNum;
                hist.HistApptAction = HistAppointmentAction.Deleted;
            }
            HistAppointments.Insert(hist);
        }