Örnek Add Method Kodu C#
Örnek Add Method Kodu c#
class Program
{
static void Main(string[] args)
{
BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress endpoint = new EndpointAddress("http://axataintegrationservicestest.azurewebsites.net/AxataServicePool.svc");
ServiceReference1.AxataServicePoolClient client = new ServiceReference1.AxataServicePoolClient(binding,endpoint);
ServiceReference1.FirmAddress firmAddress = new ServiceReference1.FirmAddress();
List<ServiceReference1.FirmAddress> firmAddressList = new List<ServiceReference1.FirmAddress>();
ServiceReference1.addFirmAddress_Res res = new ServiceReference1.addFirmAddress_Res();
firmAddress.ENT002_ADR = new ServiceReference1.ENT002_ADR
{
S02SKOD = "01",
S02BAYK = "T001",
S02SIRA = "01",
S02ADR1 = "ADRES 1",
S02ADR2 = "",
S02IKOD = "34",
S02SEMT = "KADIKOY"
};
firmAddressList.Add(firmAddress);
string message;
var result = client.addFirmAddress("axataservice", "", firmAddressList.ToArray(), out message, out res.processResult);
if (result == 0)
Console.WriteLine("Genel Sonuc : " + message);
else
{
Console.WriteLine("Genel Sonuc : " + message);
foreach (ServiceReference1.ProcessResult processResults in res.processResult)
{
Console.WriteLine("Sirket: " + processResults.EntityCompany);
Console.WriteLine("Dokuman: " + processResults.EntityCode);
Console.WriteLine("Durum : " + processResults.LogMessage);
Console.WriteLine("\n");
}
}
Console.ReadKey();
}
}