Code Behind Page Page /Controls/NumberOfQuestionsPerTopic.ascx.cs (C#)
Used by Page /Controls/NumberOfQuestionsPerTopic.ascx (C#)
1: using System;  
2: using System.Collections.Generic;  
3: using System.Web.UI.WebControls;  
4: using Microsoft.ApplicationBlocks.Data;  
5: using QuizNetOnline.Logic;  
6: using QuiznetOnline.Data;  
7: using System.Data;  
8:   
9: namespace QuiznetOnline.Web.UI.Controls  
10: {  
11:       
12:     public partial class NumberOfQuestionsPerTopic : System.Web.UI.UserControl  
13:     {  
14:   
15:         public bool IspanelLoadQuizVisible  
16:         {  
17:             get { return panelLoadQuiz.Visible; }  
18:             set { panelLoadQuiz.Visible=value; }  
19:         }  
20:   
21:         protected void Page_Load(object sender, EventArgs e)  
22:         {  
23:             if (!Page.IsPostBack)  
24:             {  
25:                 hiddenUserID.Value = ((UserWeb)Session["userWeb"]).UserName;  
26:                 LoadTopics(lblaspnet, lblcsharp, lblnetframework, lblsql, lblall);  
27:   
28:                 if (((UserWeb)Session["userWeb"]).UserName != "guest@quiznetonline.com")  
29:                 {  
30:                     panelLoadQuiz.Visible = true;  
31:                     ProcessLoadQuiz();  
32:                 }  
33:                 else  
34:                 {  
35:                     panelLoadQuiz.Visible = false;  
36:                 }  
37:             }  
38:         }  
39:   
40:         private void ProcessLoadQuiz()  
41:         {  
42:             LoadNormalNormalQuiz();  
43:             LoadNormalcsharpcodeQuiz();  
44:   
45:             LoadEasyNormalQuiz();  
46:             LoadEasycsharpcodeQuiz();  
47:   
48:             LoadHardNormalQuiz();  
49:             LoadHardcsharpcodeQuiz();  
50:   
51:             LoadAuthorRatingNormalQuiz();  
52:             LoadAuthorRatingcsharpcodeQuiz();  
53:   
54:             LoadFav();  
55:         }  
56:   
57:         private void LoadNormalNormalQuiz()  
58:         {  
59:             var userTest = new UserTest();  
60:             List<UserTest> userTests = userTest.LoadQuizzes(false, ((UserWeb)Session["userWeb"]).UserName, "normal", "normal", new SqlWrapper());  
61:   
62:             foreach (UserTest _userTest in userTests)  
63:             {  
64:                 if (_userTest.QuestionPos > 0)  
65:                 {  
66:                     var tblInfo = new TableInformation();  
67:                     var hyp = (HyperLink)FindControl("hypLoad" + _userTest.Topic.TopicCode + "normalnormal");  
68:   
69:                     hyp.NavigateUrl = "~/PracticeTest.aspx?Group=" + _userTest.Topic.TopicCode + "&AdditionalOptions=normal&TagOptions=normal&IsNew=false";  
70:                     hyp.Text = "Continue Quiz";  
71:   
72:                     hyp.ToolTip = _userTest.QuestionPos - 1 + " of " + tblInfo.GetTopicCount(_userTest.Topic, null, null, ((UserWeb)Session["userWeb"]).UserName) + " answered" + Environment.NewLine;  
73:                     hyp.ToolTip += "Correct:" + _userTest.Correct + "   Incorrect:" + _userTest.Incorrect;  
74:   
75:                     var img = (Image)FindControl("imgLoad" + _userTest.Topic.TopicCode + "normalnormal");  
76:                     img.Visible = true;  
77:                 }  
78:             }  
79:         }  
80:   
81:         private void LoadNormalcsharpcodeQuiz()  
82:         {  
83:             var userTest = new UserTest();  
84:             List<UserTest> userTests = userTest.LoadQuizzes(false,((UserWeb)Session["userWeb"]).UserName, "normal", "csharpcode", new SqlWrapper());  
85:   
86:             foreach (UserTest _userTest in userTests)  
87:             {  
88:                 if (_userTest.QuestionPos > 0)  
89:                 {  
90:                     var tblInfo = new TableInformation();  
91:                     var hyp = (HyperLink)FindControl("hypLoad" + _userTest.Topic.TopicCode + "normalcsharpcode");  
92:   
93:                     hyp.NavigateUrl = "~/PracticeTest.aspx?Group=" + _userTest.Topic.TopicCode + "&AdditionalOptions=normal&TagOptions=csharpcode&IsNew=false";  
94:                     hyp.Text = "Continue Quiz";  
95:   
96:                     hyp.ToolTip = _userTest.QuestionPos - 1 + " of " + tblInfo.GetTopicCount(_userTest.Topic, null, "csharpcode", ((UserWeb)Session["userWeb"]).UserName) + " answered" + Environment.NewLine;  
97:                     hyp.ToolTip += "Correct:" + _userTest.Correct + "   Incorrect:" + _userTest.Incorrect;  
98:   
99:                     var img = (Image)FindControl("imgLoad" + _userTest.Topic.TopicCode + "normalcsharpcode");  
100:                     img.Visible = true;  
101:                 }  
102:             }  
103:         }  
104:   
105:         private void LoadEasyNormalQuiz()  
106:         {  
107:             var userTest = new UserTest();  
108:             List<UserTest> userTests = userTest.LoadQuizzes(false,((UserWeb)Session["userWeb"]).UserName, "easy", "normal", new SqlWrapper());  
109:   
110:             foreach (UserTest _userTest in userTests)  
111:             {  
112:                 if (_userTest.QuestionPos > 0)  
113:                 {  
114:                     var tblInfo = new TableInformation();  
115:                     var hyp = (HyperLink)FindControl("hypLoad" + _userTest.Topic.TopicCode + "easynormal");  
116:   
117:                     hyp.NavigateUrl = "~/PracticeTest.aspx?Group=" + _userTest.Topic.TopicCode + "&AdditionalOptions=easy&TagOptions=normal&IsNew=false";  
118:                     hyp.Text = "Continue Quiz";  
119:   
120:                     hyp.ToolTip = _userTest.QuestionPos - 1 + " of " + tblInfo.GetTopicCount(_userTest.Topic, "easy", null,((UserWeb)Session["userWeb"]).UserName) + " answered" + Environment.NewLine;  
121:                     hyp.ToolTip += "Correct:" + _userTest.Correct + "   Incorrect:" + _userTest.Incorrect;  
122:   
123:                     var img = (Image)FindControl("imgLoad" + _userTest.Topic.TopicCode + "easynormal");  
124:                     img.Visible = true;  
125:                 }  
126:             }  
127:         }  
128:   
129:         private void LoadEasycsharpcodeQuiz()  
130:         {  
131:             var userTest = new UserTest();  
132:             List<UserTest> userTests = userTest.LoadQuizzes(false,((UserWeb)Session["userWeb"]).UserName, "easy", "csharpcode", new SqlWrapper());  
133:   
134:             foreach (UserTest _userTest in userTests)  
135:             {  
136:                 if (_userTest.QuestionPos > 0)  
137:                 {  
138:                     var tblInfo = new TableInformation();  
139:                     var hyp = (HyperLink)FindControl("hypLoad" + _userTest.Topic.TopicCode + "easycsharpcode");  
140:   
141:                     hyp.NavigateUrl = "~/PracticeTest.aspx?Group=" + _userTest.Topic.TopicCode + "&AdditionalOptions=easy&TagOptions=csharpcode&IsNew=false";  
142:                     hyp.Text = "Continue Quiz";  
143:   
144:                     hyp.ToolTip = _userTest.QuestionPos - 1 + " of " + tblInfo.GetTopicCount(_userTest.Topic, "easy", "csharpcode",((UserWeb)Session["userWeb"]).UserName) + " answered" + Environment.NewLine;  
145:                     hyp.ToolTip += "Correct:" + _userTest.Correct + "   Incorrect:" + _userTest.Incorrect;  
146:   
147:                     var img = (Image)FindControl("imgLoad" + _userTest.Topic.TopicCode + "easycsharpcode");  
148:                     img.Visible = true;  
149:                 }  
150:             }  
151: There is a limit of 150 source code lines in the evaluation version
152: There is a limit of 150 source code lines in the evaluation version
153: There is a limit of 150 source code lines in the evaluation version
154: There is a limit of 150 source code lines in the evaluation version
155: There is a limit of 150 source code lines in the evaluation version
156: There is a limit of 150 source code lines in the evaluation version
157: There is a limit of 150 source code lines in the evaluation version
158: There is a limit of 150 source code lines in the evaluation version
159: There is a limit of 150 source code lines in the evaluation version
160: There is a limit of 150 source code lines in the evaluation version
161: There is a limit of 150 source code lines in the evaluation version
162: There is a limit of 150 source code lines in the evaluation version
163: There is a limit of 150 source code lines in the evaluation version
164: There is a limit of 150 source code lines in the evaluation version
165: There is a limit of 150 source code lines in the evaluation version
166: There is a limit of 150 source code lines in the evaluation version
167: There is a limit of 150 source code lines in the evaluation version
168: There is a limit of 150 source code lines in the evaluation version
169: There is a limit of 150 source code lines in the evaluation version
170: There is a limit of 150 source code lines in the evaluation version
171: There is a limit of 150 source code lines in the evaluation version
172: There is a limit of 150 source code lines in the evaluation version
173: There is a limit of 150 source code lines in the evaluation version
174: There is a limit of 150 source code lines in the evaluation version
175: There is a limit of 150 source code lines in the evaluation version
176: There is a limit of 150 source code lines in the evaluation version
177: There is a limit of 150 source code lines in the evaluation version
178: There is a limit of 150 source code lines in the evaluation version
179: There is a limit of 150 source code lines in the evaluation version
180: There is a limit of 150 source code lines in the evaluation version
181: There is a limit of 150 source code lines in the evaluation version
182: There is a limit of 150 source code lines in the evaluation version
183: There is a limit of 150 source code lines in the evaluation version
184: There is a limit of 150 source code lines in the evaluation version
185: There is a limit of 150 source code lines in the evaluation version
186: There is a limit of 150 source code lines in the evaluation version
187: There is a limit of 150 source code lines in the evaluation version
188: There is a limit of 150 source code lines in the evaluation version
189: There is a limit of 150 source code lines in the evaluation version
190: There is a limit of 150 source code lines in the evaluation version
191: There is a limit of 150 source code lines in the evaluation version
192: There is a limit of 150 source code lines in the evaluation version
193: There is a limit of 150 source code lines in the evaluation version
194: There is a limit of 150 source code lines in the evaluation version
195: There is a limit of 150 source code lines in the evaluation version
196: There is a limit of 150 source code lines in the evaluation version
197: There is a limit of 150 source code lines in the evaluation version
198: There is a limit of 150 source code lines in the evaluation version
199: There is a limit of 150 source code lines in the evaluation version
200: There is a limit of 150 source code lines in the evaluation version
201: There is a limit of 150 source code lines in the evaluation version
202: There is a limit of 150 source code lines in the evaluation version
203: There is a limit of 150 source code lines in the evaluation version
204: There is a limit of 150 source code lines in the evaluation version
205: There is a limit of 150 source code lines in the evaluation version
206: There is a limit of 150 source code lines in the evaluation version
207: There is a limit of 150 source code lines in the evaluation version
208: There is a limit of 150 source code lines in the evaluation version
209: There is a limit of 150 source code lines in the evaluation version
210: There is a limit of 150 source code lines in the evaluation version
211: There is a limit of 150 source code lines in the evaluation version
212: There is a limit of 150 source code lines in the evaluation version
213: There is a limit of 150 source code lines in the evaluation version
214: There is a limit of 150 source code lines in the evaluation version
215: There is a limit of 150 source code lines in the evaluation version
216: There is a limit of 150 source code lines in the evaluation version
217: There is a limit of 150 source code lines in the evaluation version
218: There is a limit of 150 source code lines in the evaluation version
219: There is a limit of 150 source code lines in the evaluation version
220: There is a limit of 150 source code lines in the evaluation version
221: There is a limit of 150 source code lines in the evaluation version
222: There is a limit of 150 source code lines in the evaluation version
223: There is a limit of 150 source code lines in the evaluation version
224: There is a limit of 150 source code lines in the evaluation version
225: There is a limit of 150 source code lines in the evaluation version
226: There is a limit of 150 source code lines in the evaluation version
227: There is a limit of 150 source code lines in the evaluation version
228: There is a limit of 150 source code lines in the evaluation version
229: There is a limit of 150 source code lines in the evaluation version
230: There is a limit of 150 source code lines in the evaluation version
231: There is a limit of 150 source code lines in the evaluation version
232: There is a limit of 150 source code lines in the evaluation version
233: There is a limit of 150 source code lines in the evaluation version
234: There is a limit of 150 source code lines in the evaluation version
235: There is a limit of 150 source code lines in the evaluation version
236: There is a limit of 150 source code lines in the evaluation version
237: There is a limit of 150 source code lines in the evaluation version
238: There is a limit of 150 source code lines in the evaluation version
239: There is a limit of 150 source code lines in the evaluation version
240: There is a limit of 150 source code lines in the evaluation version
241: There is a limit of 150 source code lines in the evaluation version
242: There is a limit of 150 source code lines in the evaluation version
243: There is a limit of 150 source code lines in the evaluation version
244: There is a limit of 150 source code lines in the evaluation version
245: There is a limit of 150 source code lines in the evaluation version
246: There is a limit of 150 source code lines in the evaluation version
247: There is a limit of 150 source code lines in the evaluation version
248: There is a limit of 150 source code lines in the evaluation version
249: There is a limit of 150 source code lines in the evaluation version
250: There is a limit of 150 source code lines in the evaluation version
251: There is a limit of 150 source code lines in the evaluation version
252: There is a limit of 150 source code lines in the evaluation version
253: There is a limit of 150 source code lines in the evaluation version
254: There is a limit of 150 source code lines in the evaluation version
255: There is a limit of 150 source code lines in the evaluation version
256: There is a limit of 150 source code lines in the evaluation version
257: There is a limit of 150 source code lines in the evaluation version
258: There is a limit of 150 source code lines in the evaluation version
259: There is a limit of 150 source code lines in the evaluation version
260: There is a limit of 150 source code lines in the evaluation version
261: There is a limit of 150 source code lines in the evaluation version
262: There is a limit of 150 source code lines in the evaluation version
263: There is a limit of 150 source code lines in the evaluation version
264: There is a limit of 150 source code lines in the evaluation version
265: There is a limit of 150 source code lines in the evaluation version
266: There is a limit of 150 source code lines in the evaluation version
267: There is a limit of 150 source code lines in the evaluation version
268: There is a limit of 150 source code lines in the evaluation version
269: There is a limit of 150 source code lines in the evaluation version
270: There is a limit of 150 source code lines in the evaluation version
271: There is a limit of 150 source code lines in the evaluation version
272: There is a limit of 150 source code lines in the evaluation version
273: There is a limit of 150 source code lines in the evaluation version
274: There is a limit of 150 source code lines in the evaluation version
275: There is a limit of 150 source code lines in the evaluation version
276: There is a limit of 150 source code lines in the evaluation version
277: There is a limit of 150 source code lines in the evaluation version
278: There is a limit of 150 source code lines in the evaluation version
279: There is a limit of 150 source code lines in the evaluation version
280: There is a limit of 150 source code lines in the evaluation version
281: There is a limit of 150 source code lines in the evaluation version
282: There is a limit of 150 source code lines in the evaluation version
283: There is a limit of 150 source code lines in the evaluation version
284: There is a limit of 150 source code lines in the evaluation version
285: There is a limit of 150 source code lines in the evaluation version
286: There is a limit of 150 source code lines in the evaluation version
287: There is a limit of 150 source code lines in the evaluation version
288: There is a limit of 150 source code lines in the evaluation version
289: There is a limit of 150 source code lines in the evaluation version
290: There is a limit of 150 source code lines in the evaluation version
291: There is a limit of 150 source code lines in the evaluation version
292: There is a limit of 150 source code lines in the evaluation version
293: There is a limit of 150 source code lines in the evaluation version
294: There is a limit of 150 source code lines in the evaluation version
295: There is a limit of 150 source code lines in the evaluation version
296: There is a limit of 150 source code lines in the evaluation version
297: There is a limit of 150 source code lines in the evaluation version
298: There is a limit of 150 source code lines in the evaluation version
299: There is a limit of 150 source code lines in the evaluation version
300: There is a limit of 150 source code lines in the evaluation version
301: There is a limit of 150 source code lines in the evaluation version
302: There is a limit of 150 source code lines in the evaluation version
303: There is a limit of 150 source code lines in the evaluation version

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