示例#1
0
 private void olvCart_FormatCell(object sender, BrightIdeasSoftware.FormatCellEventArgs e)
 {
     if (e.ColumnIndex == 0)
     {
         Product product = (Product)e.Model;
         NamedDescriptionDecoration decorationCart = new NamedDescriptionDecoration();
         decorationCart.ImageList   = this.ilistShoppingCart;
         decorationCart.Title       = product.Name;
         decorationCart.ImageName   = Convert.ToString(product.ProductID);
         decorationCart.Description = product.ProductDescription;
         e.SubItem.Decoration       = decorationCart;
     }
 }
示例#2
0
 private void olvComments_FormatCell(object sender, BrightIdeasSoftware.FormatCellEventArgs e)
 {
     if (e.ColumnIndex == 0)
     {
         Comment comment = (Comment)e.Model;
         NamedDescriptionDecoration decorationComment = new NamedDescriptionDecoration();
         decorationComment.ImageList = this.ilistComment;
         Customer CommentOwner = CustomerAccess.GetCustomer(comment.CustomerID);
         decorationComment.Title       = CommentOwner.FirstName.Substring(0, 1).ToUpper() + CommentOwner.FirstName.Substring(1) + " " + CommentOwner.LastName.ToUpper();
         decorationComment.ImageName   = Convert.ToString(comment.CustomerID);
         decorationComment.Description = comment.CommentDescription;
         e.SubItem.Decoration          = decorationComment;
     }
 }