//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); }
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"); } }
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"); } }