Esempio n. 1
0
        private static List <ExceptionTime> ConvertDoctorExceptions(L5TE_GTEFAS_1440_Events[] practiceExceptionDB)
        {
            var retVal = new List <ExceptionTime>();

            if (practiceExceptionDB != null)
            {
                foreach (var exceptionDB in practiceExceptionDB)
                {
                    var exception = new ExceptionTime()
                    {
                        ID          = exceptionDB.CMN_CAL_EventID,
                        PeriodStart = exceptionDB.StartTime,
                        PeriodEnd   = exceptionDB.EndTime,
                    };

                    if (exceptionDB.IsDaily)
                    {
                        exception.Recurency = Recurency.Daily;
                    }
                    else if (exceptionDB.IsWeekly)
                    {
                        exception.Recurency = Recurency.Weekly;
                    }
                    else if (exceptionDB.IsMonthly)
                    {
                        exception.Recurency = Recurency.Monthly;
                    }
                    else if (exceptionDB.IsYearly)
                    {
                        exception.Recurency = Recurency.Yearly;
                    }

                    retVal.Add(exception);
                }
            }
            return(retVal);
        }
Esempio n. 2
0
        private static List <ExceptionTime> ConvertDeviceExceptions(L5TE_GDAfT_1844_Availability[] deviceAvaDB)
        {
            var retVal = new List <ExceptionTime>();

            if (deviceAvaDB != null)
            {
                foreach (var exceptionDB in deviceAvaDB)
                {
                    var exception = new ExceptionTime()
                    {
                        ID          = exceptionDB.CMN_CAL_AVA_AvailabilityID,
                        PeriodStart = exceptionDB.StartTime,
                        PeriodEnd   = exceptionDB.EndTime,
                    };

                    if (exceptionDB.IsDaily)
                    {
                        exception.Recurency = Recurency.Daily;
                    }
                    else if (exceptionDB.IsWeekly)
                    {
                        exception.Recurency = Recurency.Weekly;
                    }
                    else if (exceptionDB.IsMonthly)
                    {
                        exception.Recurency = Recurency.Monthly;
                    }
                    else if (exceptionDB.IsYearly)
                    {
                        exception.Recurency = Recurency.Yearly;
                    }

                    retVal.Add(exception);
                }
            }
            return(retVal);
        }
Esempio n. 3
0
        private static List <ExceptionTime> ConvertPracticeExceptions(L5TE_GNWTfOID_1506[] practiceExceptionDB)
        {
            var retVal = new List <ExceptionTime>();

            if (practiceExceptionDB != null)
            {
                foreach (var exceptionDB in practiceExceptionDB)
                {
                    var exception = new ExceptionTime()
                    {
                        ID          = exceptionDB.TimeID,
                        PeriodStart = exceptionDB.StartTime,
                        PeriodEnd   = exceptionDB.EndTime
                    };

                    if (exceptionDB.IsDaily)
                    {
                        exception.Recurency = Recurency.Daily;
                    }
                    else if (exceptionDB.IsWeekly)
                    {
                        exception.Recurency = Recurency.Weekly;
                    }
                    else if (exceptionDB.IsMonthly)
                    {
                        exception.Recurency = Recurency.Monthly;
                    }
                    else if (exceptionDB.IsYearly)
                    {
                        exception.Recurency = Recurency.Yearly;
                    }

                    retVal.Add(exception);
                }
            }
            return(retVal);
        }