Esempio n. 1
0
 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;
     }
 }
Esempio n. 2
0
 private void BindReviews()
 {
     UserReviews rev = new UserReviews();
     rev.GetUserReviewsByCardID(CardID);
     uiRepeaterReviews.DataSource = rev.DefaultView;
     uiRepeaterReviews.DataBind();
 }