コード例 #1
0
 public CommentController(IUserService userService)
 {
     this.userService = userService;
     this.userDAO     = new UserDAO();
     this.product2DAO = new Product2DAO();
     this.commentDAO  = new CommentDAO();
 }
コード例 #2
0
        public CustomOrderItem toCustomOrderItem(OrderItemEntity orderItemEntity)
        {
            CustomOrderItem csi         = new CustomOrderItem();
            Product2DAO     product2DAO = new Product2DAO();

            csi.productID = orderItemEntity.ProductId;
            Product2 productItem = product2DAO.getProduct(csi.productID);

            //csi.productImg = productItem.Images[0].Image;
            csi.productName = productItem.Name;
            csi.pricePerOne = (double)productItem.OriginalPrice;
            csi.quatity     = orderItemEntity.Quantity;
            csi.priceAll    = csi.computePriceAllByProduct();

            return(csi);
        }
コード例 #3
0
ファイル: TestRest.cs プロジェクト: ZhoangZ/dotnet-backend
 public TestRest(Product2DAO productDAO)
 {
     this.productDAO = productDAO;
 }
コード例 #4
0
ファイル: CartREST.cs プロジェクト: ZhoangZ/dotnet-backend
 public CartREST()
 {
     this.paymentDAO  = new PaymentDAO();
     this.cartDAO     = new CartDAO();
     this.product2DAO = new Product2DAO();
 }
コード例 #5
0
ファイル: ProductRest.cs プロジェクト: ZhoangZ/dotnet-backend
 public ProductRest()
 {
     this.ProductDAO = new Product2DAO();
     this.commentDAO = new CommentDAO();
 }
コード例 #6
0
ファイル: OrderREST.cs プロジェクト: ZhoangZ/dotnet-backend
 public OrderREST()
 {
     this.paymentDAO  = new PaymentDAO();
     this.orderDAO    = new OrderDAO();
     this.product2DAO = new Product2DAO();
 }