bvcms /Disciples/Disciples/Verse/Chron.aspx.cs

Language C# Lines 31
MD5 Hash 4364543d94f9d16792f3f64503614f14 Estimated Cost $656 (why?)
Repository https://bitbucket.org/rbhakser/bvcms View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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();
        }
    }
}
Back to Top