Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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);
        }
Esempio n. 5
0
 public static int GetTimeZoneBias(int TimeZoneId)
 {
     return(DBCommon.GetTimeZoneBias(TimeZoneId));
 }
Esempio n. 6
0
 public static DateTime GetLocalDate(int TimeZoneId, DateTime UTCDate)
 {
     return(DBCommon.GetLocalDate(TimeZoneId, UTCDate));
 }