ASP.NET Page /Admin/Default.aspx.cs (C#)
1: using System;  
2: using System.Collections;  
3: using System.Collections.Generic;  
4: using System.Web.UI;  
5: using Microsoft.ApplicationBlocks.Data;  
6: using QuizNetOnline.Logic;  
7: using QuiznetOnline.Web.UI.BusinessClasses;  
8: using System.Web.UI.WebControls;  
9: using System.Data;  
10:   
11: namespace QuiznetOnline.Web.UI.Admin  
12: {  
13:     public partial class Admin_Default : Page  
14:     {  
15:         protected void Page_Load(object sender, EventArgs e)  
16:         {  
17:             if (!Page.IsPostBack)  
18:             {  
19:                 lblCurrentDateTime.Text = DateTime.Now.ToString();  
20:                 if (FormOperations.IsWebServerLocalHost(Request.Url.ToString()))  
21:                 {  
22:                     txtUserID.Text = "??????";  
23:                     txtPassword.Attributes.Add("value", "?????????");  
24:                 }  
25:                 var tableinformation = new TableInformation();  
26:   
27:                 PopulateTable();  
28:   
29:                 if (Session["Validated"] != null && !(bool) Session["Validated"] == false)  
30:                 {  
31:                     tblStats.Visible = true;  
32:                     tblMenu.Visible = true;  
33:                     pnlAdminMessge.Visible = true;  
34:                 }  
35:   
36:                 Page.Title = string.Format("({0} Log) QuiznetOnline", tableinformation.Log);  
37:   
38:                 PopulateCountries();  
39:   
40:                 PopulateMessages();  
41:             }  
42:         }  
43:   
44:         private void PopulateMessages()  
45:         {  
46:             AdminMessage admin=new AdminMessage();  
47:             grdMessages.DataSource = admin.GetAdminMessage(new SqlWrapper());  
48:             grdMessages.DataBind();  
49:   
50:             txtStartMessageDate.Text = DateTime.Now.ToString();  
51:             txtEndMessageDate.Text = DateTime.Now.ToString();  
52:         }  
53:   
54:         private void PopulateCountries()  
55:         {  
56:             Country country = new Country();  
57:             cmbCountry.DataSource = country.GetCountries(new SqlWrapper());  
58:             cmbCountry.DataTextField = "CountryDesc";  
59:             cmbCountry.DataValueField = "CountryCode";  
60:   
61:             cmbCountry.DataBind();  
62:         }  
63:   
64:         private void PopulateTable()  
65:         {  
66:             var tableinformation = new TableInformation();  
67:             lblComments.Text = tableinformation.Comments.ToString();  
68:             lblContactUs.Text = tableinformation.ContactUs.ToString();  
69:             lblLog.Text = tableinformation.Log.ToString();  
70:             lblResults.Text = tableinformation.Last24HrsResults + @" (" + tableinformation.DayResults.ToString() + @")" ;  
71:             lblUserQuestions.Text = tableinformation.UserQuestions.ToString();  
72:             lblErrors.Text = tableinformation.Errors.ToString();  
73:             //PopulateAdminMessage();  
74:         }  
75:   
76:         private void PopulateAdminMessage()  
77:         {  
78:             var adminMessage = new AdminMessage();  
79:             lblAdminMessage.Text = adminMessage.AdminMessageText;  
80:             txtStartMessageDate.Text = adminMessage.StartMessageDate.ToString();  
81:             txtEndMessageDate.Text = adminMessage.EndMessageDate.ToString();  
82:         }  
83:   
84:         protected void cmdSubmit_Click(object sender, EventArgs e)  
85:         {  
86:             UserWeb userWeb = new UserWeb();  
87:             DataTable tbl=userWeb.GetUser(txtUserID.Text, txtPassword.Text,new SqlWrapper());  
88:             if (tbl.Rows.Count > 0)  
89:             {  
90:                 Session["Validated"] = true;  
91:                 tblMenu.Visible = true;  
92:                 tblStats.Visible = true;  
93:                 pnlAdminMessge.Visible = true;  
94:             }  
95:             else  
96:             {  
97:                 Session["Validated"] = false;  
98:             }  
99:         }  
100:   
101:         protected void cmdAdmin_Click(object sender, EventArgs e)  
102:         {  
103:             Response.Redirect("Admin.aspx");  
104:         }  
105:   
106:         protected void cmdApproveQuestion_Click(object sender, EventArgs e)  
107:         {  
108:             Response.Redirect("ApproveQuestion.aspx");  
109:         }  
110:   
111:         protected void cmdQuestionsAnswers_Click(object sender, EventArgs e)  
112:         {  
113:             Response.Redirect("QuestionsAnswers.aspx");  
114:         }  
115:   
116:         protected void cmdTableSequence_Click(object sender, EventArgs e)  
117:         {  
118:             Response.Redirect("TableSequence.aspx");  
119:         }  
120:   
121:         protected void cmdUser_Click(object sender, EventArgs e)  
122:         {  
123:             Response.Redirect("User.aspx");  
124:         }  
125:   
126:         protected void cmdContactUs_Click(object sender, EventArgs e)  
127:         {  
128:             Response.Redirect("ContactUs.aspx");  
129:         }  
130:   
131:         protected void cmdResults_Click(object sender, EventArgs e)  
132:         {  
133:             Response.Redirect("Results.aspx");  
134:         }  
135:   
136:         protected void cmdProfile_Click(object sender, EventArgs e)  
137:         {  
138:             Response.Redirect("Profile.aspx");  
139:         }  
140:   
141:         protected void cmdComments_Click(object sender, EventArgs e)  
142:         {  
143:             Response.Redirect("Comments.aspx");  
144:         }  
145:   
146:         protected void cmdErrors_Click(object sender, EventArgs e)  
147:         {  
148:             Response.Redirect("Errors.aspx");  
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
304: There is a limit of 150 source code lines in the evaluation version
305: There is a limit of 150 source code lines in the evaluation version
306: There is a limit of 150 source code lines in the evaluation version
307: There is a limit of 150 source code lines in the evaluation version
308: There is a limit of 150 source code lines in the evaluation version
309: There is a limit of 150 source code lines in the evaluation version
310: There is a limit of 150 source code lines in the evaluation version
311: There is a limit of 150 source code lines in the evaluation version
312: There is a limit of 150 source code lines in the evaluation version
313: There is a limit of 150 source code lines in the evaluation version
314: There is a limit of 150 source code lines in the evaluation version
315: There is a limit of 150 source code lines in the evaluation version
316: There is a limit of 150 source code lines in the evaluation version
317: There is a limit of 150 source code lines in the evaluation version
318: There is a limit of 150 source code lines in the evaluation version
319: There is a limit of 150 source code lines in the evaluation version
320: There is a limit of 150 source code lines in the evaluation version
321: There is a limit of 150 source code lines in the evaluation version
322: There is a limit of 150 source code lines in the evaluation version
323: There is a limit of 150 source code lines in the evaluation version
324: There is a limit of 150 source code lines in the evaluation version
325: There is a limit of 150 source code lines in the evaluation version
326: There is a limit of 150 source code lines in the evaluation version
327: There is a limit of 150 source code lines in the evaluation version
328: There is a limit of 150 source code lines in the evaluation version
329: There is a limit of 150 source code lines in the evaluation version
330: There is a limit of 150 source code lines in the evaluation version
331: There is a limit of 150 source code lines in the evaluation version
332: There is a limit of 150 source code lines in the evaluation version
333: There is a limit of 150 source code lines in the evaluation version
334: There is a limit of 150 source code lines in the evaluation version
335: There is a limit of 150 source code lines in the evaluation version
336: There is a limit of 150 source code lines in the evaluation version
337: There is a limit of 150 source code lines in the evaluation version
338: There is a limit of 150 source code lines in the evaluation version
339: There is a limit of 150 source code lines in the evaluation version
340: There is a limit of 150 source code lines in the evaluation version
341: There is a limit of 150 source code lines in the evaluation version
342: There is a limit of 150 source code lines in the evaluation version
343: There is a limit of 150 source code lines in the evaluation version
344: There is a limit of 150 source code lines in the evaluation version

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