Beispiel #1
0
        /// <summary>
        /// 内容页
        /// </summary>
        /// <param name="Name"></param>
        /// <param name="Class"></param>
        protected void Content(string Name, string Class)
        {
            DataEntities ent = new DataEntities();
            MovieInfo    mv  = //MovieInfoView.Find(string.Format("StandardTitle=N'{0}' and ClassName=N'{1}'", Name, Class));
                               (from l in ent.MovieInfo where l.StandardTitle == Name && l.ClassName == Class select l).FirstOrDefault();

            ent.Dispose();
            Response.Clear();
            Response.Write(CreateContentPage(mv, mv.GetClass()));
        }
Beispiel #2
0
        /// <summary>
        /// 生成电影页面
        /// </summary>
        /// <param name="id"></param>
        protected void CreateMoviePage(int id)
        {
            DataEntities ent = new DataEntities();

            MovieInfo m = (from l in ent.MovieInfo where l.id == id select l).FirstOrDefault();

            if (m.id > 0)
            {
                Class c = m.GetClass();
                Voodoo.Basement.CreatePage.CreateContentPage(m, c);

                var Dramas  = from l in ent.MovieDrama where l.MovieID == id select l;
                var Baidus  = from l in ent.MovieUrlBaidu where l.MovieID == id select l;
                var Kuaibos = from l in ent.MovieUrlKuaib where l.MovieID == id select l;

                foreach (var d in Dramas)
                {
                    Voodoo.Basement.CreatePage.CreateDramapage(d, c);
                }
                foreach (var d in Baidus)
                {
                    Voodoo.Basement.CreatePage.CreateDramapage(d, c);
                }
                foreach (var d in Kuaibos)
                {
                    Voodoo.Basement.CreatePage.CreateDramapage(d, c);
                }

                Response.Write("电影" + m.Title + "完成");
            }
            else
            {
                Response.Write("不存在");
            }
            ent.Dispose();
        }