• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebControls.ListViewItemEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ClubListUK_OnItemDataBound

        protected void ClubListUK_OnItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                ListViewDataItem dataItem = (ListViewDataItem)e.Item;

                var club = dataItem.DataItem as ClubItem;
                var lnkClub = e.Item.FindControl("lnkClub") as System.Web.UI.WebControls.Literal;

                string ClubLinkUrl = "http://www.virginactive.co.uk/clubs/" + club.Name;

                if (lnkClub != null)
                {
                    if (club.IsFirst)
                    {
                        lnkClub.Text = @"<a href=""" + ClubLinkUrl + @""" class=""external club uk first"">" + club.Clubname.Rendered + @"</a>";
                    }
                    else
                    {
                        lnkClub.Text = @"<a href=""" + ClubLinkUrl + @""" class=""external club uk"">" + club.Clubname.Rendered + @"</a>";
                    }
                }

            }
        }
开发者ID:jon-mcmr,项目名称:Virgin-Tds,代码行数:25,代码来源:GlobalLayout.aspx.cs


示例2: lbAlbums_ItemDataBound

        protected void lbAlbums_ItemDataBound(object sender, ListViewItemEventArgs e)
        {

            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                Folder data = ((ListViewDataItem)e.Item).DataItem as Folder;
                
                HyperLink lnkImage = e.Item.FindControl("lnkImage") as HyperLink;
                lnkImage.NavigateUrl = "~/Photos/ViewAlbum.aspx?AlbumID=" + data.FolderID;

                Image image = e.Item.FindControl("Image") as Image;
                image.ImageUrl = "~/Files/Photos/" + data.FullPathToCoverImage;
                image.AlternateText = data.Name;

                HyperLink lnkEdit = e.Item.FindControl("lnkEdit") as HyperLink;
                lnkEdit.NavigateUrl = "~/Photos/EditAlbum.aspx?AlbumID=" + data.FolderID;

                LinkButton linkDeleteAlbum = e.Item.FindControl("linkDeleteAlbum") as LinkButton;
                linkDeleteAlbum.Attributes.Add("OnClick", "javascript:return(confirm('Bạn có chắc chắn muốn xóa album này?'));");
                linkDeleteAlbum.Attributes.Add("FolderID", data.FolderID.ToString());

                HyperLink lnkView = e.Item.FindControl("lnkView") as HyperLink;
                lnkView.NavigateUrl = "~/Photos/ViewAlbum.aspx?AlbumID=" + data.FolderID;
                lnkView.Text = data.Name;
            }
        }
开发者ID:lengocluyen,项目名称:pescode,代码行数:26,代码来源:MyPhotos.aspx.cs


示例3: DL_newslist_ItemDatabound

    protected void DL_newslist_ItemDatabound(object sender, ListViewItemEventArgs e)
    {
        if (e.Item.ItemType == ListViewItemType.DataItem)
        {
            ListViewDataItem ditem = (ListViewDataItem)e.Item;
            //data reader
            System.Data.DataRowView item = (System.Data.DataRowView)ditem.DataItem;

            HyperLink NewsTitle = (HyperLink)ditem.FindControl("NewsTitle");
            Literal NewsDate = (Literal)ditem.FindControl("NewsDate");

            XmlDocument XMLDoc = new XmlDocument();
            XMLDoc.LoadXml(item["content_html"].ToString());

            string HeadLine = commonfunctions.getFieldValue(XMLDoc, "Headline", "/News");
            string Date = commonfunctions.getFieldValue(XMLDoc, "Date", "/News");
            string Teaser = commonfunctions.getFieldValue(XMLDoc, "Teaser", "/News");

            DateTime DateShown = Convert.ToDateTime(Date);
            long newsId = long.Parse(item["content_id"].ToString());
            NewsDate.Text = DateShown.ToString("MMMM dd, yyyy");

            NewsTitle.Text = HeadLine;
            NewsTitle.NavigateUrl = commonfunctions.getQuickLink(newsId); ;

        }
    }
开发者ID:femiosinowo,项目名称:sssadl,代码行数:27,代码来源:NewsList4.aspx.cs


示例4: lvAlbum_ItemDataBound

        protected void lvAlbum_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                File data = ((ListViewDataItem)e.Item).DataItem as File;

                HyperLink lnkView = e.Item.FindControl("lnkView") as HyperLink;
                HyperLink lnkImage = e.Item.FindControl("lnkImage") as HyperLink;
                string pathToImage = "~/files/photos/" + lnkImage.NavigateUrl + "/" + data.FileSystemName;

                 lnkImage.NavigateUrl = "~/Photos/ViewView.aspx?FileID=" + data.FileID;

                lnkView.NavigateUrl = "~/Photos/ViewView.aspx?FileID=" + data.FileID;
                string name = data.FileName;
                if (name.Length > 25)
                    name = name.Substring(0, 25);
                lnkView.Text = System.IO.Path.GetFileNameWithoutExtension(name);
                lnkView.NavigateUrl = "~/Photos/ViewView.aspx?FileID=" + data.FileID;
               
                Image image = e.Item.FindControl("Image") as Image;
                image.ImageUrl = pathToImage + "__s." + data.Extension;
                image.AlternateText = data.FileName;

            }
            else if (e.Item.ItemType == ListViewItemType.EmptyItem)
            {
                HyperLink linkAddPhotos = e.Item.FindControl("linkAddPhotos") as HyperLink;
                linkAddPhotos.NavigateUrl = "~/photos/AddPhotos.aspx?AlbumID=" + _webContext.AlbumID.ToString();
            }
        }
开发者ID:lengocluyen,项目名称:pescode,代码行数:30,代码来源:ViewAlbum.aspx.cs


示例5: ListViewRepairSheet_ItemDataBound

        protected void ListViewRepairSheet_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                ListViewDataItem DataItem = (ListViewDataItem)e.Item;
                DataRowView dv = (DataRowView)DataItem.DataItem;
                AfterSaleServiceSystem.DAL.dsRepairSheet.tb_repairsheetRow repairsheetRow = (AfterSaleServiceSystem.DAL.dsRepairSheet.tb_repairsheetRow)dv.Row;

                tb_repairstateTableAdapter repairstateTableAdapter = new tb_repairstateTableAdapter();
                if (repairstateTableAdapter.GetDatabyid(repairsheetRow.repairstateid).Rows.Count > 0)
                {
                    AfterSaleServiceSystem.DAL.dsRepairState.tb_repairstateRow repairstateRow =
                        (AfterSaleServiceSystem.DAL.dsRepairState.tb_repairstateRow)
                        repairstateTableAdapter.GetDatabyid(repairsheetRow.repairstateid).Rows[0];
                    Label lb = (Label)e.Item.FindControl("repairstateidLabel");
                    if (lb != null)
                        lb.Text = repairstateRow.description;
                }

                tb_customTableAdapter customTableAdapter = new tb_customTableAdapter();
                if (customTableAdapter.GetDataByid(repairsheetRow.customid).Rows.Count > 0)
                {
                    AfterSaleServiceSystem.DAL.dsCustomer.tb_customRow customRow =
                        (AfterSaleServiceSystem.DAL.dsCustomer.tb_customRow)
                        customTableAdapter.GetDataByid(repairsheetRow.customid).Rows[0];
                    Label lb = (Label)e.Item.FindControl("customidLabel");
                    if (lb != null)
                        lb.Text = customRow.company;
                }
            }
        }
开发者ID:CSSource,项目名称:WebServiceSystem,代码行数:31,代码来源:ClerkMain.aspx.cs


示例6: BindSelectedPermission

    public void BindSelectedPermission(object sender, ListViewItemEventArgs e)
    {
        KeyValuePair<string, ModelPermissionLevel> item = (KeyValuePair<string, ModelPermissionLevel>)e.Item.DataItem;

        string grpName = item.Key;
        ModelPermissionLevel lvl = item.Value;

        // To the user, these are equivalent in terms of access
        if (lvl == ModelPermissionLevel.NotSet)
            lvl = _permissionsManager.CheckGroupPermissions(_permissionsManager.GetUserGroup(DefaultGroups.AllUsers), _pid);

        var row = e.Item.FindControl("DataRow");

        if (grpName == DefaultGroups.AllUsers)
            ((System.Web.UI.HtmlControls.HtmlTableCell)row.Controls[0]).InnerText = PermissionsManager.ALL_USERS_LABEL;
        else if (grpName == DefaultGroups.AnonymousUsers)
            ((System.Web.UI.HtmlControls.HtmlTableCell)row.Controls[0]).InnerText = PermissionsManager.ANONYMOUS_USERS_LABEL;

        if (e.Item.ItemType == ListViewItemType.DataItem)
        {
            DropDownList dd = (DropDownList)row.FindControl("DropdownColumn")
                                                    .FindControl("PermissionsDropdownList");

            foreach(ListItem li in dd.Items)
            {
                if (Int32.Parse(li.Value) == (int)lvl)
                {
                    li.Selected = true;
                    break;
                }
            }
        }
    }
开发者ID:adlnet,项目名称:3D-Repository,代码行数:33,代码来源:PermissionsDataList.ascx.cs


示例7: lstProperty_itemDataBound

        protected void lstProperty_itemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                PropertyTableAzure property = (PropertyTableAzure)e.Item.DataItem;
                HtmlImage link = (HtmlImage)e.Item.FindControl("imgProperty");
                HtmlAnchor html = (HtmlAnchor)e.Item.FindControl("hyparchor");
                Label price = (Label)e.Item.FindControl("lblPrice");
                Label street = (Label)e.Item.FindControl("lblStreet");
                Label suburb = (Label)e.Item.FindControl("lblSuburb");
                Label city = (Label)e.Item.FindControl("lblCity");
                if (property.ImageUrlAzures.Any())
                {
                    html.HRef = Settings.Default.PropertyUrlSA + "Public/PropertyDetails.aspx?PropertyID=" + property.PropertyID;
                    link.Src = property.ImageUrlAzures[0].thumbnailblob;

                    //link.Target = "_blank";
                    //link.NavigateUrl = Settings.Default.PropertyUrlKA + "Public/PropertyDetails.aspx?PropertyID=" + property.PropertyID;
                }
                price.Text = property.Price;
                street.Text = property.StreetName;
                suburb.Text = property.Suburb;
                city.Text = property.City;

            }
        }
开发者ID:abrahamkapambwe,项目名称:NewsZA,代码行数:26,代码来源:MainNews.Master.cs


示例8: lvFeedbacks_ItemCreated

 protected void lvFeedbacks_ItemCreated(object sender, ListViewItemEventArgs e)
 {
     ImageButton lb = e.Item.FindControl("ibDelete") as ImageButton;
     lb.Visible = this.IsEditMode;
     Label l = e.Item.FindControl("lblFeedbackWriterEmail") as Label;
     l.Visible = this.IsEditMode;
 }
开发者ID:shaileshgajula,项目名称:c8a5b00a-1d86-40ff-a172-35d865eeec09,代码行数:7,代码来源:Feedbacks.ascx.cs


示例9: lvLinks_ItemDataBound

        protected void lvLinks_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                var item = e.Item.DataItem as Item;
                var phLink = e.Item.FindControl("phLink") as PlaceHolder;
                switch(item.TemplateID.ToString())
                {
                    case Constants.TemplateIDs.ApplicationShortcut:
                        var lnkItem = new HyperLink();
                        lnkItem.Text = StringUtil.GetString(item.Fields[Constants.FieldIDs.ApplicationShortcutDisplayName].Value, item.DisplayName);
                        lnkItem.Attributes["href"] = "#";
                        lnkItem.Attributes["onclick"] = string.Format("javascript:scForm.postRequest('', '', '', 'appshortcut:open(appid={0})'); return false;", item.ID);
                        phLink.Controls.Add(lnkItem);
                        break;
                    case Constants.TemplateIDs.Link:
                        var link = new Sitecore.Web.UI.WebControls.Link()
                        {
                            Item = item,
                            Field = Constants.FieldIDs.LinkLink
                        };
                        if (string.IsNullOrEmpty(link.Text))
                        {
                            link.Text = item.DisplayName;
                        }
                        phLink.Controls.Add(link);
                        break;
                }

            }
        }
开发者ID:charreal,项目名称:Sitecore-Dashboard,代码行数:31,代码来源:Links.ascx.cs


示例10: MemberSectionList_OnItemDataBound

        protected void MemberSectionList_OnItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                ListViewDataItem dataItem = (ListViewDataItem)e.Item;

                var module = dataItem.DataItem as MembershipStaticPageItem;

                if (module != null)
                {
                    string EnqFormUrl;
                    if (module.Offer.Item != null)
                    {
                        //Get offer
                        OfferItem offer = (OfferItem)module.Offer.Item;
                        EnqFormUrl = enqForm.Url + "?sc_trk=enq&page=" + offer.GetOfferTypeValue() + "&offerId=" + offer.OfferId.Raw + "&clubId=" + currentClub.ClubId.Raw;
                    }
                    else
                    {
                        EnqFormUrl = enqForm.Url + "?sc_trk=enq&c=" + currentClub.InnerItem.ID.ToShortID().ToString();
                    }
                    module.FormUrl = EnqFormUrl;

                    Literal ltrFormLink = (Literal)e.Item.FindControl("ltrFormLink");
                    ltrFormLink.Text =  "<a href=\"" + EnqFormUrl + "\" class=\"btn btn-cta-big gaqTag\" data-gaqcategory=\"CTA\" data-gaqaction=\"EnquireNow\" data-gaqlabel=\"Membership\">" + Translate.Text("Enquire now") + "</a>";
                }

            }
        }
开发者ID:jon-mcmr,项目名称:Virgin-Tds,代码行数:29,代码来源:ClubPersonalMembership.ascx.cs


示例11: lstMyStock_ItemDataBound

        void lstMyStock_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            int mIndex = Convert.ToInt32(e.Item.ID.Replace("ctrl", ""));

            StockAnalyzer mSA = new StockAnalyzer();

            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                ListViewDataItem mLvdi = (ListViewDataItem)e.Item;
                DataRowView mDrv = (DataRowView)mLvdi.DataItem;
                //ID,Code,Count,BuyPatternCode,BuyPattern,BuyDate,BuyCost,SelPatternCode,SelPattern,SelDate,SelCost

                string mCode = mDrv["Code"].ToString();
                string mBuyDate = mDrv["BuyDate"].ToString();
                string mBuyCost = mDrv["BuyCost"].ToString();
                string mSelPatternCode = mDrv["SelPatternCode"].ToString();
                string mSelPattern = mDrv["SelPattern"].ToString();
                string mSelDate = mDrv["SelDate"].ToString();
                string mSelCost = mDrv["SelCost"].ToString();

                string mSelPattern_Cost = mSelPattern.Split('&')[0];
                string mSelPattern_Trade = mSelPattern.Split('&')[1];

                string[] mCosts = mSelPattern_Cost.Split(',');
                double mMinCost = 100000000;
                for (int i = 0; i < mCosts.Length; i++)
                {
                    if (Convert.ToDouble(mCosts[i]) < mMinCost)
                    {
                        mMinCost = Convert.ToDouble(mCosts[i]);
                    }
                }

                string[] mTrades = mSelPattern_Trade.Split(',');
                double mMinTrade = 100000000;
                for (int i = 0; i < mTrades.Length; i++)
                {
                    string mtest = mTrades[i];
                    if (Convert.ToDouble(mTrades[i]) < mMinTrade)
                    {
                        mMinTrade = Convert.ToDouble(mTrades[i]);
                    }
                }

                if (Convert.ToInt32(mBuyCost) < Convert.ToInt32(mSelCost))
                {
                    mSelCost = "<span style='color:#ff0000'>" + mSelCost + "</span>";
                }
                else
                {
                    mSelCost = "<span style='color:#3366ff'>" + mSelCost + "</span>";
                }

                ((Literal)e.Item.FindControl("litDetailComment")).Text = mDrv["Code"].ToString() + "(매도패턴코드 : " + mSelPatternCode + ", 매수가 : " + mBuyCost + ", 매도가 : " + mSelCost + ")";
                ((Literal)e.Item.FindControl("litChart")).Text = GetChartScript(mIndex.ToString(), mSelPattern_Cost, mSelPattern_Trade, (mMinCost - 1), (mMinTrade - 1));
            }

            mSA = null;

        }
开发者ID:jjig810906,项目名称:DJ_STOCK_WINNER,代码行数:60,代码来源:CommitSell.aspx.cs


示例12: lvUserRole_ItemDataBound

 protected void lvUserRole_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     //当前行
     var itm = e.Item;
     //显示值
     if (itm.ItemType == ListViewItemType.DataItem)
     {
         //全部DropDownList
         var ddlUser = (DropDownList)itm.FindControl("ddlUser");
         var ddlProc = (DropDownList)itm.FindControl("ddlProc");
         var ddlRole = (DropDownList)itm.FindControl("ddlRole");
         //当前数据行
         var row = (DataSetUserRole.t_user_proc_roleRow)((DataRowView)itm.DataItem).Row;
         if (row != null)
         {
             //取得当前项
             var itemUser = ddlUser.Items.FindByValue(row.u_id.ToString());
             var itemProc = ddlProc.Items.FindByValue(row.proc_id.ToString());
             var itemRole = ddlRole.Items.FindByValue(row.ro_id.ToString());
             //设置值
             if (itemUser != null && itemProc != null && itemRole != null)
             {
                 itemUser.Selected = true;
                 itemProc.Selected = true;
                 itemRole.Selected = true;
             }
         }
     }
 }
开发者ID:yangdan8,项目名称:ydERPGJ,代码行数:29,代码来源:UserRole.aspx.cs


示例13: WidgetList_OnItemDataBound

        protected void WidgetList_OnItemDataBound(object sender, ListViewItemEventArgs e)
        {
            //if (e.Item.ItemType == ListViewItemType.DataItem)
            //{
            //    ListViewDataItem dataItem = (ListViewDataItem)e.Item;

            //    var widgetItem = dataItem.DataItem as LinkWidgetItem;

            //    if (widgetItem != null)
            //    {
            //        //Get link url
            //        var linkUrl = e.Item.FindControl("linkUrl") as System.Web.UI.WebControls.Literal;
            //        if (linkUrl != null)
            //        {
            //            if (isClubSection)
            //            {
            //                //get clubID
            //                ClubItem club = new ClubItem(Sitecore.Context.Item.Axes.SelectSingleItem(String.Format(@"ancestor-or-self::*[@@tid=""{0}"" or @@tid=""{1}""]", ClassicClubItem.TemplateId, LifeCentreItem.TemplateId)));

            //                //append club id to url
            //                if (club != null)
            //                {
            //                    linkUrl.Text = widgetItem.Widget.Buttonlink.Url.IndexOf("?") == -1 ? widgetItem.Widget.Buttonlink.Url + "&c=" + club.ID.ToString() : widgetItem.Widget.Buttonlink.Url + "?c=" + club.ID.ToString();
            //                }
            //            }
            //            else
            //            {
            //                linkUrl.Text = widgetItem.Widget.Buttonlink.Url;
            //            }
            //        }
            //    }
            //}
        }
开发者ID:jon-mcmr,项目名称:Virgin-Tds,代码行数:33,代码来源:MemberLandingCorporate.ascx.cs


示例14: CategoriesList1_ItemDataBound

        protected void CategoriesList1_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                List<CategoriesDL> dt = (List<CategoriesDL>)CategoriesList1.DataSource;
                CategoriesDL row = dt[recindex1];

                HyperLink clink = (HyperLink)e.Item.FindControl("CatLink");
                if (cityID > 0 && areaID > 0)
                {
                    clink.NavigateUrl = String.Concat(basedomain, "/blog/", row.CatUrlName, "/", CityDL.GetCityUrlByID(cityID), "/", AreaDL.GetAreaUrlByID(areaID));
                }
                else
                {
                    clink.NavigateUrl = String.Concat(basedomain, "/blog/", row.CatUrlName);
                }
                clink.Text = row.Name;

                if ((row.Id != Convert.ToInt32(catid)) && catid != "0")
                {
                    clink.Attributes.Add("rel", "nofollow");
                }

                if (row.Id == Convert.ToInt32(catid))
                {
                    clink.CssClass += " selected";
                }
                recindex1++;
            }
        }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:30,代码来源:BlogMobile.Master.cs


示例15: lstTask_DataBound

 protected void lstTask_DataBound(object sender, ListViewItemEventArgs e)
 {
     Button btnClaim;
     Label lblHeat, lblDocs, lblOther;
     Dictionary<string, string> cred = getCredentials(Session["secureuser"].ToString());
     //Show the claim task button only if the current task is assigned to current users section
     if (e.Item.ItemType == ListViewItemType.DataItem)
     {
         System.Data.DataRowView rowView = e.Item.DataItem as System.Data.DataRowView;
         btnClaim = (Button)e.Item.FindControl("btnClaim");
         lblHeat = (Label)e.Item.FindControl("lblHeat");
         lblDocs = (Label)e.Item.FindControl("lblDocs");
         lblOther = (Label)e.Item.FindControl("lblOther");
         string SectionID = rowView["Section_ID"].ToString();
         string EmployeeID = rowView["Employee_ID"].ToString();
         string HeatID = rowView["Heat_ID"].ToString();
         string Docs = rowView["Documentation"].ToString();
         string Other = rowView["Other_Resources"].ToString();
         string currentUsersSection = cred["sec_id"].ToString();
         if (btnClaim != null)
         {
             if (currentUsersSection == SectionID & EmployeeID == "")
             {
                 btnClaim.Visible = true;
             }
         }
         if (HeatID == "" || HeatID == null) { lblHeat.Visible = false; }
         if (Docs == "" || Docs == null) { lblDocs.Visible = false; }
         if (Other == "" || Other == null) { lblOther.Visible = false; }
     }
 }
开发者ID:williamrobinson90,项目名称:ImprovementWorkflow,代码行数:31,代码来源:task_details.aspx.cs


示例16: CheckSale

    // checks weather an item is on sale
    protected void CheckSale(object source, ListViewItemEventArgs e)
    {
        ListViewDataItem item = (ListViewDataItem)e.Item;

        // Get the index of the listviewitem in the underlying data source object.
        int myDataItemIndex = item.DataItemIndex;

        Label sale = (Label)e.Item.FindControl("lblOnSale");
        Label saleAnswer = (Label)e.Item.FindControl("lblOnSaleAnswer");

        Label price = (Label)e.Item.FindControl("lblPriceAnswer");

        //for (int i = 0; i < myDataItemIndex; i++ )
        //{
        if (saleAnswer.Text == "")
        {
            sale.Visible = false;
            saleAnswer.Visible = false;
        }
        else
        {
            // sale.Text = "On Sale: ";
            price.ForeColor = Color.Red;
            price.Visible = true;
            price.Font.Bold = true;
            price.Font.Strikeout = true;

            saleAnswer.ForeColor = Color.DarkBlue;
            saleAnswer.Font.Bold = true;

        }
        //}
    }
开发者ID:jasonhuber,项目名称:devryweb460store,代码行数:34,代码来源:Items.aspx.cs


示例17: TransactionsLv_ItemDataBound

        protected void TransactionsLv_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                Transaction item = (Transaction)e.Item.DataItem;

                Literal _TransIdLtr = (Literal)e.Item.FindControl("TransIdLtr");
                Literal _TransTypeLtr = (Literal)e.Item.FindControl("TransTypeLtr");
                Literal _FromAccountLtr = (Literal)e.Item.FindControl("FromAccountLtr");
                Literal _ToAccountLtr = (Literal)e.Item.FindControl("ToAccountLtr");
                Literal _AmountLtr = (Literal)e.Item.FindControl("AmountLtr");
                Literal _CommentLtr = (Literal)e.Item.FindControl("CommentLtr");
                Literal _TransDateLtr = (Literal)e.Item.FindControl("TransDateLtr");

                _TransIdLtr.Text = item.Id.ToString();
                _FromAccountLtr.Text = item.SourceAccountId.ToString();
                _ToAccountLtr.Text = item.DestinationAccountNumber.ToString();
                _TransDateLtr.Text = item.TransactionDate.Value.ToString("dd/MM/yy");
                _TransTypeLtr.Text = item.TransTypeName;

                if (item.Comment != "" && item.Comment != null)
                    _CommentLtr.Text = item.Comment.Trim();

                if (item.TransactionAmount != null)
                {
                    if (item.Type == (int)Code.Enums.Enums.TransType.Credit)
                        _AmountLtr.Text = string.Format("${0}", Math.Round((decimal)item.TransactionAmount, 2));
                    else
                        _AmountLtr.Text = string.Format("-${0}", Math.Round((decimal)item.TransactionAmount, 2));
                }
                else
                    _AmountLtr.Text = "$0.00";
            }
        }
开发者ID:jnicastri,项目名称:WDT_A2_Bank,代码行数:34,代码来源:Admin_Transactions.aspx.cs


示例18: lvGreenhouses_ItemDataBound

 protected void lvGreenhouses_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     var litGreenhouseId = e.Item.FindControl("litGreenhouseId") as Literal;
     var linkView = e.Item.FindControl("linkView") as HyperLink;
     if (linkView != null && litGreenhouseId != null)
         linkView.NavigateUrl = string.Format("~/Greenhouses/ViewGreenhouse.aspx?GreenhouseID={0}", litGreenhouseId.Text);
 }
开发者ID:negonicrac,项目名称:seniorproject2009,代码行数:7,代码来源:User.aspx.cs


示例19: lvEducation_ItemDataBound

    protected void lvEducation_ItemDataBound(object sender, ListViewItemEventArgs e)
    {
        TextBox txtInstitutionName = (TextBox)e.Item.FindControl("txtInstitutionName") as TextBox;
        TextBox txtDegreeTitle = (TextBox)e.Item.FindControl("txtDegreeTitle") as TextBox;
        DropDownList DDCategory = (DropDownList)e.Item.FindControl("DDCategory") as DropDownList;
        TextBox txtBatch = (TextBox)e.Item.FindControl("txtBatch") as TextBox;

        Literal litInstitutionName = (Literal)e.Item.FindControl("litInstitutionName") as Literal;
        Literal litDegreeTitle = (Literal)e.Item.FindControl("litDegreeTitle") as Literal;
        Literal litBatch = (Literal)e.Item.FindControl("litBatch") as Literal;
        Literal litCategory = (Literal)e.Item.FindControl("litCategory") as Literal;
        Literal litPK = (Literal)e.Item.FindControl("litPK") as Literal;

        txtInstitutionName.Text = litInstitutionName.Text;
        txtDegreeTitle.Text = litDegreeTitle.Text;
        DDCategory.Text = litCategory.Text;
        txtBatch.Text = litBatch.Text;

        LinkButton lnkRemove = (LinkButton)e.Item.FindControl("lnkRemove") as LinkButton;

        lnkRemove.Attributes.Add("InstitutionName", litInstitutionName.Text);
        lnkRemove.Attributes.Add("DegreeTitle", litDegreeTitle.Text);
        lnkRemove.Attributes.Add("Category", litCategory.Text);
        lnkRemove.Attributes.Add("Batch", litBatch.Text);
    }
开发者ID:ShoeTurtle,项目名称:MyFooBar,代码行数:25,代码来源:editEducation.aspx.cs


示例20: lvSummary_ItemDataBound

        protected void lvSummary_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                ListViewDataItem dataItem = (ListViewDataItem)e.Item;
                RouteOrder r = (RouteOrder)(dataItem.DataItem);

                Label lblRouteTotal = (Label)(dataItem.FindControl("lblRouteTotal"));
                lblRouteTotal.Text = r.RouteTotalAmount.ToString("c") + " USD";

                Label lblRouteName = (Label)(dataItem.FindControl("lblRouteName"));
                Route route = new Route().GetRouteBySchedule(r.ScheduleId.Value);
                lblRouteName.Text = route.DeparturePort.PortName + " - " + route.ArriavlPort.PortName;

                Schedule schedule = new Schedule().GetById(r.ScheduleId.Value, false);
                Label lblVesselName = (Label)(dataItem.FindControl("lblVesselName"));
                lblVesselName.Text = schedule.Vessel.VesselName;

                Vessel vessel = new Vessel().GetById(schedule.VesselId.Value, false);
                Label lblCompanyName = (Label)(dataItem.FindControl("lblCompanyName"));
                lblCompanyName.Text = vessel.Operator.CompanyName;

                Label lblDepartureDatetime = (Label)(dataItem.FindControl("lblDepartureDatetime"));
                lblDepartureDatetime.Text = schedule.SailingTime.HasValue ? schedule.SailingTime.Value.ToString() : string.Empty;

                Label lblArrivalDatetime = (Label)(dataItem.FindControl("lblArrivalDatetime"));
                lblArrivalDatetime.Text = schedule.ArrivalTime.HasValue ? schedule.ArrivalTime.Value.ToString() : string.Empty;

                Label lblPassenger = (Label)(dataItem.FindControl("lblPassenger"));
                Label lblTransport = (Label)(dataItem.FindControl("lblTransport"));
                Label lblAccommodation = (Label)(dataItem.FindControl("lblAccommodation"));

            }
        }
开发者ID:senolakkas,项目名称:ferrybooking,代码行数:34,代码来源:QuoteSummary.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.Literal类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.ListViewDeleteEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap