天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.0 KiB

using System;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.ServicesAgent;
namespace QMTask.DataDeal
{
/// <summary>
/// 服务调用工具
/// 创建者:王丹丹
/// 创建时间:2015-03-17
/// </summary>
public class ServiceUtil
{
#region 获取服务代理
public ServiceAgent GetServiceAgent()
{
try
{
//创建代理
ServiceAgent agent = new ServiceAgent();
//设置凭据
agent.ClientCredential = new QMFrameWork.ServiceInterface.CredentialInfo();
if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["ServiceCredential"]) == false)
agent.ClientCredential.CredentialID = ConfigurationManager.AppSettings["ServiceCredential"];
return agent;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}