public void CheckSpam(Review review)
        {
            var rvw = _ctx.Reviews.FirstOrDefault(r => r.Id == review.Id);
            if (rvw != null)
                rvw.Status = Status.Spam;

            _ctx.SaveChanges();
        }
        public void ApplyReview(Review review)
        {
            var rvw = _ctx.Reviews.FirstOrDefault(r => r.Id == review.Id);
            if (rvw != null)
                rvw.Status = Status.Applied;

            _ctx.SaveChanges();
        }
        public bool Save(ReviewModel model)
        {
            var reviewManager = new ReviewManager();

            var review = new Review();
            review.Restaurant = new RestaurantManager().Get(model.RestaurantId);
            review.ReviewTime = DateTime.Now;
            review.Comment = model.Comment;
            review.Author = GetUserInfo();
            review.Food = model.Food;
            review.Ambience = model.Ambience;
            review.Service = model.Service;

            reviewManager.Add(review);

            return true;
        }
 public void AddReview(Review review)
 {
     _ctx.Reviews.Add(review);
     _ctx.SaveChanges();
 }
        private List<DataModel.Model.Review> GetIdxReviews()
        {
            var lstReview = new List<DataModel.Model.Review>();

            foreach (GridViewRow row in grvReview.Rows)
            {
                var chbx = (CheckBox)row.FindControl("chbxSelect");
                if (chbx.Checked)
                {
                    var dataKey = grvReview.DataKeys[row.DataItemIndex];
                    if (dataKey != null)
                    {
                        var review = new DataModel.Model.Review();
                        review.Id = (int)dataKey.Values["Id"];
                        lstReview.Add(review);
                    }
                }
            }
            return lstReview;
        }