Exemplo n.º 1
0
        public static Context CreateContext(RequestBuilder request)
        {
            var context = request.AddContext();

            context.CompanyNo = CompanyNo;
            context.CultureId = CultureId;

            context.UserName = "******"; // We log on as another user, but get system-user's rights :-)

            return(context);
        }
Exemplo n.º 2
0
        public VbClient()
        {
            // Set credentials
            Credentials cred = new Credentials("standard", Config.VbAuthUser, Config.VbAuthPassword);

            cred.Apply(_serviceClient.ClientCredentials);

            // Create request
            Request           = new RequestBuilder();
            Context           = Request.AddContext();
            Context.UserName  = Config.VbContextUser;
            Context.CompanyNo = Config.VbCompanyNumber;
            Context.CultureId = CultureId.Swedish__Sweden;
        }