ref sUserID, ref sPassword, ref sDate, ref sServer, ref sSerial))Р{Р?Console.WriteLine("登陆失败,原因:" + u8Login.ShareString);Р?Marshal.Object(u8Login);Р?return;Р}Р然后,通过LOAD接口获取BO对象;Р//构造环境上下文对象,传入login,并按需设置其它上下文参数РU8EnvContext envContext = new U8EnvContext();РenvContext.U8Login = u8Login;Р//设置上下文参数Р……Р//设置API地址标识(Url)РU8ApiAddress myApiAddress = new U8ApiAddress(“装载单据的地址标识”);Р//构造APIBrokerРU8ApiBroker broker = new U8ApiBroker(myApiAddress, envContext);Р//API参数赋值Рbroker.AssignNormalValue("参数名", "参数值");Р……Р//调用LOAD接口APIРif (!broker.Invoke())Р{Р?//错误处理Р?Exception apiEx = broker.GetException();Р?if (apiEx != null)Р?{Р if (apiEx is MomSysException)Р {Р MomSysException sysEx = apiEx as MomSysException;Р Console.WriteLine("系统异常:" + sysEx.Message);Р //todo:异常处理Р }Р else if (apiEx is MomBizException)