Exemplo n.º 1
0
 public OrderBag(DataContext dataContext, string sellerId, string shopId, OrderTypeEnum orderType, string buyerId)
 {
     _dataContext = dataContext;
     buyerId      = buyerId.HasValue() ? buyerId : dataContext.UserId;
     Order        = new Entity.order()
     {
         ShopID       = shopId,
         SellerID     = sellerId,
         BuyerID      = buyerId,
         OrderTime    = DateTime.Now,
         OrderID      = DateTime.Now.Random(),
         OrderStateID = OrderStateEnum.Created.Parse(),
         OrderTypeID  = OrderTypeEnum.Normal.Parse(),
         order_item   = new List <order_item>()
     };
 }
Exemplo n.º 2
0
 public OrderBag(DataContext dataContext, Entity.order order)
 {
     Order        = order;
     _dataContext = dataContext;
 }