コード例 #1
0
        private string GetRateableemotionPlugin(string rateabletagId, string websiteName, string premalink,
                                                long currentUserId)
        {
            try
            {
                _bllEmotionGroup = new BLLEmotionGroup();
                _lstEmotionGroup = new List <DTOEmotionGroup>();

                _lstEmotionGroup = _bllEmotionGroup.GetRateableemotionPlugin(rateabletagId, websiteName, premalink,
                                                                             currentUserId);

                var tags = "";
                if (_lstEmotionGroup != null)
                {
                    foreach (DTOEmotionGroup tag in _lstEmotionGroup)
                    {
                        tags += "|" + tag.EmotionName + "," + tag.Id + "," + tag.WebsiteId + "," +
                                tag.EmotionGroupId;
                    }
                }

                return(tags);
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
            }
            return(null);
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         IsWebSite();
         if (!IsPostBack)
         {
             _bllEmotion        = new BLLEmotionGroup();
             _bllWebsite        = new BllWebsite();
             grdtags.DataSource = _bllEmotion.GetRateableEmotion(_bllWebsite.GetUserWebsite(UserId)[0].WebsiteId);
             grdtags.DataBind();
         }
     }
     catch (Exception ex)
     {
         ex.ToExceptionless().Submit();
     }
 }
コード例 #3
0
        protected void btnadd_Click(object sender, EventArgs e)
        {
            try
            {
                long eid = 0;

                if (Request.QueryString["id"] != null)
                {
                    eid = Convert.ToInt64(Request.QueryString["id"]);
                }

                _bllEmotionGroup = new BLLEmotionGroup();
                _bllEmotionGroup.AddRateableEmotion(txtRateGrouName.Text, UserId, eid, hdntag.Value);
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
            }
        }
コード例 #4
0
        protected void btnGenerateScript_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] != null && Convert.ToInt64(Request.QueryString["id"]) != 0)
            {
                var groupid = Convert.ToInt64(Request.QueryString["id"]);
                _bllEmotionGroup = new BLLEmotionGroup();
                _dtoEmotionGroup = new DTOEmotionGroup();
                _dtoEmotionGroup = _bllEmotionGroup.GetGenerateScript(groupid, UserId);

                if (_dtoEmotionGroup != null)
                {
                    var script =
                        "<div id='taghead'></div><script type ='text/javascript' language='javascript'>" +
                        "var Websitename_shortname = '" + _dtoEmotionGroup.EmotionName + "';var RateabletagId = '" +
                        _dtoEmotionGroup.UniqueId + "'</script>" +
                        "<script src='http://www.glozzary.com/Script/NewJScript.js' type='text/javascript'></script>";
                    txtscript.InnerText = script;
                }
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IsWebSite();
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    _lstemotionGroup = new List <DTOEmotionGroup>();
                    _bllEmotionGroup = new BLLEmotionGroup();
                    _lstemotionGroup =
                        _bllEmotionGroup.GetRateableEmotionByEmotionGroupId(Convert.ToInt64(Request.QueryString["id"]));

                    if (_lstemotionGroup != null && _lstemotionGroup.Count > 0)
                    {
                        txtRateGrouName.Text = _lstemotionGroup[0].GroupName;

                        foreach (var tag in _lstemotionGroup)
                        {
                            hdntag.Value += "|" + tag.EmotionName + "," + tag.Id + ",0,1";
                        }
                    }
                }
            }
        }