protected void uiLinkButtonSave_Click(object sender, EventArgs e) { if (Session["CurrentUser"] != null) { UserInfo user = (UserInfo)Session["CurrentUser"]; UserReviews rev = new UserReviews(); rev.AddNew(); rev.UserID = user.UserID; rev.CardID = CardID; rev.RevTitle = uiTextBoxTitle.Text; rev.RevDescription = uiTextBoxReview.Text; rev.Save(); BindReviews(); uiLabelError.Visible = false; } else { uiLabelError.Visible = true; } }
private void BindReviews() { UserReviews rev = new UserReviews(); rev.GetUserReviewsByCardID(CardID); uiRepeaterReviews.DataSource = rev.DefaultView; uiRepeaterReviews.DataBind(); }