当前位置: 首页>>代码示例>>C#>>正文


C# Data.GetRecommendationIcons方法代码示例

本文整理汇总了C#中Data.GetRecommendationIcons方法的典型用法代码示例。如果您正苦于以下问题:C# Data.GetRecommendationIcons方法的具体用法?C# Data.GetRecommendationIcons怎么用?C# Data.GetRecommendationIcons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Data的用法示例。


在下文中一共展示了Data.GetRecommendationIcons方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string eventID = GetEventID();
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        if (cookie == null)
        {
            cookie = new HttpCookie("BrowserDate");
            cookie.Value = DateTime.Now.ToString();
            cookie.Expires = DateTime.Now.AddDays(22);
            Response.Cookies.Add(cookie);
        }
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
        try
        {
            Session["RedirectTo"] = Request.Url.AbsoluteUri;

            //Button button = (Button)dat.FindControlRecursive(this, "EventLink");
            //button.CssClass = "NavBarImageEventSelected";

            bool fillUserData = false;

            try
            {

                if (Session["User"] != null)
                {
                    if (Session["User"].ToString() == "1")
                        OnlyHippoPanel.Visible = true;
                    LoggedInPanel.Visible = true;
                    LoggedOutPanel.Visible = false;
                    dat.GetRecommendationIcons(eventID, ref RecomPanel);

                    RecomPanel.Width = 10 * (RecomPanel.Controls.Count);

                    DataSet ds1 = dat.GetData("SELECT UserName FROM Users WHERE User_ID=" + Session["User"].ToString());
                    Session["UserName"] = ds1.Tables[0].Rows[0]["UserName"].ToString();
                    fillUserData = true;

                    EditLink.Visible = true;
                    TopPanel.Visible = true;

                    //Query whether current owner was delinquent on approve/reject changes
                    if (dat.IsOwnerDelinquent(eventID, Request.IsLocal, "E"))
                    {
                        //make the button visable
                        TopPanel.Visible = true;
                        OwnerPanel.Visible = true;
                        Session["Message"] = "The ownership of this event is <b>open</b>. <br/>The ownership became " +
                            "open because the previous owner of this event became un-responsive to rejecting/" +
                            "approving user's changes to this event.<br/>If you would like to become " +
                            "the owner, click on the button below to go to the event's edit page. <br/><br/> " +
                            "Being the owner, you will have the privilage of having your <b>edits come though right " +
                            "away.</b> Other participants' changes to this event will have to be <b>approved by you.</b><br/><br/>" +
                            "<button style=\"cursor: pointer;font-size: 11px;font-weight: bold;margin-top: 20px; padding-bottom: 4px;height: 30px; width: 112px;background-color: transparent; " +
                            "color: White; background-image: url('image/PostButtonNoPost.png'); background-repeat: " +
                            "no-repeat; border: 0;\" onclick=\"Search('BlogEvent.aspx?edit=true&ID=" + eventID +
                            "');\" onmouseover=\"this.style.backgroundImage='url(image/PostButtonNoPostHover.png)'\" " +
                            "onmouseout=\"this.style.backgroundImage='url(image/PostButtonNoPost.png)'\">Edit</button>" +
                            "<button style=\"cursor: pointer;font-size: 11px;font-weight: bold;margin-top: 20px; padding-bottom: 4px;height: 30px; width: 112px;background-color: transparent; " +
                            "color: White; background-image: url('image/PostButtonNoPost.png'); background-repeat: " +
                            "no-repeat; border: 0;\" onclick=\"Search();\" " +
                            "onmouseover=\"this.style.backgroundImage='url(image/PostButtonNoPostHover.png)'\" " +
                            "onmouseout=\"this.style.backgroundImage='url(image/PostButtonNoPost.png)'\">Close</button>";
                    }
                }
                else
                {
                    LoggedOutPanel.Visible = true;
                    LoggedInPanel.Visible = false;
                    //Button calendarLink = (Button)dat.FindControlRecursive(this, "CalendarLink");
                    //calendarLink.Visible = false;
                    //EditLink.Visible = false;
                }
            }
            catch (Exception ex)
            {
                ErrorLabel.Text = ex.ToString();
            }

            if (ReturnPanel.Visible)
            {
                if (EditLink.Visible)
                {
                    if (OwnerPanel.Visible)
                    {
                        TopPanel.Width = 430;
                    }
                    else
                    {
                        TopPanel.Width = 240;
                    }
                }
                else
                {
                    if (OwnerPanel.Visible)
                    {
                        TopPanel.Width = 300;
                    }
                    else
                    {
//.........这里部分代码省略.........
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:101,代码来源:Event.aspx.cs


注:本文中的Data.GetRecommendationIcons方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。