private void SetCredentials() { partyID = userControlLogon1.PartID; password = userControlLogon1.Password; miljoe = userControlLogon1.Miljoe; systemleverandoerid = userControlLogon1.SystemleverandoerID; }
public static MainClient GetMainClient(Miljoe miljoe) { MainClient client = new MainClient(); client.Endpoint.Address = new System.ServiceModel.EndpointAddress(RKNet_Utils.GetEndpointAddress(miljoe)); return(client); }
public static ValidatePartyResponse GetValidatePartyResponse(Miljoe miljoe, string partyID, string password) { ServiceReferenceTBIS.MainClient client = GetMainClient(miljoe); client.ClientCredentials.UserName.UserName = partyID; client.ClientCredentials.UserName.Password = password; ValidatePartyResponse response = client.validateParty(partyID, password); return(response); }
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); }
public static string GetEndpointAddress(Miljoe miljoe) { string s; switch (miljoe) { case Miljoe.Produktion: s = "https://tbisws.e-nettet.dk/TBISWS/Main"; break; case Miljoe.Test: s = "https://test-tbisws.e-nettet.dk/TBISWS/Main"; break; default: s = ""; break; } return(s); }