protected void OnRatingClick(object sender, EventArgs e) { string[] ratingInfo = ((LinkButton)sender).CommandArgument.Split(new char[] { '_' }); if (ratingInfo.Length == 2) { int rating = int.Parse(ratingInfo[1]); DataObject.AddRating(Udc, ratingInfo[0].ToNullableGuid(), dataObject.ObjectType, rating); _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent(string.Format("{0}_RATE", Helper.GetObjectType(dataObject.ObjectType).Id.ToUpper()), Udc, ratingInfo[0]); } DrawRating(); List <string> pageNames = new List <string>(); pageNames.Add("RatingUpload"); List <Dialog> dialogs = DialogEngine.GetDialogByPageName(pageNames, UserProfile.Current.UserId); if (dialogs.Count > 0) { StringBuilder sb = new StringBuilder(); foreach (Dialog dialog in dialogs) { sb.AppendFormat("<div><b>{0}</b><br/>{1}</div>", dialog.Title, dialog.Content); sb.AppendFormat("<div style=\"margin-top:10px;margin-bottom:10px;height:1px;background-color:#CCCCCC;\"></div>"); } string content = Regex.Replace(sb.ToString(), "<(.*?)>", "<$1>"); // Ugly, but safari needs it ScriptManager.RegisterStartupScript((Control)this.objVp, this.objVp.GetType(), "DialogWin", "SetPopupWindow('" + this.ClientID + string.Format("', 700, 0, 200, '{0}', '", language.GetString("TitleRating").StripForScript()) + content + "', true);", true); } }
public void OnRatingClick(object sender, EventArgs e) { DataObject.AddRating(UserDataContext.GetUserDataContext(), DataObject.ObjectID, DataObject.ObjectType, (int)Math.Round(Rr.Value)); Extensions.Business.IncentivePointsManager.AddIncentivePointEvent(string.Format("{0}_RATE", Helper.GetObjectType(DataObject.ObjectType).Id.ToUpper()), UserDataContext.GetUserDataContext(), DataObject.ObjectID.ToString()); DrawRating(); }