Пример #1
0
 protected void OnItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         string    CinemaId = (e.Item.FindControl("CinemaId") as HiddenField).Value;
         Repeater  Display  = e.Item.FindControl("Display") as Repeater;
         myDAL     objmyDAl = new myDAL();
         DataTable DT       = new DataTable();
         int       found;
         found = objmyDAl.SelectMovies_DAL(CinemaId, ref DT);
         if (found == 1)
         {
             Display.DataSource = DT;
             Display.DataBind();
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user"] != null)
            {
                HtmlLink link = Page.Master.FindControl("layoutStyleSheet") as HtmlLink;
                link.Href = "css/secondary.css";
            }
            myDAL     objmyDAl = new myDAL();
            DataTable DT       = new DataTable();
            int       found;

            found = objmyDAl.SelectMovies_DAL(ref DT);
            if (found == 1)
            {
                Display.DataSource = DT;
                Display.DataBind();
            }
        }