protected List <MovieSession> queryMovieSessionList = new List <MovieSession>();//用来存放查询的结果


        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet dataSet = new DataSet();

            dataSet = (DataSet)Session["dataSet"];
            for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
            {
                MovieSession movieSession = new MovieSession();
                movieSession.setMovieNo(dataSet.Tables[0].Rows[i][0].ToString().Trim());
                movieSession.setMovieName(dataSet.Tables[0].Rows[i][1].ToString().Trim());
                movieSession.setHallName(dataSet.Tables[0].Rows[i][2].ToString().Trim());
                movieSession.setPlayingDate(dataSet.Tables[0].Rows[i][3].ToString().Trim());
                movieSession.setTime(dataSet.Tables[0].Rows[i][4].ToString().Trim());

                queryMovieSessionList.Add(movieSession);
            }

            //点击删除按钮时
            string deleteHallName    = Request.QueryString["deleteHallName"];
            string deletePlayingDate = Request.QueryString["deletePlayingDate"];
            string deleteTime        = Request.QueryString["deleteTime"];

            Session["deleteHallName"]    = deleteHallName;
            Session["deletePlayingDate"] = deletePlayingDate;
            Session["deleteTime"]        = deleteTime;

            if (deleteHallName != null)
            {
                string strMsg = "确定要删除吗?";
                Session["request"] = "backStage_queryMovieSession";
                Response.Write("<Script Language='JavaScript'>if ( window.confirm('" + strMsg + "')) {alert('删除成功!');window.location.href ='executeDeleteSql.aspx'} else {history.back();};</script>");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string sqlyuju1 = "Select MovieSchedual.MovieNo,MovieName,HallName,PlayingDate,Time from Movies,MovieSchedual,Schedual,VedioHalls" + " where Movies.MovieNo = MovieSchedual.MovieNo and MovieSchedual.SessionNo = Schedual.SessionNo and MovieSchedual.HallNo = VedioHalls.HallNo order by MovieNo asc,PlayingDate asc,Time asc";
            string sqlyuju2 = "Select count(*) from MovieSchedual";

            sqlconnection.openDatabase();
            SqlCommand     cmd1    = sqlconnection.executeSQL(sqlyuju1);
            SqlDataAdapter sda     = new SqlDataAdapter(cmd1);
            DataSet        dataSet = new DataSet();

            sda.Fill(dataSet);

            for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
            {
                MovieSession movieSession = new MovieSession();
                movieSession.setMovieNo(dataSet.Tables[0].Rows[i][0].ToString().Trim());
                movieSession.setMovieName(dataSet.Tables[0].Rows[i][1].ToString().Trim());
                movieSession.setHallName(dataSet.Tables[0].Rows[i][2].ToString().Trim());
                movieSession.setPlayingDate(dataSet.Tables[0].Rows[i][3].ToString().Trim());
                movieSession.setTime(dataSet.Tables[0].Rows[i][4].ToString().Trim());

                movieSessionList.Add(movieSession);
            }

            SqlCommand    cmd2 = sqlconnection.executeSQL(sqlyuju2);
            SqlDataReader sdr  = cmd2.ExecuteReader();//创建数据读取器对象

            sdr.Read();
            sdr.Close();
            int    playCount = (int)cmd2.ExecuteScalar();//传回放映信息记录数
            double n         = playCount / 12.0;

            yeshu = (int)Math.Ceiling(n);
            sqlconnection.closeDatabase();

            string ye = Request.QueryString["ye"];

            if (ye != null && ye != "0")
            {
                int yeshuTime = int.Parse(ye);
                if (yeshuTime <= yeshu)
                {
                    if (yeshuTime > (int)Session["yeshuTime"])
                    {
                        Session["yeshuTime"] = yeshuTime;
                    }
                    if (yeshuTime <= (int)Session["yeshuTime"])
                    {
                        Session["yeshuTime"] = yeshuTime;
                    }
                }
            }


            //点击删除按钮时
            string deleteHallName    = Request.QueryString["deleteHallName"];
            string deletePlayingDate = Request.QueryString["deletePlayingDate"];
            string deleteTime        = Request.QueryString["deleteTime"];

            Session["deleteHallName"]    = deleteHallName;
            Session["deletePlayingDate"] = deletePlayingDate;
            Session["deleteTime"]        = deleteTime;

            if (deleteHallName != null)
            {
                string strMsg = "确定要删除吗?";
                Session["request"] = "backStage_playManagement";
                Response.Write("<Script Language='JavaScript'>if ( window.confirm('" + strMsg + "')) {alert('删除成功!');window.location.href ='executeDeleteSql.aspx'} else {history.back();};</script>");
            }
        }