示例#1
0
        void GetReview()
        {
            ReviewList rvl = new ReviewList();

            rvl.GetByBookID(new Guid(Request.QueryString["BookID"]));
            rptReviews.DataSource = rvl.List;
            rptReviews.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            user = (User)Session["User"];
            ReviewList rl = new ReviewList();
            rl = rl.GetByUserID(user.ID);

            lblRegistered.Text = user.DateCreated.ToString();
            TimeSpan DateDiff = (d1 - user.DateCreated);
            double PostPerDay = user.UserBooks.Count / DateDiff.TotalDays;
            lblPostsMade.Text = rl.Count + " (" + Math.Round(PostPerDay, 2) + " per day)";
            lblBooksPosted.Text = user.UserBooks.Count.ToString();
        }