예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            MovieAct movAct = new MovieAct();
            rep1.DataSource = movAct.GetOldMovies().OrderByDescending(s => s.PlayDay);
            rep1.DataBind();
            if (Request.QueryString["idd"] == null)
            {
                //MessageBox("请先登录后观看视频");
                return;
            }
            User user = userAct.GetByid(Request.QueryString["idd"]);
            if (user == null || user.LoginPassWord != Request.QueryString["pw"])
            {
                //MessageBox("请先登录后观看视频");
                return;
            }

            Movie todayMovie = movAct.GetTodayMovie();
            Movie nextMoive = movAct.GetNextdayMovie();
            if (nextMoive != null)
            {
                Literal2.Text = nextMoive.Name;
                Literal4.Text = nextMoive.Name;
            }
            if (todayMovie == null)
            {
                MessageBox("今天没有可看的最新视频,请联系我们!");
                return;
            }
            ImageButton1.Visible = true;
            Literal1.Text = todayMovie.Name;
            Literal3.Text = todayMovie.Name;

            LimitAct limitAct = new LimitAct();
            Limit limit = limitAct.GetByid(user.Limit.ToString());
            if (limit.NeedIntegral)
            {
                if (limit.CanRepeater == false)
                {
                    ImageButton1.Attributes.Add("onclick", "return confirm('确认观看教学视频?确认观看将扣除你一个积分!');");
                }
                else
                {
                    IList<string> Watcheduser = MyCache.WatchedUser;
                    if (Watcheduser.Contains(user.QQ) == false)
                    {
                        ImageButton1.Attributes.Add("onclick", "return confirm('确认观看教学视频?确认观看将扣除你一个积分!');");
                    }
                }
            }
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            MovieAct movAct = new MovieAct();
            rep1.DataSource = movAct.GetOldMovies().OrderByDescending(s => s.PlayDay);
            rep1.DataBind();

            Movie todayMovie = movAct.GetTodayMovie();
            Movie nextMoive = movAct.GetNextdayMovie();
            if (nextMoive != null)
            {
                Literal2.Text = nextMoive.Name;
                Literal4.Text = nextMoive.Name;
            }
            if (todayMovie != null)
            {
                Literal1.Text = todayMovie.Name;
                Literal3.Text = todayMovie.Name;
            }
        }
    }