예제 #1
0
파일: ChatHub.cs 프로젝트: m3hrad/CityCrowd
 //reviewCancel(int userId, Int64 reviewRequestId)
 //public int reviewAdd(int userId, Int64 reviewRequestId, string comment, int rate(5))
 public bool reviewSend(bool reviewed, int userId, Int64 reviewRequestId, string comment, int rate)
 {
     Classes.Reviews reviews = new Classes.Reviews();
     if (reviewed)
     {
         reviews.reviewAdd(userId, reviewRequestId, comment, rate);
     }
     else
     {
         reviews.reviewCancel(userId, reviewRequestId);
     }
     return(true);
 }
예제 #2
0
        protected void ButtonSubmit_Click(object sender, EventArgs e)
        {
            Classes.Reviews r      = new Classes.Reviews();
            int             status = r.reviewAdd(Convert.ToInt32(Session["UserId"]), Convert.ToInt32(HiddenFieldReviewRequestId.Value), TextBoxComment.Text, Convert.ToInt16(HiddenFieldRate.Value));

            if (status == -1)
            {
                //not found
                Response.Redirect("~/Error/NotFound");
            }
            else
            {
                Response.Redirect("~/Review");
            }
        }
예제 #3
0
        protected void ButtonSubmit_Click(object sender, EventArgs e)
        {
            Classes.Reviews r = new Classes.Reviews();
            int status = r.reviewAdd(Convert.ToInt32(Session["UserId"]), Convert.ToInt32(Page.RouteData.Values["ReviewRequestId"]), TextBoxComment.Text, Convert.ToInt16(HiddenFieldRate.Value));

            if (status == -1)
            {
                //not found
                Response.Redirect("~/Error/NotFound");
            }
            else
            {
                Response.Redirect("~/Explore");
            }
        }