/// <summary>
		/// use stub to remove an Assignment via web services
		/// </summary>
		/// <param name="assignments">Assignments to delete, Array of TRemoveProductFromCatalog_Input</param>
		/// <returns>ArrayList of TRemoveProductFromCatalog_Return</returns>
		public ArrayList removeProductFromCatalog(TRemoveProductFromCatalog_Input[] assignments) 
		{
			TRemoveProductFromCatalog_Return[] Assignments_out = stub.removeProductFromCatalog(assignments);

			ArrayList result = new ArrayList();

			for(int i = 0; i < Assignments_out.Length; i++)
			{
				TRemoveProductFromCatalog_Return Assignment_out = Assignments_out[i];

				if (Assignment_out.Error == null) 
				{
					Console.WriteLine("successfully removed Assignment: " + Assignment_out.Catalog + "/" + Assignment_out.Product);
					result.Add(Assignment_out);
				} 
				else 
				{
					Console.WriteLine("an error occured (Epages Error):\n" + Assignment_out.Error.Message);
				}
			}

			return result;
		}
Esempio n. 2
0
 /// <remarks/>
 public System.IAsyncResult BeginremoveProductFromCatalog(TRemoveProductFromCatalog_Input[] Assignments, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("removeProductFromCatalog", new object[] {
                 Assignments}, callback, asyncState);
 }
Esempio n. 3
0
		/// <summary>
		/// remove assignment of Catalog and Product
		/// </summary>
		public void removeProductFromCatalog()
		{
			TRemoveProductFromCatalog_Input Assignment = new TRemoveProductFromCatalog_Input();
			Assignment.Catalog = catalog;
			Assignment.Product = product;
			TRemoveProductFromCatalog_Input[] Assignments = new TRemoveProductFromCatalog_Input[]{Assignment};
			
			ArrayList Assignments_out = serviceClient.removeProductFromCatalog(Assignments);

			// test if deletion was successful
			Assert.AreEqual(1, Assignments_out.Count, "removeProductFromCatalog result set");

			TRemoveProductFromCatalog_Return Assignment_out = (TRemoveProductFromCatalog_Return)Assignments_out.ToArray()[0];
			Assert.AreEqual(product, Assignment_out.Product, "Product path");
			Assert.AreEqual(true, Assignment_out.removed, "removed?");
		}
Esempio n. 4
0
 public TRemoveProductFromCatalog_Return[] removeProductFromCatalog(TRemoveProductFromCatalog_Input[] Assignments) {
     object[] results = this.Invoke("removeProductFromCatalog", new object[] {
                 Assignments});
     return ((TRemoveProductFromCatalog_Return[])(results[0]));
 }