Exemplo n.º 1
0
		public void Init()
		{
			Console.WriteLine("Init");

			// set up the web service object
			shopConfigService = new ShopConfigService();
			shopConfigService.Credentials = new System.Net.NetworkCredential(WEBSERVICE_LOGIN, WEBSERVICE_PASSWORD);
			shopConfigService.PreAuthenticate = true;
			shopConfigService.Url = WEBSERVICE_URL;

			CleanUp();
		}
        private void deleteIfExists(string alias)
        {
            ShopConfigService shopConfigService = new ShopConfigService();
            shopConfigService.Credentials = new System.Net.NetworkCredential(WEBSERVICE_LOGIN, WEBSERVICE_PASSWORD);
            shopConfigService.PreAuthenticate = true;
            shopConfigService.Url = WEBSERVICE_URL;

            EpagesProviderWebServices.ShopConfigService6Ref.TShopRef shopRef = new EpagesProviderWebServices.ShopConfigService6Ref.TShopRef();
            shopRef.Alias = ALIAS;
            if (shopConfigService.exists(shopRef))
            {
                shopConfigService.deleteShopRef(shopRef);
            }

            shopRef.Alias = NEW_ALIAS;
            if (shopConfigService.exists(shopRef))
            {
                shopConfigService.deleteShopRef(shopRef);
            }
        }