protected void AddReview_Click(object sender, EventArgs e)
        {
            TextBox ReviewTitleTextBox = null;
            TextBox ReviewTextBox = null;
            RadioButtonList ReviewRateRadioButtonList = null;
            foreach (RepeaterItem item in ProductRepeater.Items)
            {
                ReviewTitleTextBox = (TextBox)item.FindControl("ReviewTitleTextBox");
                ReviewTextBox = (TextBox)item.FindControl("ReviewTextBox")
                    ;
                ReviewRateRadioButtonList = (RadioButtonList)item.FindControl("ReviewRateRadioButtonList");
            }

            CommentEntity comment = new CommentEntity();
            comment.ProductId = Convert.ToInt32(ViewState["ProductId"]);
            comment.Title = ReviewTitleTextBox.Text;
            comment.Content = ReviewTextBox.Text;
            comment.RateId = GetRateIdByRadioButtonListSelection(Convert.ToInt32(ReviewRateRadioButtonList.SelectedValue));
            comment.Status = false;
            comment.Save();

            LoadData();
        }
        /// <summary>Creates a new, empty CommentEntity object.</summary>
        /// <returns>A new, empty CommentEntity object.</returns>
        public override IEntity Create()
        {
            IEntity toReturn = new CommentEntity();

            // __LLBLGENPRO_USER_CODE_REGION_START CreateNewComment
            // __LLBLGENPRO_USER_CODE_REGION_END
            return toReturn;
        }
 public bool RemoveComment(int id)
 {
     CommentEntity comment = new CommentEntity(id);
     return comment.Delete();
 }
 public void ChangeStatusComment(bool status, int id)
 {
     CommentEntity comment = new CommentEntity(id);
     comment.Status = status;
     comment.Save();
 }