예제 #1
0
        private static void SetFixedParameters(SZKingdomRequest function, List <SZKingdomArgument> inputParameters)
        {
            //todo: add more required fixed parameters here.
            string operatorCode = Configuration.OperatorCode;
            string operatorRole = Configuration.OperatorRole;

            foreach (SZKingdomArgument argument in inputParameters)
            {
                if (argument.Name.Equals(NullCustomerCodeArgument.Name) && !string.IsNullOrWhiteSpace(argument.Value))
                {
                    operatorCode = argument.Value;
                    operatorRole = UserRole.Customer.InternalValue;
                }
            }
            inputParameters.Add(SZKingdomArgument.OperatorCode(operatorCode));
            inputParameters.Add(SZKingdomArgument.OperatorRole(operatorRole));
            inputParameters.Add(SZKingdomArgument.OperateChannel(Configuration.Channel));
            inputParameters.Add(SZKingdomArgument.OperatorSite(Configuration.OperatorSite));
            inputParameters.Add(SZKingdomArgument.OperateOrganization(Configuration.OperateOrganization));
            inputParameters.Add(SZKingdomArgument.FunctionNo(function.InternalValue));
            inputParameters.Add(SZKingdomArgument.RunTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")));
        }