internal static MBProxi.PBCustomerInfo AuthWithoutWindow(long id) { MBProxi.PBCustomerInfo result = null; try { if (id > 0) { using (CardServiceClient client = GetWCFClient()) { if (client != null && client.Online()) { var response = client.PBCustomerAuth(id); if (response != null && response.Result != null) { if (response.Result.Auth) { result = response.Result; } } } } } } catch { } return(result); }
void digitKeyboardOkClc(object sender, double Value) { if (digitKeyboard.CurentDouble > 0) { long validationCode = (long)digitKeyboard.CurentDouble; if (_lastId != validationCode) { try { _lastId = validationCode; using (CardServiceClient client = GetWCFClient()) { if (client != null && client.Online()) { var response = client.PBCustomerAuth(validationCode); if (response != null && response.Result != null) { if (response.Result.Auth) { ProcUser = response.Result; Out(); } else { this.footerText.Foreground = Brushes.Black; this.footerText.Text = " Гость не найден"; } } else { this.footerText.Foreground = Brushes.Red; this.footerText.Text = " Ошибка ответа сервиса"; } } else { this.footerText.Foreground = Brushes.Red; this.footerText.Text = " CardService offline"; } } } catch { } } } }
public bool UsingMB() { return(true); if (client == null) { return(false); } try { bool res = client.Online(); Utils.ToCardLog("UsingMB " + res); return(res); } catch (Exception e) { Utils.ToCardLog("Error UsingMB " + e.Message); return(false); } }