protected void btnDelete_Click(object sender, EventArgs e) { int showId = Convert.ToInt32(Request.QueryString["ShowId"]); List <Models.Review> reviews = ReviewController.GetShowReviewByShowId(showId); if (reviews.Count > 0) { lblError.Text = "Show has been reviewed, can't delete show"; } else { if (ShowController.DeleteShow(showId)) { Response.Redirect("../Home/HomePage.aspx"); } } }
private void FillGrid(int showId) { gvReview.DataSource = ReviewController.GetShowReviewByShowId(showId); gvReview.DataBind(); }