Exemplo n.º 1
0
        public static Boolean SubmitReview(string Review, string RecipeId)
        {
            Boolean response = false;

            try
            {
                if (HttpContext.Current.Session["UserId"] != null)
                {
                    if (!String.IsNullOrEmpty(RecipeId) && !String.IsNullOrEmpty(Review))
                    {
                        response = ReviewsBL.SubmitReview(RecipeId, Review, HttpContext.Current.Session["UserId"].ToString());
                    }
                }
                else
                {
                    HttpContext.Current.Response.Redirect("/SignIn.aspx");
                }
            }
            catch (Exception ex)
            {
                ex.SendMail();
                response = false;
            }
            return(response);
        }
Exemplo n.º 2
0
 protected void GetRecipeReviews()
 {
     try
     {
         dsRecipeReviews = ReviewsBL.GetReviews(recipeId);
         if (dsRecipeReviews.Tables[0].Rows.Count > 0)
         {
             rptUserReviews.DataSource = dsRecipeReviews;
             rptUserReviews.DataBind();
         }
     }
     catch (Exception ex)
     {
         ex.SendMail();
     }
 }