Ejemplo n.º 1
0
 public TUpdate_Return[] update(TUpdate_Input[] ProductTypes) {
     object[] results = this.Invoke("update", new object[] {
                 ProductTypes});
     return ((TUpdate_Return[])(results[0]));
 }
Ejemplo n.º 2
0
 /// <remarks/>
 public System.IAsyncResult Beginupdate(TUpdate_Input[] ProductTypes, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("update", new object[] {
                 ProductTypes}, callback, asyncState);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// test update
        /// </summary>
        public void testUpdate()
        {
            Console.WriteLine("ProductTypeTest: testUpdate start");

            TUpdate_Input update1 = new TUpdate_Input();
            update1.Path = NET_TEST1_PATH;
            update1.LayoutContentBundles = "BundlesTable";
            TLocalizedValue name1_de = new TLocalizedValue();
            name1_de.LanguageCode = "de";
            name1_de.Value = NET_TEST1_NAME_DE + "updated";
            update1.Name = new TLocalizedValue[] { name1_de };

            TUpdate_Return[] productTypes = productTypeService.update(new TUpdate_Input[] { update1});
            Assert.AreEqual(1, productTypes.Length);
            Assert.AreEqual(NET_TEST1_PATH, productTypes[0].Path);
            Assert.IsNull(productTypes[0].Error);
            Assert.IsTrue(productTypes[0].updated);

            TGetInfo_Return[] result = productTypeService.getInfo(
                new String[] { NET_TEST1_PATH },
                new String[] { },
                new String[] { "de", "en" });

            Assert.AreEqual(1, result.Length);
            Assert.AreEqual(NET_TEST1_PATH, result[0].Path);
            Assert.IsNull(result[0].Error);
            Assert.AreEqual(NET_TEST1_ALIAS, result[0].Alias);
            Assert.AreEqual("BundlesTable", result[0].LayoutContentBundles);
            TLocalizedValue[] names = result[0].Name;
            Assert.AreEqual(2, names.Length);
            Assert.AreEqual("de", names[0].LanguageCode);
            Assert.AreEqual(NET_TEST1_NAME_DE + "updated", names[0].Value);
            Assert.AreEqual("en", names[1].LanguageCode);
            Assert.AreEqual(NET_TEST1_NAME_EN, names[1].Value);
            
            Console.WriteLine("ProductTypeTest: testUpdate end");
        }