Beispiel #1
0
        public static IDataReader GetQuickSnapshotReport(DateTime StartDate, DateTime EndDate, int CreatorId)
        {
            StartDate = DBCommon.GetUTCDate(Security.CurrentUser.TimeZoneId, StartDate);
            EndDate   = DBCommon.GetUTCDate(Security.CurrentUser.TimeZoneId, EndDate);

            return(DBUserReport.GetQuickSnapshotReport(StartDate, EndDate, CreatorId));
        }
Beispiel #2
0
        public static IDataReader GetMostActiveGroupsByAssetVersionReport(DateTime FromDate, DateTime ToDate)
        {
            int TimeZoneId = Security.CurrentUser.TimeZoneId;

            FromDate = DBCommon.GetUTCDate(TimeZoneId, FromDate);
            ToDate   = DBCommon.GetUTCDate(TimeZoneId, ToDate).AddDays(1);
            return(DBUserReport.GetMostActiveGroupsByAssetVersionReport(FromDate, ToDate));
        }
Beispiel #3
0
        /// <summary>
        /// ActiveAccounts, InactiveAccounts, NewProjectsCount, NewEventsCount,
        /// NewIncidentsCount, NewToDosCount, NewTasksCount, PortalLogins, ReOpenIncidentsCount
        /// </summary>
        private static IDataReader GetSecGroupStats(int GroupID, DateTime fromDate, DateTime toDate, bool ShowAll)
        {
            int TimeZoneId = Security.CurrentUser.TimeZoneId;

            fromDate = DBCommon.GetUTCDate(TimeZoneId, fromDate);
            toDate   = DBCommon.GetUTCDate(TimeZoneId, toDate);

            return(DBUserReport.GetSecGroupStats(GroupID, fromDate, toDate, ShowAll));
        }
Beispiel #4
0
        public static int GetCurrentBias(int TimeZoneId)
        {
            DateTime UTCDate   = DateTime.UtcNow;
            DateTime LocalDate = DBCommon.GetLocalDate(TimeZoneId, UTCDate);
            int      retval    = UTCDate.Hour * 60 + UTCDate.Minute - LocalDate.Hour * 60 - LocalDate.Minute;

            if (UTCDate.Date > LocalDate.Date)
            {
                retval = retval + 24 * 60;
            }
            else if (UTCDate.Date < LocalDate.Date)
            {
                retval = retval - 24 * 60;
            }
            return(retval);
        }
Beispiel #5
0
 public static int GetTimeZoneBias(int TimeZoneId)
 {
     return(DBCommon.GetTimeZoneBias(TimeZoneId));
 }
Beispiel #6
0
 public static DateTime GetLocalDate(int TimeZoneId, DateTime UTCDate)
 {
     return(DBCommon.GetLocalDate(TimeZoneId, UTCDate));
 }