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


C# Data.getTags方法代码示例

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


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

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        string tags = "";
        Data d = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
        DataSet ds = new DataSet();
        TopLiteral.Text = "<div style=\" width: 215px;\">";
        switch (tag_type)
        {
            case tagType.AD:
                ds = d.GetData("SELECT DISTINCT C.ID, ACM.ID AS AID, C.Name AS CategoryName, ACM.tagSize FROM Ad_Category_Mapping ACM, AdCategories C WHERE ACM.CategoryID=C.ID AND ACM.AdID=" + theID +" ORDER BY ACM.ID");
                d.TAG_TYPE = Data.tagType.AD;
                break;
            case tagType.EVENT:
                ds = d.GetData("SELECT DISTINCT C.ID, ECM.ID AS EID, C.Name AS CategoryName, ECM.tagSize FROM Event_Category_Mapping ECM, EventCategories C WHERE ECM.CategoryID=C.ID AND ECM.EventID=" + theID + " ORDER BY ECM.ID ");
                d.TAG_TYPE = Data.tagType.EVENT;
                break;
            case tagType.VENUE:
                ds = d.GetData("SELECT DISTINCT C.ID, C.Name AS CategoryName, VC.tagSize FROM Venue_Category VC, VenueCategories C WHERE VC.CATEGORY_ID=C.ID AND VC.VENUE_ID=" + theID);
                d.TAG_TYPE = Data.tagType.VENUE;
                break;
            case tagType.TRIP:
                ds = d.GetData("SELECT DISTINCT C.ID, C.Name AS CategoryName, VC.TagSize FROM Trip_Category VC, TripCategories C WHERE VC.CategoryID=C.ID AND VC.TripID=" + theID);
                d.TAG_TYPE = Data.tagType.TRIP;
                break;
            default: break;
        }

        if (ds.Tables.Count > 0)
            if (ds.Tables[0].Rows.Count > 0)
            {
                TagsLiteral.Text = d.getTags(ds, true, false);
            }
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:34,代码来源:TagCloud.ascx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
        if (searchNumber != "")
        {
            string markerNumber = dat.GetImageNum(searchNumber);  //(int.Parse(dat.GetImageNum(searchNumber)) + numofallresults).ToString();
            ImageLiteral.Text = imageLiteral + "<div style=\"float: left;\"><img style=\"cursor: pointer;\" onclick=\"myclick(" + markerNumber + ");\" src=" +
                "\"http://www.google.com/mapfiles/marker" + searchNumber + ".png\" /></div>";
            //SearchLiteral.Text += "<script type=\"text/javascript\">var letter = String.fromCharCode(\"A\".charCodeAt(0) + " +
            //    searchNumber + "); var letteredIcon = new GIcon(baseIcon); document.getElementById('image" + searchNumber +
            //    "').src = \"http://www.google.com/mapfiles/marker\" + letter + \".png\";</script>";
            BeginingLiteral.Text = "<div style=\";background-color:" + color + "; min-height: 33px; width: " + width.ToString() +
                "px; padding: 3px; margin-bottom: 3px;\">";
        }
        else
        {
            BeginingLiteral.Text = "<div style=\"background-color:" + color + "; width: " + width.ToString() +
                "px; padding: 3px; margin-bottom: 3px;\">";
        }

        SearchLabel.Text = searchLabel;

        //search = true is disabled here

        if (windowT)
        {
            SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" + dat.MakeNiceName(searchLabel) + "_" + venueID + "_Venue" + "');");
        }
        else
        {
            SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + venueID + "_Venue";
        }

        string begining = "<div style=\"color: #b1a812; font-family: Arial; font-size: 11px;\">";
        string end = "</div>";
        TagsLiteral.Text = begining + city + ", " + state + end;

        dat.TAG_TYPE = Data.tagType.VENUE;

        string tags = dat.getTags(dat.GetData("SELECT DISTINCT C.ID, C.Name AS CategoryName, VC.tagSize FROM Venue_Category VC, VenueCategories C WHERE VC.CATEGORY_ID=C.ID AND VC.VENUE_ID=" + venueID), false, windowT);
        TagsLiteral.Text += "<span style=\"color: #b1a812; line-height: 10px; font-size: 11px;\" >" + tags + "</span>";
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:43,代码来源:VenueSearchElement.ascx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));

        if (IsPostBack)
        {
            MessageRadWindowManager.VisibleOnPageLoad = false;
        }

        //take care of mapping to the search map

        if (searchNumber != "")
        {
            string markerNumber = dat.GetImageNum(searchNumber); // (int.Parse(dat.GetImageNum(searchNumber)) + numofallresults).ToString();
            ImageLiteral.Text = imageLiteral + "<div style=\"float: left;\"><img style=\"cursor: pointer;\" onclick=\"selectFirstTab();myclick(" + markerNumber + ");\" id='image" + searchNumber + "' src=" +
                "\"http://www.google.com/mapfiles/marker" + searchNumber + ".png\" /></div>";
            //SearchLiteral.Text += "<script type=\"text/javascript\">var letter = String.fromCharCode(\"A\".charCodeAt(0) + " +
            //    searchNumber + "); var letteredIcon = new GIcon(baseIcon); document.getElementById('image" + searchNumber +
            //    "').src = \"http://www.google.com/mapfiles/marker\" + letter + \".png\";</script>";
            BeginingLiteral.Text = "<div style=\"margin-bottom: 3px;background-color:" +
                color + "; width: " + width.ToString() + "px; min-height: 33px; padding: 3px;\">";
        }
        else
        {
            BeginingLiteral.Text = "<div style=\"margin-bottom: 3px;background-color:" + color + "; width: " + width.ToString() + "px;padding: 3px;\">";
        }

        if (calendarLetter != "")
        {
            ImageLiteral.Text += "<div onclick=\"selectCalendarDate('"+firstDate+"', '"+toolTipID+"');\" align=\"center\" style=\"cursor: pointer;margin-right: 3px;margin-left: 5px; margin-top: 6px;font-weight: bold;width: 20px; height: 14px;color: #1b1b1b;font-size: " +
                "10px; padding-top: 6px;float: left; background-image: url(images/CalendarIcon.png);" +
                "\">" + calendarLetter + "</div>";
        }

        if (isGroup)
        {
            ImageLiteral.Text += "<div style=\"float: left; height: 30px; margin-top: -4px\"><img height=\"40px\" title=\"Group Event\" " +
                "name=\"Group Event\" src=\"images/GroupsIcon2.png\" /></div>";
        }

        //search = true is disabled here
        SearchLabel.Text = searchLabel;
        if (venueLabel.Trim() != "")
            VenueLabel.Text = venueLabel;
        else
        {
            VenueRealLabel.Text = address;
            VenueRealLabel.Style.Add("color", "#cccccc");
            VenueRealLabel.Style.Add("font-weight", "normal");
            VenueRealLabel.Style.Add("pointer", "default");
            VenueRealLabel.Style.Add("font-family", "Arial");
            VenueRealLabel.Style.Add("font-size", "12px");
        }

        if (windowT)
        {
            if (isGroup)
                SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" +
                    dat.MakeNiceName(searchLabel) + "_" + reoccurrID + "_" + eventID + "_GroupEvent" + "');");
            else
                SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" +
                    dat.MakeNiceName(searchLabel) + "_" + eventID + "_Event" + "');");

            if (venueLabel.Trim() != "")
                VenueLabel.Attributes.Add("onclick", "CloseWindow('" + "../" +
                    dat.MakeNiceName(venueLabel) + "_" + venueID + "_Venue" + "');");
        }
        else
        {
            if (isGroup)
                SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" +
                    reoccurrID + "_" + eventID + "_GroupEvent";
            else
                SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + eventID + "_Event";

            if (venueLabel.Trim() != "")
                VenueLabel.NavigateUrl = "../" + dat.MakeNiceName(venueLabel) +
                    "_" + venueID + "_Venue";
        }
        //if(numLabel != "")
        //    NumLabel.Text = numLabel;
        DateLabel.Text = datelabel;
        string begining = "<a style=\"color: #b1a812; font-family: Arial; font-size: 11px;\">";
        string end = "</a>";

        string tags = "";
        if (isGroup)
        {
            dat.TAG_TYPE = Data.tagType.GROUP_EVENT;
            DataSet ds1 = dat.GetData("SELECT DISTINCT C.ID, C.GroupName AS CategoryName, '22px' AS tagSize  FROM GroupEvent_Category VC, GroupCategories C WHERE C.ID=VC.CATEGORY_ID AND VC.GROUPEVENT_ID=" + eventID);
            tags = dat.getTags(ds1, false, windowT);
        }
        else
        {
            dat.TAG_TYPE = Data.tagType.EVENT;
            tags = dat.getTags(dat.GetData("SELECT C.ID, C.Name AS CategoryName, ECM.tagSize FROM Event_Category_Mapping ECM, EventCategories C WHERE ECM.CategoryID=C.ID AND ECM.EventID=" + eventID), false, windowT);
            DataSet ds = dat.GetData("SELECT ShortDescription FROM Events WHERE ID=" + eventID);
            //ShortDescriptionLabel.Text = dat.BreakUpString(ds.Tables[0].Rows[0]["ShortDescription"].ToString(), 300);
        }
//.........这里部分代码省略.........
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:101,代码来源:SearchElement.ascx.cs

示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        BeginingLiteral.Text = "<div style=\"background-color:" + color + "; width: " + width.ToString() +
            "px; height: 78px; padding: 3px; margin-bottom: 3px;\">";
        SearchLabel.Text = searchLabel;

        //search = true is disabled here
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));

        if (windowT)
        {
            SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" + dat.MakeNiceName(searchLabel) +
                "_" + venueID + "_Group" + "');");
        }
        else
        {
            SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + venueID + "_Group";
        }

        string begining = "<div style=\"color: #b1a812; font-family: Arial; font-size: 11px;\">";
        string end = "</div>";
        TagsLiteral.Text = begining + city + ", " + state + end;

        dat.TAG_TYPE = Data.tagType.GROUP;

        DataSet ds = dat.GetData("SELECT DISTINCT C.ID, C.GroupName AS CategoryName, '22px' AS tagSize  FROM Group_Category VC, GroupCategories C WHERE C.ID=VC.CATEGORY_ID AND VC.GROUP_ID=" + venueID);
        string tags = dat.getTags(ds, false, windowT);
        TagsLiteral.Text += "<span style=\"color: #b1a812; line-height: 10px; font-size: 11px;\" >" + tags + "</span>";
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:30,代码来源:GroupSearchElement.ascx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
        BeginingLiteral.Text = "<div style=\"background-color:" +
            color + "; width: " + width.ToString() + "px; padding: 3px; margin-bottom: 3px;\">";
        SearchLabel.Text = searchLabel;
        //search = true is disabled here

        if (windowT)
        {
            SearchLabel.Attributes.Add("onclick", "CloseWindow('" + "../" + dat.MakeNiceName(searchLabel) + "_" + adID + "_Ad" + "');");
        }
        else
        {
            SearchLabel.NavigateUrl = "../" + dat.MakeNiceName(searchLabel) + "_" + adID + "_Ad";
        }

        string begining = "<a style=\"color: #b1a812; font-family: Arial; font-size: 11px;\">";
        string end = "</a>";

        dat.TAG_TYPE = Data.tagType.AD;
        string tags = dat.getTags(dat.GetData("SELECT C.ID, C.Name AS CategoryName, ACM.tagSize FROM Ad_Category_Mapping ACM, AdCategories C WHERE ACM.CategoryID=C.ID AND ACM.AdID=" + adID), false, windowT);

        TagsLiteral.Text = "<span style=\"color: #b1a812; line-height: 10px; font-size: 11px;\" >" + tags + "</span>";
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:26,代码来源:AdSearchElement.ascx.cs


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