protected void Page_Load(object sender, System.EventArgs e)
        {
            DateTime startTime = DateTime.Now;

            GroupClusterCollection clusters = new GroupClusterCollection();

            clusters.LoadChildClusterHierarchy(-1, 1, 3);
            DisplayClusters(clusters, "");
            TimeSpan timeSpan = DateTime.Now.Subtract(startTime);

            ph1.Controls.Add(new LiteralControl(string.Format("[{0} milliseconds]", timeSpan.Milliseconds.ToString("N0"))));

            //startTime = DateTime.Now;
            //ProfileItems profileItems = new ProfileItems(-1, 3, Arena.Enums.ProfileType.Event, 109179);
            //DisplayProfileItems(profileItems, "");
            //timeSpan = DateTime.Now.Subtract(startTime);
            //ph2.Controls.Add(new LiteralControl(string.Format("[{0} milliseconds]", timeSpan.Milliseconds.ToString("N0"))));
        }
Exemplo n.º 2
0
        public WorkerResultStatus SendEmail(out string message, out int state)
        {
            WorkerResultStatus workerResultStatus = WorkerResultStatus.Ok;

            message = string.Empty;
            state   = STATE_OK;

            try
            {
                string day = DateTime.Today.DayOfWeek.ToString().ToLower();

                GroupClusterCollection clusters = new GroupClusterCollection();
                clusters.LoadChildClusterHierarchy(-1, _categoryId, _organizationId);
                RecurseClusters(clusters, day);
            }
            catch (Exception ex)
            {
                workerResultStatus = WorkerResultStatus.Exception;
                message            = "An error occured while processing ERA Loss Notifications.\n\nMessage\n------------------------\n" + ex.Message + "\n\nStack Trace\n------------------------\n" + ex.StackTrace;
            }

            return(workerResultStatus);
        }