Exemplo n.º 1
0
 void DisplayReviews()
 {
     Sports_Junky_Classes.clsReviewsCollection Reviews = new Sports_Junky_Classes.clsReviewsCollection();
     lstReviewsList.DataSource     = Reviews.ReviewsList;
     lstReviewsList.DataValueField = "ReviewsId";
     lstReviewsList.DataTextField  = "ReviewerName";
     lstReviewsList.DataBind();
 }
Exemplo n.º 2
0
    void Update()
    {
        Sports_Junky_Classes.clsReviewsCollection Reviews = new Sports_Junky_Classes.clsReviewsCollection();
        String Error = Reviews.ThisReviews.Valid(rvwTextOK.Text, rvwNameOK.Text, rvwdProdOK.Text, dateAddOK.Text);

        if (Error == "")
        {
            Reviews.ThisReviews.Find(ReviewsId);

            Reviews.ThisReviews.ReviewText      = rvwTextOK.Text;
            Reviews.ThisReviews.ReviewerName    = rvwNameOK.Text;
            Reviews.ThisReviews.ReviewedProduct = rvwdProdOK.Text;
            Reviews.ThisReviews.DateAdded       = Convert.ToDateTime(dateAddOK.Text);
            Reviews.ThisReviews.ReviewApproved  = Convert.ToBoolean(rvwAppOK.Text);

            Reviews.Update();
            Response.Redirect("Default.aspx");
        }
        else
        {
            lblError.Text = "There were problems with the data entered " + Error;
        }
    }