using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
using CG67.FicheCollege.Service;
namespace CG67.FicheCollege
{
    public partial class FicheCollege : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                XmlDocument entete = new XmlDocument();
                entete.Load(Server.MapPath(@"~/xml/entete.xml"));
                
                XmlNode xmlFicheCollege = ServiceFiche.GetFicheCollege(Session["RNE"].ToString(), int.Parse(Session["annee"].ToString()));
                this.Title = xmlFicheCollege.SelectSingleNode("college/Etablissement/NomCollegePourPresentation").InnerText; 
                xmlFicheCollege.SelectSingleNode("college").InnerXml   += entete.DocumentElement.OuterXml;
                
                this.Xml1.DocumentContent = xmlFicheCollege.OuterXml ;
                
                this.DataBind();
            }
        }
    }
}
