Ejemplo n.º 1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        User user = userAct.GetByid(Request.QueryString["idd"]);

        LimitAct limitAct = new LimitAct();
        Limit limit = limitAct.GetByid(user.Limit.ToString());

        MovieAct movAct = new MovieAct();
        Movie todayMovie = movAct.GetTodayMovie();

        //是否需要积分观看
        if (limit.NeedIntegral == false)
        {
            StartVideo(todayMovie.URL);
            return;
        }
        else
        {
            if (limit.CanRepeater == false)
            {
                if (user.Jifen < 1)
                {
                    MessageBox("您的积分不够了,请及时充值!");
                    return;
                }
                RedureJifen(user);
                StartVideo(todayMovie.URL);
                return;
            }
            else
            {
                IList<string> Watcheduser = MyCache.WatchedUser;
                if (Watcheduser.Contains(user.QQ))
                {
                    StartVideo(todayMovie.URL);
                    return;
                }
                else
                {
                    if (user.Jifen < 1)
                    {
                        MessageBox("您的积分不够了,请及时充值!");
                        return;
                    }
                    RedureJifen(user);
                    StartVideo(todayMovie.URL);
                    Watcheduser.Add(user.QQ);
                    MyCache.WatchedUser = Watcheduser;

                    return;
                }
            }
        }
    }
Ejemplo n.º 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;
            }
        }
    }
Ejemplo n.º 3
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('确认观看教学视频?确认观看将扣除你一个积分!');");
                    }
                }
            }
        }
    }