public SMSCheckItem CheckSMS(string login, string password, Guid id, string clientId = null) { SMSCheckItem result = null; Guid? user = SenderService.Login(login, password); if (user != null) { result = SenderService.CheckSMSStatus(user.Value, id: id, clientId: clientId).FirstOrDefault(); } else { throw new Exception(Resources.Error_LoginFailed); } return(result); }
public SMSCheckItem CheckSMS(string login, string password, Guid id) { SMSCheckItem result = null; if (Membership.ValidateUser(login, password)) { MembershipUser mu = Membership.GetUser(login); long? cid = ClientRepo.GetClientProjected((Guid)mu.ProviderUserKey).Id; if (cid != null) { result = _gateService.CheckSMS(Settings.Default.GateUserName, Settings.Default.GatePassword, id, cid.Value.ToString()); } } else { throw new Exception(Resources.Error_LoginFailed); } return(result); }