Esempio n. 1
0
 //GetInvoiceDetail
 public InvoiceDetail GetInvoiceDetail(long invoice_id)
 {
     return((from p in dataContext.spInvoice_Detail(invoice_id)
             select new InvoiceDetail
     {
         Amount = p.Amount,
         AuctionType = p.AuctionType_ID,
         BuyerPremium = p.BuyerPremium.GetValueOrDefault(0),
         DateCreated = p.DateCreated,
         Discount = p.Discount.GetValueOrDefault(0),
         Insurance = p.Insurance.GetValueOrDefault(0),
         Invoice_ID = p.Invoice_ID,
         LinkParams = new LinkParams {
             ID = p.Auction_ID, Lot = p.Lot, Title = p.Title, Event_ID = p.Event_ID, EventTitle = p.EventTitle, EventCategory_ID = p.EventCategory_ID, CategoryTitle = p.Category
         },
         Quantity = p.Quantity,
         Shipping = p.Shipping.GetValueOrDefault(0),
         Tax = p.Tax.GetValueOrDefault(0),
         Total = p.TotalDue.GetValueOrDefault(0),
         IsConsignorShip = p.IsConsignorShip,
         UserInvoice_ID = p.UserInvoices_ID
     }).FirstOrDefault());
 }