Beispiel #1
0
    protected void Rating_Click(object sender, EventArgs e)
    {
        if (!String.IsNullOrEmpty(ratingText.Text))
        {
            vwarDAL.IDataRepository vd = (new vwarDAL.DataAccessFactory()).CreateDataRepositorProxy();;

            var ratingValue = rating.CurrentRating;
            vd.InsertReview(ratingValue, ratingText.Text.Length > 255 ? ratingText.Text.Substring(0, 255)
                : ratingText.Text, Context.User.Identity.Name, ContentObjectID);
            ViewState[RATINGKEY] = null;
            Response.Redirect(Request.RawUrl);

            ContentObject co = vd.GetContentObjectById(ContentObjectID, false);

            if (LR_3DR_Bridge.LR_Integration_Enabled())
            {
                LR_3DR_Bridge.ModelRated(co);
            }
            vd.Dispose();
            vd = null;
        }
    }