Exemplo n.º 1
0
        }                                                                                 // Name

        public override void Execute()
        {
            var oValidator = new ValidateMobileCode(this.mobilePhoneNumber, this.confirmationCode);

            oValidator.Execute();
            if (!oValidator.IsValidatedSuccessfully())
            {
                throw new StrategyWarning(this, "Failed to validate mobile code.");
            }

            var sp = new SpBrokerLoadOwnProperties(DB, Log)
            {
                ContactMobile = this.mobilePhoneNumber,
            };

            BrokerProperties props = sp.FillFirst <BrokerProperties>();

            if ((props == null) || (props.BrokerID == 0))
            {
                throw new StrategyWarning(this, string.Format(
                                              "No broker found with this phone number {0}.",
                                              this.mobilePhoneNumber
                                              ));
            }             // if

            Log.Debug("Broker properties search result for mobile phone {0}:\n{1}", this.mobilePhoneNumber, props);

            new BrokerPasswordRestored(props.BrokerID).Execute();
        }         // Execute
Exemplo n.º 2
0
        public BrokerLoadOwnProperties(string sContactEmail, CustomerOriginEnum origin)
        {
            m_oSp = new SpBrokerLoadOwnProperties(DB, Log)
            {
                ContactEmail  = sContactEmail,
                Origin        = (int)origin,
                BrokerID      = 0,
                ContactMobile = null,
            };

            Properties = new BrokerProperties();
        }         // constructor
Exemplo n.º 3
0
        }         // constructor

        public BrokerLoadOwnProperties(int brokerID)
        {
            m_oSp = new SpBrokerLoadOwnProperties(DB, Log)
            {
                ContactEmail  = null,
                Origin        = 0,
                BrokerID      = brokerID,
                ContactMobile = null,
            };

            Properties = new BrokerProperties();
        }         // constructor