13,347
社区成员
发帖
与我相关
我的任务
分享
public static TvosServiceRef.TvosServiceClient _proxy; //服务对象
public static TvosServiceRef.TvosServiceClient proxy
{
get
{
try
{
if (_proxy == null)
{
_proxy = new TvosServiceRef.TvosServiceClient();
_proxy.Open();
}
// Faulted,Created,Opened,Closed
if (_proxy.State.ToString().ToLower() != "opened")
{
_proxy.Abort();
_proxy = null;
_proxy = new TvosServiceRef.TvosServiceClient();
_proxy.Open();
}
}
catch (Exception ex)
{
//Common.DisplayMsg("系统提示",);
}
return _proxy;
}
set { _proxy = value; }
}
try
{
dt = Common.proxy.GetDataSourceList(out sEx);
}
catch (Exception ex)
{
dt = Common.proxy.GetDataSourceList(out sEx);
}