Beispiel #1
0
        public CustomerPresenter(ICustomerGui screen)
        {
            _screen = screen;
            _screen.Register(this);

            _screen.EnableControls(false); // Disables textboxes until user selects a customer or clicks 'New'
        }
Beispiel #2
0
        public void txtCustomerId_TextChanged()
        {
            if (_screen.CustomerId == "new")
            {
                _customer = new Customer();
            }
            else
            {
                _customer = new Customer(_screen.CustomerId);
            }

            _screen.CustomerName = _customer.Name;
            _screen.Address      = _customer.Address;
            _screen.Town         = _customer.Town;
            _screen.PostCode     = _customer.PostCode;
            _screen.Telephone    = _customer.Telephone;
            _screen.Mobile       = _customer.Mobile;
            _screen.Registered   = _customer.Registered;

            _screen.EnableControls(true);
        }