Beispiel #1
0
        public static ViewStat LoadViewStat(IDataReader reader)
        {
            ViewStat vStat = new ViewStat();

            if (reader["Title"] != DBNull.Value)
            {
                vStat.PageTitle = (string) reader["Title"];
            }

            if (reader["Count"] != DBNull.Value)
            {
                vStat.ViewCount = (int) reader["Count"];
            }

            if (reader["Day"] != DBNull.Value)
            {
                vStat.ViewDate = (DateTime) reader["Day"];
            }

            if (reader["PageType"] != DBNull.Value)
            {
                vStat.PageType = (PageType)((byte)reader["PageType"]);
            }

            return vStat;
        }
Beispiel #2
0
 public void CanSetAndGetSimpleProperties()
 {
     var stat = new ViewStat();
     UnitTestHelper.AssertSimpleProperties(stat);
 }