App_Code/Sections/EventList.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//===============================================================================================
//
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
//
//===============================================================================================
using System;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Globalization;
namespace MyWebPagesStarterKit
{
/// <summary>
/// Event List Section
/// This section displays a list of events
/// Only events with a display date that lies in the past are displayed
/// </summary>
public class EventList : Section<EventList.EventListData>, ISidebarObject
{
public EventList()
{
_data.Entries = new DataSet();
_data.Entries.Tables.Add(new DataTable("EventListEntries"));
DataColumn primaryKeyColumn = new DataColumn("Guid", typeof(Guid));
primaryKeyColumn.Unique = true;
_data.Entries.Tables["EventListEntries"].Columns.Add(primaryKeyColumn);
_data.Entries.Tables["EventListEntries"].PrimaryKey = new DataColumn[] { primaryKeyColumn };
_data.Entries.Tables["EventListEntries"].Columns.AddRange(
new DataColumn[]
{
new DataColumn("EventName", typeof(string)),
new DataColumn("EventText", typeof(string)),
new DataColumn("EventLocation", typeof(string)),
new DataColumn("EventDate", typeof(DateTime)),
new DataColumn("DisplayDate", typeof(DateTime))
}
);
}
public EventList(string id) : base(id) { }
/// <summary>
/// The DataTable with all events
/// </summary>
public DataTable EventEntries
{
get { return _data.Entries.Tables["EventListEntries"]; }
}
/// <summary>
/// Returns a DataView with all events that have a DisplayDate in the past and EventDate in the future (you can change behaviour by using the withPastEvents-parameter)
后面还有 110 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
