コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     movieList = movie.getAllMovies();
     TodaysMovieRepeater.DataSource = movieList;
     TodaysMovieRepeater.DataBind();
     if (Request.QueryString["code"] != null)
     {
         if (Session["USER"] == null)
         {
             var          obj          = GetFacebookUserData(Request.QueryString["code"]);
             UserBusiness userBusiness = new UserBusiness();
             if (userBusiness.loginUser(obj.ElementAt(0).email) == null)
             {
                 userBusiness.Createuser(obj.ElementAt(0).email, obj.ElementAt(0).birthday, obj.ElementAt(0).phone, obj.ElementAt(0).first_name);
                 Session["USER"] = userBusiness.loginUser(obj.ElementAt(0).email);
             }
             else
             {
                 Session["USER"] = userBusiness.loginUser(obj.ElementAt(0).email);
             }
         }
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     movieList = movie.getAllMovies();
     TodaysMovieRepeater.DataSource = movieList;
     TodaysMovieRepeater.DataBind();
 }