Ejemplo n.º 1
0
 ///<summary></summary>
 public static long Insert(HistAppointment histAppointment)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         histAppointment.HistApptNum = Meth.GetLong(MethodBase.GetCurrentMethod(), histAppointment);
         return(histAppointment.HistApptNum);
     }
     return(Crud.HistAppointmentCrud.Insert(histAppointment));
 }
Ejemplo n.º 2
0
 ///<summary></summary>
 public static void Update(HistAppointment histAppointment)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), histAppointment);
         return;
     }
     Crud.HistAppointmentCrud.Update(histAppointment);
 }
Ejemplo n.º 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)
        {
            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);
        }
Ejemplo n.º 4
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);
        }