using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AUDIOTEKA
{
    public partial class ArtistDetail : System.Web.UI.Page
    {
        Artist _Artist = null;
        DataClassesDataContext _db = new DataClassesDataContext();

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                _Artist = (from a in _db.Artists
                           where a.ArtistId.ToString() == Request["artid"]
                           select a).First();
            }
            catch (Exception)
            {
            }

            if (_Artist != null)
            {
                header.InnerText = "Detail autora " + _Artist.FirstName + " " + _Artist.LastName;

                AutorNameLabel.Text = _Artist.FirstName + " " + _Artist.LastName;
                AutorInfoLabel.Text = _Artist.Info;
                AutorHomePageLabel.Text = _Artist.HomePage;
            }
            else
            {
                header.InnerText = "Detail autora neexistuje";
            }
        }
    }
}
