using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace QMAPP.ServicesAgent.LoginService
{
public partial class LoginServiceClient
{
///
/// 登录验证,主登录服务+备用模式
/// 主登录服务无法正常工作时采用备用登录服务
///
///
///
///
public static LoginInfo _IsLogin(LoginInfo login, QMFrameWork.ServiceInterface.CredentialInfo credential)
{
try
{
var mainclient = new LoginServiceClient("BasicHttpBinding_ILoginService_Platform"); //先调用平台登录服务
return mainclient.IsLogin(login, credential);
}
catch (Exception ex) //平台登录服务无法登录
{
var backupclient = new LoginServiceClient("BasicHttpBinding_ILoginService");//调用子系统登录服务
return backupclient.IsLogin(login, credential);
}
}
///
/// 登录验证,主登录服务+备用模式
/// 主登录服务无法正常工作时采用备用登录服务
///
///
///
///
public static LoginInfo _GetLoginInfo(QMFrameWork.ServiceInterface.CredentialInfo credential)
{
try
{
var mainclient = new LoginServiceClient("BasicHttpBinding_ILoginService_Platform"); //先调用平台登录服务
return mainclient.GetLoginInfo(credential);
}
catch (Exception ex) //平台登录服务无法登录
{
var backupclient = new LoginServiceClient("BasicHttpBinding_ILoginService");//调用子系统登录服务
return backupclient.GetLoginInfo(credential);
}
}
}
}