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

C# WebControls.DataListItemEventArgs类代码示例

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

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



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

示例1: dlAlsoPurchasedProducts_ItemDataBound

        protected void dlAlsoPurchasedProducts_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var product = e.Item.DataItem as Product;
                if (product != null)
                {
                    string productURL = SEOHelper.GetProductUrl(product);

                    var hlImageLink = e.Item.FindControl("hlImageLink") as HyperLink;
                    if (hlImageLink != null)
                    {
                        var picture = product.DefaultPicture;
                        if (picture != null)
                            hlImageLink.ImageUrl = PictureManager.GetPictureUrl(picture, SettingManager.GetSettingValueInteger("Media.Product.ThumbnailImageSize", 125), true);
                        else
                            hlImageLink.ImageUrl = PictureManager.GetDefaultPictureUrl(SettingManager.GetSettingValueInteger("Media.Product.ThumbnailImageSize", 125));
                        hlImageLink.NavigateUrl = productURL;
                        hlImageLink.ToolTip = String.Format(GetLocaleResourceString("Media.Product.ImageLinkTitleFormat"), product.LocalizedName);
                        hlImageLink.Text = String.Format(GetLocaleResourceString("Media.Product.ImageAlternateTextFormat"), product.LocalizedName);
                    }

                    var hlProduct = e.Item.FindControl("hlProduct") as HyperLink;
                    if (hlProduct != null)
                    {
                        hlProduct.NavigateUrl = productURL;
                        hlProduct.Text = product.LocalizedName;
                    }
                }
            }
        }
开发者ID:fathurxzz,项目名称:aleqx,代码行数:31,代码来源:ProductsAlsoPurchased.ascx.cs


示例2: ImagesList_ItemDataBound

        protected void ImagesList_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            Panel ImagePanel = (Panel)e.Item.FindControl("ImagePanel");
            Label FileNameLabel = (Label)ImagePanel.FindControl("FileNameLabel");
            Image ShowImage = (Image)ImagePanel.FindControl("ShowImage");
            Label UploaderLabel = (Label)ImagePanel.FindControl("UploaderLabel");
            Label SubmissionDate = (Label)ImagePanel.FindControl("SubmissionDateLabel");
            Models.Images img = (Models.Images)e.Item.DataItem;

            if (img.FileName.Length >= 13)
            {
                string shortFileName = img.FileName.Substring(0, 13);
                FileNameLabel.Text = shortFileName + "...";
            }
            else
            {
                FileNameLabel.Text = img.FileName;
            }
            FileNameLabel.ToolTip = img.FileName;
            ShowImage.ImageUrl = string.Format("~/Files/{0}/Images/{1}", img.Uploader, img.FileName);
            ShowImage.Width = 100;
            ShowImage.Height = 100;
            ShowImage.AlternateText = img.FileName;
            UploaderLabel.Text = img.Uploader;
            SubmissionDate.Text = img.SubmissionDate.ToString();
        }
开发者ID:Zimpe,项目名称:Kawanoikioi,代码行数:26,代码来源:Default.aspx.cs


示例3: lstItem_ItemDataBound

        protected void lstItem_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Header)
            {
                LoadSortFieldOptions(e);
            }
            else if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView dr = (DataRowView)e.Item.DataItem;

                HtmlInputCheckBox chkList = (HtmlInputCheckBox)e.Item.FindControl("chkList");
                chkList.Value = dr["DebitMemoID"].ToString();

                POReturnStatus status = (POReturnStatus)Enum.Parse(typeof(POReturnStatus), dr["POReturnStatus"].ToString());
                if (status == POReturnStatus.Posted || status == POReturnStatus.Cancelled)
                {
                    chkList.Attributes.Add("disabled", "false");
                }

                HyperLink lnkReturnNo = (HyperLink)e.Item.FindControl("lnkReturnNo");
                lnkReturnNo.Text = dr["MemoNo"].ToString();
                Common Common = new Common();
                string stParam = "?task=" + Common.Encrypt("details", Session.SessionID) + "&retid=" + Common.Encrypt(chkList.Value.ToString(), Session.SessionID);
                lnkReturnNo.NavigateUrl = "Default.aspx" + stParam;

                Label lblReturnDate = (Label)e.Item.FindControl("lblReturnDate");
                lblReturnDate.Text = Convert.ToDateTime(dr["MemoDate"]).ToString("yyyy-MM-dd HH:mm:ss");

                Label lblSupplierID = (Label)e.Item.FindControl("lblSupplierID");
                lblSupplierID.Text = dr["SupplierID"].ToString();

                HyperLink lblSupplierCode = (HyperLink)e.Item.FindControl("lblSupplierCode");
                lblSupplierCode.Text = dr["SupplierCode"].ToString();
                stParam = "?task=" + Common.Encrypt("details", Session.SessionID) + "&id=" + Common.Encrypt(lblSupplierID.Text, Session.SessionID);
                lblSupplierCode.NavigateUrl = Constants.ROOT_DIRECTORY + "/PurchasesAndPayables/_Vendor/Default.aspx" + stParam;

                Label lblReqReturnDate = (Label)e.Item.FindControl("lblReqReturnDate");
                lblReqReturnDate.Text = Convert.ToDateTime(dr["RequiredPostingDate"]).ToString("yyyy-MM-dd");

                Label lblBranchID = (Label)e.Item.FindControl("lblBranchID");
                lblBranchID.Text = dr["BranchID"].ToString();
                Label lblBranchCode = (Label)e.Item.FindControl("lblBranchCode");
                lblBranchCode.Text = dr["BranchCode"].ToString();

                Label lblSubTotal = (Label)e.Item.FindControl("lblSubTotal");
                lblSubTotal.Text = Convert.ToDecimal(dr["SubTotal"]).ToString("#,##0.#0");

                Label lblRemarks = (Label)e.Item.FindControl("lblRemarks");
                lblRemarks.Text = dr["Remarks"].ToString();

                CheckBox chkIncludeIneSales = (CheckBox)e.Item.FindControl("chkIncludeIneSales");
                chkIncludeIneSales.Checked = bool.Parse(dr["IncludeIneSales"].ToString());

                //For anchor
                //				HtmlGenericControl divExpCollAsst = (HtmlGenericControl) e.Item.FindControl("divExpCollAsst");

                //				HtmlAnchor anchorDown = (HtmlAnchor) e.Item.FindControl("anchorDown");
                //				anchorDown.HRef = "javascript:ToggleDiv('" +  divExpCollAsst.ClientID + "')";
            }
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:60,代码来源:_elist.ascx.cs


示例4: pointList_ItemDataBound

 protected void pointList_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
     {
         Control control = e.Item.Controls[0];
         Label label = (Label) control.FindControl("lblPointType");
         if (label != null)
         {
             if (label.Text == "0")
             {
                 label.Text = "兑换优惠券";
             }
             else if (label.Text == "1")
             {
                 label.Text = "兑换礼品";
             }
             else if (label.Text == "2")
             {
                 label.Text = "购物奖励";
             }
             else if (label.Text == "3")
             {
                 label.Text = "退款扣积分";
             }
         }
     }
 }
开发者ID:davinx,项目名称:himedi,代码行数:27,代码来源:UserPoints.cs


示例5: dlArticle_ItemDataBound

 protected void dlArticle_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     _currArticle = e.Item.DataItem as Article;
     this.Title = "Liveandev: " + _currArticle.Title;
     lnkCat.Text = _currArticle.CategoryTitle;
     lnkCat.NavigateUrl = "~/BrowseArticles.aspx?ID=" + _currArticle.CategoryID;
     lblAricleNotExist.Visible = false;
     if (_currArticle.OnlyForMembers && !this.User.Identity.IsAuthenticated)
     {
         panWholeContent.Visible = false;
         lblOnlyForMembers.Visible = true;
     }
     else
     {
         lblOnlyForMembers.Visible = false;
         if (!_currArticle.Published && !this.User.IsInRole("Administrators"))
         {
             panWholeContent.Visible = false;
             lblNotPublished.Visible = true;
         }
         else
         {
             lblNotPublished.Visible = false;
             panWholeContent.Visible = true;
             if (!this.IsPostBack)
                 _currArticle.IncrementViewCount();
             lblInsertComment.DataBind();
         }
     }
 }
开发者ID:Nevs12,项目名称:LiveandevSite,代码行数:30,代码来源:ShowArticle.aspx.cs


示例6: DataList1_ItemDataBound

        protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item ||
               e.Item.ItemType == ListItemType.AlternatingItem)
            {

                // Retrieve the Label control in the current DataListItem.
                Label PriceLabel = (Label)e.Item.FindControl("lblPrice");
                Label ProductIdLabel = (Label)e.Item.FindControl("lblProductId");
                Label NameLabel = (Label)e.Item.FindControl("lblName");
                Label RatingLabel = (Label)e.Item.FindControl("lblRating");
                Label totalPrice = (Label)e.Item.FindControl("lblAmtVoted");
                Label DetailsLabel = (Label)e.Item.FindControl("lblDetails");

                TextBox Quantity = (TextBox)e.Item.FindControl("txtQuantity");

                Decimal Price = Convert.ToDecimal(((DataRowView)e.Item.DataItem).Row.ItemArray[2].ToString());
                int ID = Convert.ToInt32(((DataRowView)e.Item.DataItem).Row.ItemArray[0].ToString());
                string Name = (((DataRowView)e.Item.DataItem).Row.ItemArray[1].ToString()).Replace('"', ' ');
                int Qty = Convert.ToInt32(((DataRowView)e.Item.DataItem).Row.ItemArray[3].ToString());
                Decimal Total = Convert.ToDecimal(((DataRowView)e.Item.DataItem).Row.ItemArray[4].ToString());

                PriceLabel.Text = Price.ToString("c");
                ProductIdLabel.Text = ID.ToString();
                NameLabel.Text = Name;
                totalPrice.Text = Total.ToString("c");
                Quantity.Text = Qty.ToString();
            }
        }
开发者ID:James-Meagher,项目名称:Shopping-Cart,代码行数:29,代码来源:ShoppingCartPopup.aspx.cs


示例7: rptPaging_ItemDataBound

 protected void rptPaging_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     var lnkPage = (LinkButton)e.Item.FindControl("lbPaging");
     if (lnkPage.CommandArgument != CurrentPage.ToString()) return;
     lnkPage.Enabled = false;
     lnkPage.BackColor = Color.FromName("#00FF00");
 }
开发者ID:chienvh,项目名称:LearningProgrammingByExample,代码行数:7,代码来源:Repeater_Pagination.aspx.cs


示例8: dlEmployee_ItemDataBound

        protected void dlEmployee_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            //tblEmployee emp = (tblEmployee)e.Item.DataItem;
            DataRowView drv = (DataRowView)e.Item.DataItem;

            DayPilotCalendar dpc = (DayPilotCalendar)e.Item.FindControl("DayPilotCalendar1");
            if (ddlSearch.SelectedValue == "" || txtSearch.Text.Trim() == "")
            {
                //if (DateSelector1.DateValue != null)
                //    dpc.StartDate = (DateTime)DateSelector1.DateValue;
            }
            else
            {
                if (ddlSearch.SelectedValue == "ID" && txtSearch.Text.Trim() != "")
                {
                    long.TryParse(txtSearch.Text.Trim(), out BookID);
                    dpc.StartDate = rh.getReservationDateByID(BookID);
                }
                else if (ddlSearch.SelectedValue == "Mobile" && txtSearch.Text.Trim() != "")
                {
                    dpc.StartDate = rh.getReservationDateByMobile(txtSearch.Text.Trim());
                }
            }
            //get Business Exclude Hours
            dpc.BusinessExcludeHours = rh.getBusinessExcludeHours(drv["employeeNum"].ToString(), dpc.StartDate);
            //bind data
            dpc.DataSource = rh.getReservation(drv["employeeNum"].ToString(), dpc.StartDate, dpc.Days);
            dpc.DataBind();
        }
开发者ID:zitjubiz,项目名称:terryCBM,代码行数:29,代码来源:frmReservationMain.aspx.cs


示例9: lstPurchases_ItemDataBound

        protected void lstPurchases_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Header)
            {

            }
            else if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView dr = (DataRowView)e.Item.DataItem;

                HtmlInputCheckBox chkList = (HtmlInputCheckBox)e.Item.FindControl("chkList");
                chkList.Value = dr["TransactionID"].ToString();

                HyperLink lnkTransactionNo = (HyperLink)e.Item.FindControl("lnkTransactionNo");
                lnkTransactionNo.Text = dr["TransactionNo"].ToString();
                lnkTransactionNo.NavigateUrl = Constants.ROOT_DIRECTORY + "/Reports/Default.aspx?task=transaction&tranno=" + dr["TransactionNo"].ToString() + "&termno=" + dr["TerminalNo"].ToString() + "&branchid=" + dr["BranchID"].ToString();

                Label lblTransactionDate = (Label)e.Item.FindControl("lblTransactionDate");
                lblTransactionDate.Text = DateTime.Parse(dr["TransactionDate"].ToString()).ToString("dd-MMM-yyyy hh:mm tt");

                Label lblCreditReason = (Label)e.Item.FindControl("lblCreditReason");
                lblCreditReason.Text = dr["CreditReason"].ToString();

                Label lblCredit = (Label)e.Item.FindControl("lblCredit");
                lblCredit.Text = decimal.Parse(dr["Credit"].ToString()).ToString("#,##0.#0");

                Label lblCreditPaid = (Label)e.Item.FindControl("lblCreditPaid");
                lblCreditPaid.Text = decimal.Parse(dr["CreditPaid"].ToString()).ToString("#,##0.#0");

                Label lblBalance = (Label)e.Item.FindControl("lblBalance");
                lblBalance.Text = decimal.Parse(dr["Balance"].ToString()).ToString("#,##0.#0");

            }
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:34,代码来源:_Details.ascx.cs


示例10: dlDoctors_ItemDataBound

        protected void dlDoctors_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView drv = (DataRowView)e.Item.DataItem;

                //LinkButton lbtnDoctor = (LinkButton)e.Item.FindControl("lbtnDoctor");
                Label lblDoctor = (Label)e.Item.FindControl("lblDoctor");

                //Are we getting Health Grades details, or manually provided details?
                if (drv["DataSource"].ToString() == "Local")
                {
                    //Local manually populated list:
                    //lbtnDoctor.Text = drv["DoctorName"].ToString();
                    //lbtnDoctor.CommandName = "Select";
                    //lbtnDoctor.CommandArgument = drv["DoctorName"].ToString();//Will need something better than this probably.
                    lblDoctor.Text = drv["DoctorName"].ToString();
                }
                else
                {
                    //Health Grades:
                    //lbtnDoctor.Text = drv["LastName"].ToString() + ", " + drv["FirstName"].ToString() + " " + drv["Degree"].ToString();
                    //lbtnDoctor.CommandName = "Select";
                    //lbtnDoctor.CommandArgument = drv["ProviderID"].ToString() + "|" + drv["NPI"].ToString();
                    lblDoctor.Text = string.Format("{0}, {1} {2}",
                        drv["LastName"],
                        drv["FirstName"],
                        drv["Degree"]);
                }
            }
        }
开发者ID:reydavid47,项目名称:GITHUB,代码行数:31,代码来源:sc_results_care_detail.aspx.cs


示例11: DlManufacturers_OnItemDataBound

        protected void DlManufacturers_OnItemDataBound(object sender, DataListItemEventArgs e)
        {
            if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var manufacturer = e.Item.DataItem as Manufacturer;
                string manufacturerURL = SEOHelper.GetManufacturerUrl(manufacturer);

                var hlImageLink = e.Item.FindControl("hlImageLink") as HyperLink;
                if(hlImageLink != null)
                {
                    hlImageLink.ImageUrl = this.PictureService.GetPictureUrl(manufacturer.PictureId, this.SettingManager.GetSettingValueInteger("Media.Manufacturer.ThumbnailImageSize", 125), true);
                    hlImageLink.NavigateUrl = manufacturerURL;
                    hlImageLink.ToolTip = String.Format(GetLocaleResourceString("Media.Manufacturer.ImageLinkTitleFormat"), manufacturer.LocalizedName);
                    hlImageLink.Text = String.Format(GetLocaleResourceString("Media.Manufacturer.ImageAlternateTextFormat"), manufacturer.LocalizedName);
                }

                var hlManufacturer = e.Item.FindControl("hlManufacturer") as HyperLink;
                if(hlManufacturer != null)
                {
                    hlManufacturer.NavigateUrl = manufacturerURL;
                    hlManufacturer.ToolTip = String.Format(GetLocaleResourceString("Media.Manufacturer.ImageLinkTitleFormat"), manufacturer.LocalizedName);
                    hlManufacturer.Text = Server.HtmlEncode(manufacturer.LocalizedName);
                }
            }
        }
开发者ID:robbytarigan,项目名称:ToyHouse,代码行数:25,代码来源:Manufacturers.aspx.cs


示例12: dlstOrderItems_ItemDataBound

        private void dlstOrderItems_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            SiteSettings siteSettings = SettingsManager.GetSiteSettings(HiContext.Current.User.UserId);

            if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
            {
                HyperLink link = (HyperLink)e.Item.FindControl("hpkBuyToSend");

                HyperLink link2 = (HyperLink)e.Item.FindControl("hpkBuyDiscount");

                Literal literal = (Literal)e.Item.FindControl("litPurchaseGiftId");

                Literal literal2 = (Literal)e.Item.FindControl("litWholesaleDiscountId");

                if (!string.IsNullOrEmpty(literal.Text))
                {
                    link.NavigateUrl = "http://" + siteSettings.SiteUrl + Globals.ApplicationPath + string.Format("/FavourableDetails.aspx?activityId={0}", literal.Text);
                }

                if (!string.IsNullOrEmpty(literal2.Text))
                {
                    link2.NavigateUrl = "http://" + siteSettings.SiteUrl + Globals.ApplicationPath + string.Format("/FavourableDetails.aspx?activityId={0}", literal2.Text);
                }

            }
        }
开发者ID:davinx,项目名称:himedi,代码行数:26,代码来源:Order_ItemsList.ascx.cs


示例13: dlFlight_ItemDataBound

        protected void dlFlight_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                AirLeg airLeg = (AirLeg)(((System.Object)(((System.Web.UI.WebControls.DataListItem)(e.Item)).DataItem)));

                if (!string.IsNullOrEmpty(airLeg.OperatingAirlineInfo))
                {
                    ((Label)e.Item.FindControl("lblOperatingAirline")).Visible = true;
                    ((Label)e.Item.FindControl("lblOperatingAirline")).Text = "Operated by: " + airLeg.OperatingAirlineInfo;

                    //if (flightInfohider.IsNeedToHide(airCode, fareType))
                    //{
                    //    ((Label)e.Item.FindControl("lblOperatingAirline")).Visible = false;

                    //    System.Web.UI.WebControls.Image imgCodeShared = (System.Web.UI.WebControls.Image)e.Item.Parent.Parent.FindControl("imgCodeShared");

                    //    imgCodeShared.Visible = false;
                    //}
                }
                else
                {
                    ((Label)e.Item.FindControl("lblOperatingAirline")).Visible = false;
                }
            }
        }
开发者ID:foxvirtuous,项目名称:MVB2C,代码行数:26,代码来源:PKGFlightViewControl.ascx.cs


示例14: DataListSzukaj_ItemDataBound

        protected void DataListSzukaj_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.DataItem == null) return;

            int ilosc = Int32.Parse(((DataRowView)e.Item.DataItem)["ilosc"].ToString());

            if (ilosc < 1) ((Button)e.Item.FindControl("ButtonDoKoszyka")).Enabled = false;

            MySqlConnection conn;
            MySqlCommand cmd;
            MySqlDataReader rdr;
            MySqlParameter param;

            conn = new MySqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["CS"].ConnectionString);

            conn.Open();

            cmd = new MySqlCommand("SELECT obrazek FROM produkty_obrazki WHERE produktID = @produktID LIMIT 1;");
            cmd.Connection = conn;

            param = new MySqlParameter("produktID", MySqlDbType.Int32);
            param.Value = ((DataRowView)e.Item.DataItem)["produktID"].ToString();
            cmd.Parameters.Add(param);

            rdr = cmd.ExecuteReader();

            while (rdr.Read())
            {
                ((Image)e.Item.FindControl("ImageObrazek")).ImageUrl = "~/images/products/" + ((DataRowView)e.Item.DataItem)["produktID"].ToString() + "/" + rdr.GetString(rdr.GetOrdinal("obrazek"));
            }

            conn.Close();
        }
开发者ID:taksun,项目名称:ASP,代码行数:33,代码来源:Search.aspx.cs


示例15: lstItem_ItemDataBound

        protected void lstItem_ItemDataBound(object sender, DataListItemEventArgs e)
		{
			if(e.Item.ItemType == ListItemType.Header)
			{
				LoadSortFieldOptions(e);
			}
			else if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
			{
                DataRowView dr = (DataRowView)e.Item.DataItem;
                ImageButton imgItemDelete = (ImageButton)e.Item.FindControl("imgItemDelete");
                ImageButton imgItemEdit = (ImageButton)e.Item.FindControl("imgItemEdit");

                HtmlInputCheckBox chkList = (HtmlInputCheckBox)e.Item.FindControl("chkList");
                chkList.Value = dr["DepartmentID"].ToString();
                imgItemDelete.Enabled = cmdDelete.Visible; if (!imgItemDelete.Enabled) imgItemDelete.ImageUrl = Constants.ROOT_DIRECTORY + "/_layouts/images/blank.gif";
                imgItemEdit.Enabled = cmdEdit.Visible; if (!imgItemEdit.Enabled) imgItemEdit.ImageUrl = Constants.ROOT_DIRECTORY + "/_layouts/images/blank.gif";
                if (imgItemDelete.Enabled) imgItemDelete.Attributes.Add("onClick", "return confirm_item_delete();");

                Label lblDepartmentCode = (Label)e.Item.FindControl("lblDepartmentCode");
				lblDepartmentCode.Text = dr["DepartmentCode"].ToString();

                HyperLink lnkDepartmentName = (HyperLink)e.Item.FindControl("lnkDepartmentName");
                lnkDepartmentName.Text = dr["DepartmentName"].ToString();
                lnkDepartmentName.NavigateUrl = "Default.aspx?task=" + Common.Encrypt("details", Session.SessionID) + "&id=" + Common.Encrypt(chkList.Value, Session.SessionID);

			}
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:27,代码来源:_List.ascx.cs


示例16: dlstVote_ItemDataBound

 public void dlstVote_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
     {
         long voteId = Convert.ToInt64(dlstVote.DataKeys[e.Item.ItemIndex]);
         VoteInfo voteById = StoreHelper.GetVoteById(voteId);
         IList<VoteItemInfo> voteItems = StoreHelper.GetVoteItems(voteId);
         for (int i = 0; i < voteItems.Count; i++)
         {
             if (voteById.VoteCounts != 0)
             {
                 voteItems[i].Percentage = decimal.Parse((voteItems[i].ItemCount * 100M / voteById.VoteCounts).ToString("F", CultureInfo.InvariantCulture));
             }
             else
             {
                 voteItems[i].Percentage = 0M;
             }
         }
         GridView view = (GridView)e.Item.FindControl("grdVoteItem");
         if (view != null)
         {
             view.DataSource = voteItems;
             view.DataBind();
         }
     }
 }
开发者ID:davinx,项目名称:himedi,代码行数:26,代码来源:Votes.aspx.cs


示例17: DataListSzczegoly2_ItemDataBound

 protected void DataListSzczegoly2_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     if (e.Item.DataItem != null)
     {
         suma += Decimal.Parse(((DataRowView)e.Item.DataItem)["ilosc"].ToString()) * Decimal.Parse(((DataRowView)e.Item.DataItem)["cena"].ToString());
     }
 }
开发者ID:taksun,项目名称:ASP,代码行数:7,代码来源:MyAcc.aspx.cs


示例18: lstAccessCategory_ItemDataBound

        protected void lstAccessCategory_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView dr = (DataRowView)e.Item.DataItem;

                Label lblCategory = (Label)e.Item.FindControl("lblCategory");
                lblCategory.Text = dr["Category"].ToString();

                DataList lstItem = (DataList)e.Item.FindControl("lstItem");
                if (cboGroup.ToolTip == "1") //check if load from cboGroup_SelectedIndexChanged
                {
                    AccessGroupRights clsAccessGroupRights = new AccessGroupRights();
                    lstItem.DataSource = clsAccessGroupRights.DataList(lblCategory.Text, int.Parse(cboGroup.SelectedValue), "Category, SequenceNo", SortOption.Ascending).DefaultView;
                    clsAccessGroupRights.CommitAndDispose();
                }
                else
                {
                    AccessRights clsAccessRights = new AccessRights();
                    lstItem.DataSource = clsAccessRights.DataList(lblCategory.Text, long.Parse(lblUID.Text), "Category, SequenceNo", SortOption.Ascending).DefaultView;
                    clsAccessRights.CommitAndDispose();
                }
                lstItem.DataBind();
            }
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:25,代码来源:_AccessRights.ascx.cs


示例19: uiDataListSchedule_ItemDataBound

        protected void uiDataListSchedule_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
            {
                DataRowView row = (DataRowView)e.Item.DataItem;
                if (Convert.ToInt32(row["AirPlane"].ToString()) == 1)
                {

                    HtmlGenericControl DivDetail = (HtmlGenericControl)e.Item.FindControl("Detail");
                    DivDetail.Attributes.CssStyle.Add("background-color","yellow");
                    DivDetail.Attributes.CssStyle.Add("color", "black");
                }
                else
                {
                    HtmlGenericControl DivDetail = (HtmlGenericControl)e.Item.FindControl("Detail");
                    DivDetail.Attributes.CssStyle.Add("background-color","green");
                    DivDetail.Attributes.CssStyle.Add("color", "white");
                }

                CultureInfo ci = CultureInfo.InvariantCulture;
                Label company = (Label)e.Item.FindControl("uiLabelCompany");
                Label CAA = (Label)e.Item.FindControl("uiLabelCAA");
                Label DutyHours = (Label)e.Item.FindControl("uiLabelDutyHours");
                TimeSpan Duty = new TimeSpan();
                if (row["ChoxOff"] != null && row["ChoxOn"] != null && (DateTime.Parse(row["ChoxOn"].ToString()).Subtract(DateTime.Parse(row["ChoxOff"].ToString())) != TimeSpan.Zero))
                {
                    DateTime choxon = DateTime.Parse(row["ChoxOn"].ToString());
                    DateTime choxoff = DateTime.Parse(row["ChoxOff"].ToString());
                    Duty = choxon.Subtract(choxoff);
                }
                else
                {
                    DateTime STD = DateTime.Parse(row["STD"].ToString());
                    DateTime STA = DateTime.Parse(row["STA"].ToString());
                    Duty = STA.Subtract(STD);
                }

                if (Companytotal == TimeSpan.Zero)
                {
                    Companytotal = Duty;
                }
                else
                {
                    Companytotal = Companytotal.Add(Duty);
                }

                if (DutyHoursTotal == TimeSpan.Zero)
                {
                    DutyHoursTotal = Duty.Add(new TimeSpan(1, 30, 0));
                }
                else
                {
                   DutyHoursTotal = DutyHoursTotal.Add(Duty.Add(new TimeSpan(1, 30, 0)));
                }
                company.Text = Duty.ToString("hh\\:mm");
                CAA.Text = company.Text;
                DutyHours.Text = Duty.Add(new TimeSpan(1,30,0)).ToString("hh\\:mm");

            }
        }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:60,代码来源:PilotSchedule.aspx.cs


示例20: DataListCateNews_ItemDataBound

 protected void DataListCateNews_ItemDataBound(object sender, DataListItemEventArgs e)
 {
     string Imgthumb = DataBinder.Eval(e.Item.DataItem, "ImageThumb").ToString();
     Literal ltlImageThumb = (Literal)e.Item.FindControl("ltlImageThumb");
     if (Imgthumb != "")
         ltlImageThumb.Text = @"<img src='" + ResolveUrl("~/") + "Upload/NewsGroup/NewsGroupThumb/" + Imgthumb + "' align='left' class='border_image' width='140' >";
 }
开发者ID:trungjc,项目名称:quanlyhocsinh,代码行数:7,代码来源:NewsgList.ascx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.DetailsView类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.DataListCommandEventArgs类代码示例发布时间: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