/pigeoncms/App_Code/PageStats.cs

http://pigeoncms.googlecode.com/ · C# · 198 lines · 145 code · 22 blank · 31 comment · 0 complexity · c2d16c8f29180dfc0aec4641d324ed8d MD5 · raw file

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Web;
  5. using System.Web.Security;
  6. using System.Web.UI;
  7. using System.Web.UI.WebControls;
  8. using System.Web.UI.WebControls.WebParts;
  9. using System.Web.UI.HtmlControls;
  10. using System.Diagnostics;
  11. using System.ComponentModel;
  12. using System.IO;
  13. using System.Collections.Generic;
  14. using System.Threading;
  15. namespace PigeonCms
  16. {
  17. public class PageStatsReport
  18. {
  19. private string groupName = "";
  20. private int pageId = 0;
  21. private string action = "";
  22. private int statValue = 0;
  23. /// <summary>
  24. /// ex: agriturismo
  25. /// </summary>
  26. [DataObjectField(true)]
  27. public string GroupName
  28. {
  29. [DebuggerStepThrough()]
  30. get { return groupName; }
  31. [DebuggerStepThrough()]
  32. set { groupName = value; }
  33. }
  34. /// <summary>
  35. /// Id of the web page ex: 13 (agriturId)
  36. /// </summary>
  37. [DataObjectField(true)]
  38. public int PageId
  39. {
  40. [DebuggerStepThrough()]
  41. get { return pageId; }
  42. [DebuggerStepThrough()]
  43. set { pageId = value; }
  44. }
  45. /// <summary>
  46. /// ex: page access|www click|email click
  47. /// </summary>
  48. [DataObjectField(true)]
  49. public string Action
  50. {
  51. [DebuggerStepThrough()]
  52. get { return action; }
  53. [DebuggerStepThrough()]
  54. set { action = value; }
  55. }
  56. public int StatValue
  57. {
  58. [DebuggerStepThrough()]
  59. get { return statValue; }
  60. [DebuggerStepThrough()]
  61. set { statValue = value; }
  62. }
  63. }
  64. /// <summary>
  65. /// a record in PageStats table
  66. /// </summary>
  67. public class PageStatsRecord
  68. {
  69. private int statId = 0;
  70. private string groupName = "";
  71. private int pageId = 0;
  72. private string action = "";
  73. private DateTime insDate;
  74. private string clientIp = "";
  75. private string sessionId = "";
  76. /// <summary>
  77. /// Automatic Id as PKey
  78. /// </summary>
  79. [DataObjectField(true)]
  80. public int StatId
  81. {
  82. [DebuggerStepThrough()]
  83. get { return statId; }
  84. [DebuggerStepThrough()]
  85. set { statId = value; }
  86. }
  87. /// <summary>
  88. /// ex: agriturismo
  89. /// </summary>
  90. public string GroupName
  91. {
  92. [DebuggerStepThrough()]
  93. get { return groupName; }
  94. [DebuggerStepThrough()]
  95. set { groupName = value; }
  96. }
  97. /// <summary>
  98. /// Id of the web page ex: 13 (agriturId)
  99. /// </summary>
  100. public int PageId
  101. {
  102. [DebuggerStepThrough()]
  103. get { return pageId; }
  104. [DebuggerStepThrough()]
  105. set { pageId = value; }
  106. }
  107. /// <summary>
  108. /// ex: page access|www click|email click
  109. /// </summary>
  110. public string Action
  111. {
  112. [DebuggerStepThrough()]
  113. get { return action; }
  114. [DebuggerStepThrough()]
  115. set { action = value; }
  116. }
  117. /// <summary>
  118. /// Data di inserimento del record
  119. /// </summary>
  120. public DateTime InsDate
  121. {
  122. [DebuggerStepThrough()]
  123. get { return insDate; }
  124. [DebuggerStepThrough()]
  125. set { insDate = value; }
  126. }
  127. public string ClientIp
  128. {
  129. [DebuggerStepThrough()]
  130. get { return clientIp; }
  131. [DebuggerStepThrough()]
  132. set { clientIp = value; }
  133. }
  134. public string SessionId
  135. {
  136. [DebuggerStepThrough()]
  137. get { return sessionId; }
  138. [DebuggerStepThrough()]
  139. set { sessionId = value; }
  140. }
  141. }
  142. /// <summary>
  143. /// Filter on pageStats table used in search
  144. /// </summary>
  145. /// <remarks></remarks>
  146. [Serializable]
  147. public class PageStatsFilter
  148. {
  149. #region fields definition
  150. private string groupName = "";
  151. private int pageId = 0;
  152. private string action = "";
  153. #endregion
  154. public string GroupName
  155. {
  156. [DebuggerStepThrough()]
  157. get { return groupName; }
  158. [DebuggerStepThrough()]
  159. set { groupName = value; }
  160. }
  161. public int PageId
  162. {
  163. [DebuggerStepThrough()]
  164. get { return pageId; }
  165. [DebuggerStepThrough()]
  166. set { pageId = value; }
  167. }
  168. public string Action
  169. {
  170. [DebuggerStepThrough()]
  171. get { return action; }
  172. [DebuggerStepThrough()]
  173. set { action = value; }
  174. }
  175. }
  176. }