本文整理汇总了C#中Visitor.MarkOld方法的典型用法代码示例。如果您正苦于以下问题:C# Visitor.MarkOld方法的具体用法?C# Visitor.MarkOld怎么用?C# Visitor.MarkOld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visitor
的用法示例。
在下文中一共展示了Visitor.MarkOld方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTopVisitorList
public IList<Core.Business.Visitor> GetTopVisitorList(int num, long accountId)
{
IList<Core.Business.Visitor> visitorList = new List<Core.Business.Visitor>();
SqlServerUtility sql = new SqlServerUtility(connectionString);
sql.AddParameter("@Num", SqlDbType.BigInt, num);
sql.AddParameter("@AccountId", SqlDbType.BigInt, accountId);
SqlDataReader reader = sql.ExecuteSPReader("USP_Visitor_SelectTop_By_AccountId");
if (reader != null)
{
while (reader.Read())
{
Core.Business.Visitor visitor = new Visitor();
if (!reader.IsDBNull(0)) visitor.Id = reader.GetInt64(0);
if (!reader.IsDBNull(1)) visitor.AccountId = reader.GetInt64(1);
if (!reader.IsDBNull(2)) visitor.VisitorId = reader.GetInt64(2);
if (!reader.IsDBNull(3)) visitor.VisiteDate = reader.GetDateTime(3);
if (!reader.IsDBNull(4)) visitor.IP = reader.GetString(4);
visitor.MarkOld();
visitorList.Add(visitor);
}
}
return visitorList;
}
示例2: GetTopVisitorByActivityId
public IList<Core.Business.Visitor> GetTopVisitorByActivityId(String ActivityId, int PageSize)
{
IList<Core.Business.Visitor> visitorList = new List<Core.Business.Visitor>();
SqlServerUtility sql = new SqlServerUtility(connectionString);
sql.AddParameter("@ActivityId", SqlDbType.NVarChar, ActivityId);
sql.AddParameter("@PageSize", SqlDbType.BigInt, PageSize);
SqlDataReader reader = sql.ExecuteSPReader("USP_Visitor_SelectTop_By_ActivityId");
if (reader != null)
{
while (reader.Read())
{
Core.Business.Visitor visitor = new Visitor();
if (!reader.IsDBNull(0)) visitor.Id = reader.GetInt64(0);
if (!reader.IsDBNull(1)) visitor.AccountId = reader.GetInt64(1);
if (!reader.IsDBNull(2)) visitor.VisitorId = reader.GetInt64(2);
if (!reader.IsDBNull(3)) visitor.VisiteDate = reader.GetDateTime(3);
if (!reader.IsDBNull(4)) visitor.IP = reader.GetString(4);
if (!reader.IsDBNull(5)) visitor.ActivityId = reader.GetString(5);
if (!reader.IsDBNull(6)) visitor.VisitorName = reader.GetString(6);
visitor.MarkOld();
visitorList.Add(visitor);
}
}
return visitorList;
}