コード例 #1
0
        protected void ContentRating1_Rated(object sender, Spaanjaars.Toolkit.RateEventArgs e)
        {
            int[] tempValues;
            tempValues = Values;
            Common     objCommon     = new Common();
            SecurePage objSecurePage = new SecurePage();
            string     errMsg        = "";


            tempValues[Convert.ToInt32(e.RateValue) - 1] += 1;
            if (objSecurePage.IsLoggedInUSer == true)
            {
                int result = objCommon.InsertUserRating(objSecurePage.LoggedInUserId, RatingType, RatingId, tempValues[0], tempValues[1], tempValues[2], tempValues[3], tempValues[4], out errMsg);//Session["ExamId"]
                Values = tempValues;

                ContentRating1.DataSource = Values;
                ContentRating1.DataBind();
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>MessageRating('" + errMsg + "');</script>", false);
            }
            else
            {
                string url = HttpContext.Current.Request.RawUrl;
                url = url.Substring(1, url.Length - 1);
                Response.Redirect(IryTech.AdmissionJankari.Components.Utils.AbsoluteWebRoot + "account/login?ReturnUrl=" + url);
            }
        }
コード例 #2
0
 protected void ContentRating1_Rating(object sender, Spaanjaars.Toolkit.RateEventArgs e)
 {
     if (e.HasRated)
     {
         e.Cancel = true;
     }
 }