コード例 #1
0
        protected void InvoiceItemRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            InvoiceItem current = e.Item.DataItem as InvoiceItem;

            if (current != null)
            {
                if (current.GetArticle() != null)
                {
                    e.SetImage("MyPicture", current.GetArticle().PictureName1, current.GetArticle().GetPictureUrl(0));
                }

                e.SetLabel("AmountLabel", current.Amount.ToString("0.0"));
                e.SetLabel("ArticleNumberLabel", current.ArticleNumber);
                e.SetHyperLink("ArticleLink", current.ArticleName, PageUrlAttribute.Get <Articles.Default>(new Articles.Default.Query()
                {
                    SearchTerm = current.StockNumber
                }));
                e.SetLabel("PriceNetSingleLabel", current.SinglePriceNet.ToString("C"));
                e.SetLabel("SalesTaxSingleLabel", current.SingleSalesTax.ToString("C"));
                e.SetLabel("PriceGrossLabel", current.SinglePriceGross.ToString("C"));
                e.SetLabel("PriceGrossTotalLabel", current.TotalPriceGross.ToString("C"));
            }
        }