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


C# WebControls.RepeaterItemEventArgs类代码示例

本文整理汇总了C#中System.Web.UI.WebControls.RepeaterItemEventArgs的典型用法代码示例。如果您正苦于以下问题:C# RepeaterItemEventArgs类的具体用法?C# RepeaterItemEventArgs怎么用?C# RepeaterItemEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RepeaterItemEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了RepeaterItemEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: rptDisciplineLevels_ItemDataBound

        protected void rptDisciplineLevels_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                HyperLink lnkTitle = (HyperLink)e.Item.FindControl("lnkTitle");
                Label lblDescription = (Label)e.Item.FindControl("lblDescription");
                PlaceHolder plcDescription = (PlaceHolder)e.Item.FindControl("plcDescription");
                HyperLink lnkViewMore = (HyperLink)e.Item.FindControl("lnkViewMore");
                string pageLinkPath = "DisciplineLevel.aspx?DisciplineLevelID=";

                BECompetencies.tbl_DisciplineLevelsRow row = (BECompetencies.tbl_DisciplineLevelsRow)((DataRowView)e.Item.DataItem).Row;

                lnkTitle.Text = row.IsDisciplineLevelTitleFRNull() ? "" : row.DisciplineLevelTitleFR;
                lnkTitle.NavigateUrl = pageLinkPath + row.DisciplineLevelID;
                lnkViewMore.NavigateUrl = pageLinkPath + row.DisciplineLevelID;

                if (!row.IsDisciplineLevelDescriptionFRNull())
                {
                    string description = RemoveTags(row.DisciplineLevelDescriptionFR);
                    if (description.Length > 350)
                        lblDescription.Text = description.Substring(0, 350) + "...";
                    else
                        lblDescription.Text = description;

                    plcDescription.Visible = true;
                }
            }
        }
开发者ID:alexan1,项目名称:marketweb,代码行数:28,代码来源:StandardsLanding.aspx.cs

示例2: repNoImageListing_ItemDataBound

        protected void repNoImageListing_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                ProductEntity pe = e.Item.DataItem as ProductEntity;
                Literal litPriceInformation = e.Item.FindControl("litPriceInformation") as Literal;
                string priceString = (pe.PriceIsFrom) ? "from " : string.Empty;
                priceString = priceString + "£" + pe.Price.ToString("f");
                priceString = (pe.PriceIncludesVat) ? priceString + " inc VAT" : priceString + " ex VAT";
                litPriceInformation.Text = priceString;

                Literal litDeliveryPrice = e.Item.FindControl("litDeliveryPrice") as Literal;
                string deliveryPriceString = (pe.DeliveryPrice > 0) ? " Delivery: " + pe.DeliveryPrice.ToString("f") : string.Empty;
                litDeliveryPrice.Text = deliveryPriceString;

                if (!m_ShowDescription)
                {
                    e.Item.FindControl("descriptionField").Visible = false;
                }

                if (e.Item.ItemType == ListItemType.AlternatingItem)
                {
                    HtmlTableRow row = e.Item.FindControl("gridRow") as HtmlTableRow;
                    row.Attributes.Add("class", "alternate");
                }
            }
            else if (e.Item.ItemType == ListItemType.Header)
            {
                if (!m_ShowDescription)
                {
                    e.Item.FindControl("descriptionHead").Visible = false;
                }
            }
        }
开发者ID:rrmarriott,项目名称:DirectSports,代码行数:34,代码来源:NoImageProductLister.ascx.cs

示例3: rptrKetquabinhchon_ItemDataBound

        protected void rptrKetquabinhchon_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            // Tính iPhantrambinhchon
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {
                PollAnswerEntity oPhuongan = e.Item.DataItem as PollAnswerEntity;
                if (oPhuongan != null) {
                    double fPhantrambinhchon=0;
                    if (iTongsoluotbinhchon > 0)
                    {
                        fPhantrambinhchon = Convert.ToDouble(oPhuongan.iCount);
                        fPhantrambinhchon = (fPhantrambinhchon / iTongsoluotbinhchon) * 100;
                    }
                    // bind lblPhantrambinhchon
                    Label lblPhantrambinhchon = (Label)e.Item.FindControl("lblPhantrambinhchon");
                    lblPhantrambinhchon.Text = fPhantrambinhchon.ToString("0.###") + "%";

                    // bind pnlThanhphanbieudo
                    Panel pnlThanhphanBieudo = (Panel)e.Item.FindControl("pnlThanhphanBieudo");
                    pnlThanhphanBieudo.BackColor = System.Drawing.Color.Red;
                    pnlThanhphanBieudo.Height = Unit.Pixel(5);
                    pnlThanhphanBieudo.BorderColor = System.Drawing.Color.Black;
                    pnlThanhphanBieudo.BorderWidth = Unit.Pixel(1);
                    pnlThanhphanBieudo.Width = Unit.Percentage(fPhantrambinhchon);
                }
            }
        }
开发者ID:vantrung87hvt,项目名称:vietgap-thuysan,代码行数:26,代码来源:PollKetqua.ascx.cs

示例4: RepeaterControl_ItemDataBound

        private void RepeaterControl_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
              {
            KefWebData data = (KefWebData) e.Item.DataItem;
            HyperLink lnkKefLink = (HyperLink) e.Item.FindControl("lnkKefLink");

            lnkKefLink.Text = data.Title;

            if (!data.Link.IsNull && data.Link.Length > 0)
            {
              lnkKefLink.NavigateUrl = data.Link;

              if (lnkKefLink != null)
              {
            lnkKefLink.Visible = true;
            if (!data.Link.StartsWith(@"http://") && !data.Link.StartsWith(@"https://"))
            {
              lnkKefLink.NavigateUrl = "http://" + data.Link;
            }
              }
            }
            else
            {
              lnkKefLink.Visible = false;
            }
              }
        }
开发者ID:bmadarasz,项目名称:ndihelpdesk,代码行数:28,代码来源:Links.aspx.cs

示例5: rItems_ItemDataBound

        protected void rItems_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                HyperLink hl1 = e.Item.FindControl("hl1") as HyperLink;
                HyperLink hl2 = e.Item.FindControl("hl2") as HyperLink;

                SideBarItem item = (SideBarItem)e.Item.DataItem;

                string title = item.Titles[Globals.CurrentLanguage];
                string url = item.NavigateUrl;//.Insert(2,Globals.CurrentLanguage+"/");
                url = url.Replace("{lang}", Globals.CurrentLanguage);

                if (hl1 != null)
                {
                    hl1.Text = title;
                    hl1.NavigateUrl = url;
                }

                if (hl2 != null)
                {
                    hl2.NavigateUrl = url;
                }

                Image icon_news = e.Item.FindControl("icon_news") as Image;
                if (icon_news != null)
                {
                    icon_news.Attributes.Add("style", item.ImageStyle);
                }
            }
        }
开发者ID:trifonov-mikhail,项目名称:Site1,代码行数:31,代码来源:SideBarPanel.ascx.cs

示例6: _itemsRepeater_ItemDataBound

        private void _itemsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {

            var product = e.Item.DataItem as Product;
            var webItem = WebItemManager.Instance[product.Id];

            var data = new List<object>();
            var items = webItem.Context.SpaceUsageStatManager.GetStatData();

            foreach (var it in items)
            {
                data.Add(new { Name = it.Name, Icon = it.ImgUrl, Size = FileSizeComment.FilesSizeToString(it.SpaceUsage), Url = it.Url });
            }

            if (items.Count == 0)
            {
                e.Item.FindControl("_emptyUsageSpace").Visible = true;
                e.Item.FindControl("_showMorePanel").Visible = false;

            }
            else
            {
                var repeater = (Repeater)e.Item.FindControl("_usageSpaceRepeater");
                repeater.DataSource = data;
                repeater.DataBind();


                e.Item.FindControl("_showMorePanel").Visible = (items.Count > 10);
                e.Item.FindControl("_emptyUsageSpace").Visible = false;
            }
        }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:31,代码来源:ProductQuotes.ascx.cs

示例7: RepeaterEstoque_ItemDataBound

        protected void RepeaterEstoque_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            Veiculo veiculo = (Veiculo)e.Item.DataItem;

            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                HyperLink linkEstoque = (HyperLink)e.Item.FindControl("linkEstoque");
                linkEstoque.NavigateUrl = "Detalhes.aspx?veic=" + veiculo.Id;

                Image imageVeiculo = (Image)e.Item.FindControl("imageVeiculo");
                imageVeiculo.ImageUrl = veiculo.Fotos[0];
                imageVeiculo.AlternateText = veiculo.Modelo;

                Label lblVeiculo = (Label)e.Item.FindControl("lblVeiculo");
                lblVeiculo.Text = veiculo.Marca + " " + veiculo.Modelo;

                Label lblPreco = (Label)e.Item.FindControl("lblPreco");
                lblPreco.Text = veiculo.Valor.ToString("c");

                Label lblDescricao = (Label)e.Item.FindControl("lblDescricao");
                lblDescricao.Text = veiculo.Versao + " " + veiculo.AnoFabricacao + "/" + veiculo.AnoModelo;

                Button BtnDetalhar = (Button)e.Item.FindControl("BtnDetalhar");
                BtnDetalhar.CommandArgument = veiculo.Id.ToString();
            }
        }
开发者ID:danielamarasilva,项目名称:project-one-one,代码行数:26,代码来源:Default.aspx.cs

示例8: OnMenuItemDataBound

 public void OnMenuItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     var showInNav = PermissionHelper.ShouldViewThePageInNav((SiteMapNode) e.Item.DataItem);
     if (showInNav) return;
     var liItem = e.Item.FindControl("liItem");
     liItem.Visible = false;
 }
开发者ID:Learion,项目名称:BruceToolSet,代码行数:7,代码来源:MainMenu.ascx.cs

示例9: rptPricebf_ItemDataBound

 protected void rptPricebf_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         ImageButton imgBtn = e.Item.FindControl("imgBtn") as ImageButton;
         TextBox txtCom = e.Item.FindControl("txtCom") as TextBox;
         if (imgBtn == null || txtCom == null)
         {
             return;
         }
         if (((System.Data.DataRowView)(e.Item.DataItem)).Row.ItemArray[7] != null)
         {
             if (((System.Data.DataRowView)(e.Item.DataItem)).Row.ItemArray[7].ToString() != "")
             {
                 imgBtn.Visible = false;
                 txtCom.Visible = false;
             }
         }
         else
         {
             imgBtn.Visible = true;
             txtCom.Visible = true;
         }
     }
 }
开发者ID:bookxiao,项目名称:orisoft,代码行数:25,代码来源:Userbuycourse.aspx.cs

示例10: repPosts_ItemDataBound

        public void repPosts_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {

            }
        }
开发者ID:ngocpq,项目名称:MHX2,代码行数:7,代码来源:ViewPostUC.ascx.cs

示例11: rptReleaseNotes_ItemDataBound

        /// <summary>
        /// Handles the ItemDataBound event of the rptReleaseNotes control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.RepeaterItemEventArgs"/> instance containing the event data.</param>
        protected void rptReleaseNotes_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                Literal it = (Literal)e.Item.FindControl("IssueType");
                IssueType issueType = (IssueType)e.Item.DataItem;
                it.Text = issueType.Name;

                List<QueryClause> queryClauses = new List<QueryClause>();
                int MilestoneId = Convert.ToInt32(Request.QueryString["m"]);

                Repeater list = (Repeater)e.Item.FindControl("IssuesList");
                queryClauses.Add( new QueryClause("AND", "IssueTypeId", "=", issueType.Id.ToString(), SqlDbType.Int, false));
                queryClauses.Add(new QueryClause("AND", "IssueMilestoneId", "=", MilestoneId.ToString(), SqlDbType.Int, false));

                List<Status> openStatus = Status.GetStatusByProjectId(ProjectId).FindAll(s => !s.IsClosedState);
                foreach (Status st in openStatus)
                {
                    queryClauses.Add(new QueryClause("AND", "IssueStatusId", "<>", st.Id.ToString(), SqlDbType.Int, false));
                }

                List<Issue> issueList = Issue.PerformQuery(ProjectId, queryClauses);
                if (issueList.Count > 0)
                {
                    list.DataSource = issueList;
                    list.DataBind();
                }
                else
                {
                    e.Item.Visible = false;
                }
            }
        }
开发者ID:dineshkummarc,项目名称:BugNet,代码行数:38,代码来源:ReleaseNotes.aspx.cs

示例12: foldersRepeater_ItemDataBound

        protected void foldersRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var dividerDiv = e.Item.FindControl("folderDividerDiv");
                if (dividerDiv == null)
                {
                    return;
                }

                if (!(e.Item.ItemIndex < NumberOfFolders - 1))
                {
                    dividerDiv.Visible = false;
                }

                var img = e.Item.FindControl("folderIcon");
                if (img == null)
                {
                    return;
                }

                var imageButton = (System.Web.UI.HtmlControls.HtmlAnchor)img;

                imageButton.Attributes["onclick"] = "folderClick('" + DataBinder.Eval(e.Item.DataItem, "Text") + "')";
            }
        }
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:26,代码来源:Folders.ascx.cs

示例13: CategoryCreated

        protected void CategoryCreated(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var linkcat = (LinkCategory)e.Item.DataItem;
                if (linkcat != null)
                {
                    if (linkcat.Id != 0)
                    {
                        var description = (Label)e.Item.FindControl("Description");
                        if (description != null)
                        {
                            description.Text = linkcat.Description;
                        }

                        var catlink = (HyperLink)e.Item.FindControl("CatLink");
                        if (catlink != null)
                        {
                            catlink.NavigateUrl = Url.CategoryUrl(linkcat);
                            catlink.Text = linkcat.Title;
                            ControlHelper.SetTitleIfNone(catlink, linkcat.CategoryType + " Category.");
                        }
                    }
                }
            }
        }
开发者ID:rsaladrigas,项目名称:Subtext,代码行数:26,代码来源:ArchivePostPage.cs

示例14: rptStandardsPages_ItemDataBound

        protected void rptStandardsPages_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                HyperLink lnkTitle = (HyperLink)e.Item.FindControl("lnkTitle");
                Label lblDescription = (Label)e.Item.FindControl("lblDescription");
                PlaceHolder plcDescription = (PlaceHolder)e.Item.FindControl("plcDescription");
                HyperLink lnkViewMore = (HyperLink)e.Item.FindControl("lnkViewMore");

                BEContent.tbl_ContentRow row = (BEContent.tbl_ContentRow)((DataRowView)e.Item.DataItem).Row;

                string pageLinkPath = "Content.aspx?ContentID=" + row.ContentID;
                lnkTitle.Text = row.IsContentTitleFRNull() ? "" : row.ContentTitleFR;
                lnkTitle.NavigateUrl = pageLinkPath;
                lnkViewMore.NavigateUrl = pageLinkPath;

                if (!row.IsContentBody1FRNull())
                {
                    string description = RemoveTags(row.ContentBody1FR);
                    if (description.Length > 350)
                        lblDescription.Text = description.Substring(0, 350) + "...";
                    else
                        lblDescription.Text = description;

                    plcDescription.Visible = true;
                }
            }
        }
开发者ID:alexan1,项目名称:marketweb,代码行数:28,代码来源:StandardsLanding.aspx.cs

示例15: repeater_tabs_databound

        protected void repeater_tabs_databound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                HyperLink hplTabs = (HyperLink)e.Item.FindControl("hplTabs");
                ServiceArticle dataitem = (ServiceArticle)e.Item.DataItem;

                hplTabs.Text = dataitem.Title;
                hplTabs.ToolTip = hplTabs.Text;
                hplTabs.NavigateUrl = "~/s/services.aspx?aid=" + dataitem.Id;

                if (serviceId != 0 && serviceId == dataitem.Id)
                {
                    hplTabs.Attributes.Add("class", "selected");
                }

                List<ServiceArticle> sublist = ServiceArticle.GetSubArticlesById(Convert.ToInt32(dataitem.Id));
                if (sublist.Count > 0)
                {
                    Repeater repeater_subtabs = (Repeater)e.Item.FindControl("repeater_subtabs");
                    repeater_subtabs.DataSource = sublist;
                    repeater_subtabs.DataBind();
                }
            }
        }
开发者ID:chutinhha,项目名称:teachinvietnam,代码行数:25,代码来源:services.aspx.cs


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