Code Behind Page Page /Controls/DashboardInfo.ascx.cs (C#)
Used by Page /Controls/DashboardInfo.ascx (C#)
1: using System;  
2: using Microsoft.ApplicationBlocks.Data;  
3: using QuizNetOnline.Logic;  
4:   
5: namespace QuiznetOnline.Web.UI.Controls  
6: {  
7:     public partial class DashboardInfo : System.Web.UI.UserControl  
8:     {  
9:         protected void Page_Load(object sender, EventArgs e)  
10:         {  
11:             if (!Page.IsPostBack)  
12:             {  
13:                 int totalQuestions = 0;  
14:                 int totalResults = 0;  
15:                 int questionAnsweredCount = 0;  
16:                 int usersCount = 0;  
17:   
18:                 QuizNetSystem quizNetSystem=new QuizNetSystem();  
19:   
20:                 quizNetSystem.GetQuiznetStats(new SqlWrapper(), out totalQuestions, out totalResults, out questionAnsweredCount, out usersCount);  
21:   
22:                 lblTestsCompleted.Text = String.Format("{0:0,0}", totalResults);  
23:                 lblQuestionsAnswered.Text = String.Format("{0:0,0}", questionAnsweredCount);  
24:                 lblFreeQuestions.Text = String.Format("{0:0,0}", totalQuestions);  
25:                 lblRegisteredUsers.Text = String.Format("{0:0,0}", usersCount);  
26:                 lblOnlineUsers.Text = String.Format("{0:0,0}", Application["OnlineUsers"]);  
27:             }  
28:         }  
29:     }  
30: }  

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.