Component Page /Tools.cs (C#)
1: using System;  
2: using Microsoft.ApplicationBlocks.Data;  
3: using System.Data.SqlClient;  
4: using System.Data;  
5:   
6: namespace QuizNetOnline.Logic  
7: {  
8:     [Serializable]  
9:     public class Tools  
10:     {  
11:         public SqlDataReader UsersJoiningDateByDate(DateTime startDate, DateTime endDate)  
12:         {  
13:             ISqlWrapper isqlWrapper = new SqlWrapper();  
14:             string connStr = isqlWrapper.GetConnectionString();  
15:             const string sproc = "TOOLS_UsersJoiningDateByDate";  
16:   
17:             var parameters = new SqlParameter[2];  
18:             parameters[0] = new SqlParameter("StartDate", startDate);  
19:             parameters[1] = new SqlParameter("EndDate", endDate);  
20:   
21:             try  
22:             {  
23:                 return SqlHelper.ExecuteReader(connStr, CommandType.StoredProcedure, sproc,parameters);  
24:             }  
25:             catch (Exception ex)  
26:             {  
27:                 SqlWrapper sqlwrapper = new SqlWrapper();  
28:                 ErrorLog errorLog = new ErrorLog();  
29:                 errorLog.LogException("TOOLS_UsersJoiningDateByDate", ex, sqlwrapper);  
30:                 throw;  
31:             }  
32:         }  
33:   
34:         public SqlDataReader NumberOfTestsTakenByDate(DateTime startDate, DateTime endDate)  
35:         {  
36:             ISqlWrapper isqlWrapper = new SqlWrapper();  
37:             string connStr = isqlWrapper.GetConnectionString();  
38:             const string sproc = "TOOLS_NumberOfTestTakenByDate";  
39:   
40:             var parameters = new SqlParameter[2];  
41:             parameters[0] = new SqlParameter("StartDate", startDate);  
42:             parameters[1] = new SqlParameter("EndDate", endDate);  
43:   
44:             try  
45:             {  
46:                 return SqlHelper.ExecuteReader(connStr, CommandType.StoredProcedure, sproc, parameters);  
47:             }  
48:             catch (Exception ex)  
49:             {  
50:                 ErrorLog errorLog = new ErrorLog();  
51:                 errorLog.LogException("TOOLS_NumberOfTestTakenByDate", ex, isqlWrapper);  
52:                 throw;  
53:             }  
54:         }  
55:   
56:         public SqlDataReader NumberQuestionsCreated(DateTime startDate, DateTime endDate)  
57:         {  
58:             ISqlWrapper isqlWrapper = new SqlWrapper();  
59:             string connStr = isqlWrapper.GetConnectionString();  
60:             const string sproc = "TOOLS_NumberQuestionsCreated";  
61:   
62:             var parameters = new SqlParameter[2];  
63:             parameters[0] = new SqlParameter("StartDate", startDate);  
64:             parameters[1] = new SqlParameter("EndDate", endDate);  
65:   
66:             try  
67:             {  
68:                 return SqlHelper.ExecuteReader(connStr, CommandType.StoredProcedure, sproc, parameters);  
69:             }  
70:             catch (Exception ex)  
71:             {  
72:                 ErrorLog errorLog = new ErrorLog();  
73:                 errorLog.LogException("TOOLS_NumberQuestionsCreated", ex, isqlWrapper);  
74:                 throw;  
75:             }  
76:         }  
77:   
78:         public SqlDataReader NumberOfTestsTakenByCountry(DateTime startDate, DateTime endDate)  
79:         {  
80:   
81:             ISqlWrapper isqlWrapper = new SqlWrapper();  
82:             string connStr = isqlWrapper.GetConnectionString();  
83:             const string sproc = "TOOLS_NumberOfTestTakenByCountry";  
84:   
85:             var parameters = new SqlParameter[2];  
86:             parameters[0] = new SqlParameter("StartDate", startDate);  
87:             parameters[1] = new SqlParameter("EndDate", endDate);  
88:   
89:             try  
90:             {  
91:                 return SqlHelper.ExecuteReader(connStr, CommandType.StoredProcedure, sproc, parameters);  
92:             }  
93:             catch (Exception ex)  
94:             {  
95:                 ErrorLog errorLog = new ErrorLog();  
96:                 errorLog.LogException("TOOLS_NumberOfTestTakenByCountry", ex, isqlWrapper);  
97:                 throw;  
98:             }  
99:         }  
100:           
101:   
102:   
103:         public SqlDataReader NumberOfQuestionsAnsweredByDate(DateTime startDate,DateTime endDate)  
104:         {  
105:             ISqlWrapper isqlWrapper = new SqlWrapper();  
106:             string connStr = isqlWrapper.GetConnectionString();  
107:             const string sproc = "TOOLS_NumberOfQuestionsAnsweredByDate";  
108:   
109:             var parameters = new SqlParameter[2];  
110:             parameters[0] = new SqlParameter("StartDate", startDate);  
111:             parameters[1] = new SqlParameter("EndDate", endDate);  
112:   
113:             try  
114:             {  
115:                 return SqlHelper.ExecuteReader(connStr, CommandType.StoredProcedure, sproc,parameters);  
116:             }  
117:             catch (Exception ex)  
118:             {  
119:                 ErrorLog errorLog = new ErrorLog();  
120:                 errorLog.LogException("TOOLS_NumberOfQuestionsAnsweredByDate", ex, isqlWrapper);  
121:                 throw;  
122:             }  
123:         }  
124:   
125:         public SqlDataReader NumberOfLastLoginDate(DateTime startDate, DateTime endDate)  
126:         {  
127:             ISqlWrapper isqlWrapper = new SqlWrapper();  
128:             string connStr = isqlWrapper.GetConnectionString();  
129:             const string sproc = "TOOLS_NumberOfLastLoginDate";  
130:   
131:             var parameters = new SqlParameter[2];  
132:             parameters[0] = new SqlParameter("StartDate", startDate);  
133:             parameters[1] = new SqlParameter("EndDate", endDate);  
134:   
135:             try  
136:             {  
137:                 return SqlHelper.ExecuteReader(connStr, CommandType.StoredProcedure, sproc,parameters);  
138:             }  
139:             catch (Exception ex)  
140:             {  
141:                 ErrorLog errorLog = new ErrorLog();  
142:                 errorLog.LogException("TOOLS_NumberOfQuestionsAnsweredByDate", ex, isqlWrapper);  
143:                 throw;  
144:             }  
145:         }  
146:   
147:   
148:         public DataTable MyResultsByDate(DateTime startDate, DateTime endDate, string email, string topicCode)  
149:         {  
150:             ISqlWrapper isqlWrapper = new SqlWrapper();  
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

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