PageRenderTime 27ms CodeModel.GetById 16ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 1ms

/pigeoncms/App_Code/PageStats.cs

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