protected sealed override void Dispatch() { if (username == null || password == null) { throw new ArgumentNullException(); } PointOfSaleRoot.GetInstance().Login(username, password); }
protected sealed override void AccessControl() { PointOfSaleRoot root = PointOfSaleRoot.GetInstance(); User user = root.LoggedInUser; if (root.LoggedInUser == null) { throw new NoAuthorizationException(); } }
protected override void Dispatch() { loggedInUserRole = PointOfSaleRoot.GetInstance().LoggedInUser.Role; }
protected sealed override void Dispatch() { BasketCart basket = PointOfSaleRoot.GetInstance().BasketCart; totalPrice = basket.TotalPrice; }
protected override void Dispatch() { username = PointOfSaleRoot.GetInstance().LoggedInUser.Username; }