Example #1
0
 private bool CanAdd()
 {
     return(!string.IsNullOrWhiteSpace(User) &&
            !string.IsNullOrWhiteSpace(Email) &&
            !string.IsNullOrWhiteSpace(Event) &&
            !string.IsNullOrWhiteSpace(PurchaseDate.ToString()) &&
            !string.IsNullOrWhiteSpace(Amount.ToString()));
 }
Example #2
0
        public override string ToString()
        {
            StringBuilder result = new StringBuilder();

            if (IsSetAmazonOrderId())
            {
                result.Append("Order ID: ");
                result.AppendLine(AmazonOrderId);
            }
            if (IsSetFulfillmentChannel())
            {
                result.Append("FulfillmentChannel:");
                result.AppendLine(FulfillmentChannel.ToString());
            }
            if (IsSetNumberOfItemsShipped())
            {
                result.Append("Number of Items Shipped: ");
                result.AppendLine(NumberOfItemsShipped.ToString());
            }
            if (IsSetNumberOfItemsUnshipped())
            {
                result.Append("Number of Items Not Shipped: ");
                result.AppendLine(NumberOfItemsShipped.ToString());
            }
            if (IsSetLastUpdateDate())
            {
                result.Append("Last Update Date: ");
                result.AppendLine(LastUpdateDate.ToString());
            }
            if (IsSetOrderChannel())
            {
                result.Append("Order Channel: ");
                result.AppendLine(OrderChannel);
            }
            if (IsSetOrderStatus())
            {
                result.Append("Order Status: ");
                result.AppendLine(OrderStatus.ToString());
            }
            if (IsSetOrderTotal())
            {
                result.Append("Order Total: ");
                result.AppendLine(OrderTotal.ToString());
            }
            if (IsSetPurchaseDate())
            {
                result.Append("Purchase Date: ");
                result.AppendLine(PurchaseDate.ToString());
            }
            if (IsSetSalesChannel())
            {
                result.Append("Sales Channel: ");
                result.AppendLine(SalesChannel);
            }
            if (IsSetSellerOrderId())
            {
                result.Append("Seller Order Id: ");
                result.AppendLine(SellerOrderId);
            }
            if (IsSetShipServiceLevel())
            {
                result.Append("Ship Service Level: ");
                result.AppendLine(ShipServiceLevel);
            }
            if (IsSetPaymentExecutionDetail())
            {
                result.Append("Payment Execution Detail: ");
                result.Append(PaymentExecutionDetail);
            }
            if (IsSetPaymentMethod())
            {
                result.Append("Payment Method: ");
                result.Append(PaymentMethod);
            }
            if (IsSetMarketplaceId())
            {
                result.Append("Marketplace Id: ");
                result.AppendLine(MarketplaceId);
            }
            if (IsSetBuyerEmail())
            {
                result.Append("Buyer Email: ");
                result.AppendLine(BuyerEmail);
            }
            if (IsSetShipServiceLevel())
            {
                result.Append("Buyer Name: ");
                result.AppendLine(BuyerName);
            }
            if (IsSetShipmentServiceLevelCategory())
            {
                result.Append("Shipment Service Level Category: ");
                result.AppendLine(ShipmentServiceLevelCategory);
            }
            if (IsSetCbaDisplayableShippingLabel())
            {
                result.Append("CbaDisplayableShippingLabel: ");
                result.AppendLine(this.CbaDisplayableShippingLabel);
            }
            if (IsSetOrderType())
            {
                result.Append("OrderType: ");
                result.AppendLine(this.OrderType);
            }
            if (IsSetEarliestShipDate())
            {
                result.Append("EarliestShipDate: ");
                result.AppendLine(this.EarliestShipDate.ToString());
            }
            if (IsSetLatestShipDate())
            {
                result.Append("LatestShipDate: ");
                result.AppendLine(this.LatestShipDate.ToString());
            }
            return(result.ToString());
        }
        //METHOD USED TO GET INFORMATION ABOUT OBJECT
        public override string ToString()
        {
            string result = "ID: " + Index.ToString() + ". Data zakupu: " + PurchaseDate.ToString() + ". Koszt: " + PurchasePrice + ".";

            return(result);
        }