Exemplo n.º 1
0
        public void Init()
        {
            serviceClient = new OrderServiceClient();

            // create test Orders that can be used with the create and update methods
            Order_in.Alias             = alias;
            Order_in.Customer          = "/Shops/DemoShop/Customers/1001";
            Order_in.CreationDate      = new DateTime(2006, 1, 1, 12, 0, 0, DateTimeKind.Local);
            Order_in.ViewedOn          = new DateTime(2006, 1, 1, 23, 59, 0, DateTimeKind.Local);
            Order_in.ViewedOnSpecified = true;

            TProductLineItemIn productLineItem = new TProductLineItemIn();

            productLineItem.Product           = "/Shops/DemoShop/Products/ho_1112105010";
            productLineItem.Quantity          = 10;
            productLineItem.QuantitySpecified = true;
            TLineItemContainerIn lineItemContainer = new TLineItemContainerIn();

            lineItemContainer.CurrencyID       = "EUR";
            lineItemContainer.PaymentMethod    = "/Shops/DemoShop/PaymentMethods/Invoice";
            lineItemContainer.ShippingMethod   = "/Shops/DemoShop/ShippingMethods/Express";
            lineItemContainer.TaxArea          = "/TaxMatrixGermany/EU";
            lineItemContainer.TaxModel         = "gross";
            lineItemContainer.ProductLineItems = new TProductLineItemIn[] { productLineItem };
            Order_in.LineItemContainer         = lineItemContainer;

            TAddress bill = new TAddress();

            bill.FirstName           = "Klaus";
            bill.LastName            = "Klaussen";
            bill.Street              = "Musterstraße 2";
            bill.EMail               = "*****@*****.**";
            bill.Birthday            = new DateTime(1976, 9, 25, 11, 33, 0, DateTimeKind.Local);
            bill.BirthdaySpecified   = true;
            bill.VerifiedOn          = new DateTime(2005, 1, 1, 0, 0, 0, DateTimeKind.Local);
            bill.VerifiedOnSpecified = true;
            Order_in.BillingAddress  = bill;

            TAttribute attr = new TAttribute();

            attr.Name           = "Comment";
            attr.Value          = "my Order comment";
            Order_in.Attributes = new TAttribute[] { attr };



            Order_update.Path                  = path + alias;
            Order_update.CreationDate          = new DateTime(2006, 1, 1, 2, 2, 2, DateTimeKind.Local);
            Order_update.CreationDateSpecified = true;
            Order_update.ViewedOn              = new DateTime(2006, 1, 2, 0, 0, 0, DateTimeKind.Local);
            Order_update.ViewedOnSpecified     = true;

            TAddress bill_update = new TAddress();

            bill_update.FirstName           = "Hans";
            bill_update.LastName            = "Hanssen";
            bill_update.Street              = "Musterstraße 2b";
            bill_update.Birthday            = new DateTime(1976, 9, 25, 11, 33, 0, DateTimeKind.Local);
            bill_update.BirthdaySpecified   = true;
            bill_update.VerifiedOn          = new DateTime(2005, 1, 1, 0, 0, 0, DateTimeKind.Local);
            bill_update.VerifiedOnSpecified = true;
            Order_update.BillingAddress     = bill_update;

            TAttribute attr_update = new TAttribute();

            attr_update.Name        = "Comment";
            attr_update.Value       = "my updated Order comment";
            Order_update.Attributes = new TAttribute[] { attr_update };
        }
Exemplo n.º 2
0
		public void Init()
		{
			serviceClient = new OrderServiceClient();
			
			// create test Orders that can be used with the create and update methods
			Order_in.Alias              = alias;
			Order_in.Customer           = "/Shops/DemoShop/Customers/1001";
            Order_in.CreationDate = new DateTime(2006, 1, 1, 12, 0, 0, DateTimeKind.Local);
            Order_in.ViewedOn = new DateTime(2006, 1, 1, 23, 59, 0, DateTimeKind.Local);
            Order_in.ViewedOnSpecified  = true;

			TProductLineItemIn productLineItem      = new TProductLineItemIn();
			    productLineItem.Product             = "/Shops/DemoShop/Products/ho_1112105010";
			    productLineItem.Quantity            = 10;
                productLineItem.QuantitySpecified   = true;
            TLineItemContainerIn lineItemContainer  = new TLineItemContainerIn();
			    lineItemContainer.CurrencyID        = "EUR";
			    lineItemContainer.PaymentMethod     = "/Shops/DemoShop/PaymentMethods/Invoice";
			    lineItemContainer.ShippingMethod    = "/Shops/DemoShop/ShippingMethods/Express";
			    lineItemContainer.TaxArea           = "/TaxMatrixGermany/EU";
			    lineItemContainer.TaxModel          = "gross";
			    lineItemContainer.ProductLineItems  = new TProductLineItemIn[]{productLineItem};
			Order_in.LineItemContainer              = lineItemContainer;

			TAddress bill                   = new TAddress();
			    bill.FirstName              = "Klaus";
			    bill.LastName               = "Klaussen";
			    bill.Street                 = "Musterstraße 2";
			    bill.EMail                  = "*****@*****.**";
                bill.Birthday = new DateTime(1976, 9, 25, 11, 33, 0, DateTimeKind.Local);
                bill.BirthdaySpecified      = true;
                bill.VerifiedOn = new DateTime(2005, 1, 1, 0, 0, 0, DateTimeKind.Local);
                bill.VerifiedOnSpecified    = true;
            Order_in.BillingAddress         = bill;

			TAttribute attr     = new TAttribute();
			    attr.Name       = "Comment";
			    attr.Value      = "my Order comment";
			Order_in.Attributes = new TAttribute[]{attr};


            
            Order_update.Path                   = path + alias;
            Order_update.CreationDate = new DateTime(2006, 1, 1, 2, 2, 2, DateTimeKind.Local);
            Order_update.CreationDateSpecified  = true;
            Order_update.ViewedOn = new DateTime(2006, 1, 2, 0, 0, 0, DateTimeKind.Local);
            Order_update.ViewedOnSpecified      = true;

			TAddress bill_update                = new TAddress();
			    bill_update.FirstName           = "Hans";
			    bill_update.LastName            = "Hanssen";
			    bill_update.Street              = "Musterstraße 2b";
                bill_update.Birthday = new DateTime(1976, 9, 25, 11, 33, 0, DateTimeKind.Local);
                bill_update.BirthdaySpecified   = true;
                bill_update.VerifiedOn = new DateTime(2005, 1, 1, 0, 0, 0, DateTimeKind.Local);
                bill_update.VerifiedOnSpecified = true;
            Order_update.BillingAddress         = bill_update;

			TAttribute attr_update  = new TAttribute();
			    attr_update.Name    = "Comment";
			    attr_update.Value   = "my updated Order comment";
			Order_update.Attributes = new TAttribute[]{attr_update};
		}