/Disciples/Disciples/Verse/Chron.aspx.cs
C# | 30 lines | 29 code | 1 blank | 0 comment | 0 complexity | 4364543d94f9d16792f3f64503614f14 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, Apache-2.0, BSD-3-Clause, AGPL-3.0, MPL-2.0-no-copyleft-exception
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Data.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Xml.Linq;
- using UtilityExtensions;
-
- namespace Disciples.Verse
- {
- public partial class Chron : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- var dt = new DateTime(2008, 12, 31);
- var xdoc = XDocument.Parse(Resources.Resource1.Chron);
- var q = from p in xdoc.Descendants("read")
- orderby p.Attribute("day").Value.ToInt()
- select new
- {
- Date = dt.AddDays(p.Attribute("day").Value.ToInt()).ToShortDateString(),
- Verse = p.Attribute("verses").Value
- };
- GridView1.DataSource = q;
- GridView1.DataBind();
- }
- }
- }