Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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 { }
                }
            }
        }
Esempio n. 3
0
        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);
            }
        }