private void SetCredentials()
 {
     partyID             = userControlLogon1.PartID;
     password            = userControlLogon1.Password;
     miljoe              = userControlLogon1.Miljoe;
     systemleverandoerid = userControlLogon1.SystemleverandoerID;
 }
Beispiel #2
0
        public static MainClient GetMainClient(Miljoe miljoe)
        {
            MainClient client = new MainClient();

            client.Endpoint.Address = new System.ServiceModel.EndpointAddress(RKNet_Utils.GetEndpointAddress(miljoe));
            return(client);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }