private void backgroundWorkerSendUdbudshaendelse_DoWork(object sender, DoWorkEventArgs e) { backgroundWorkerSendUdbudshaendelse.ReportProgress(0, "Sender udbudshændelse"); try { HaendelseIndsendResponseType response = URS_Utils.HaendelseIndsend(miljoe, partyID, password, haendelseType, systemleverandoerid); backgroundWorkerSendUdbudshaendelse.ReportProgress(0, "OK"); } catch (Exception f) { backgroundWorkerSendUdbudshaendelse.ReportProgress(0, "Fejl ved send af udbudshændelse: " + f.Message); } }
public static PrisModelURSClient GetPrisModelURSClient(Miljoe miljoe, string partyID, string password, string endpointAddress) { PrisModelURSClient client = new PrisModelURSClient(); client.Endpoint.Behaviors.Add(new CustomBehavior(partyID)); client.Endpoint.Behaviors.Add(new ClientViaBehavior(new Uri(URS_Utils.GetEndpointAddress(miljoe)))); SetClientCredentials(client.ClientCredentials, partyID, password); System.ServiceModel.EndpointAddress addr = new System.ServiceModel.EndpointAddress(endpointAddress); client.Endpoint.Address = addr; return(client); }