public static ProductsViewer GetInstance(Employee empl)
        {
            if (State == null)
            {
                State = new ProductsViewer(empl);
            }
            if (State.employee.Id != empl.Id)
            {
                State = new ProductsViewer(empl);
            }

            ProductsOnStorage.Clear();
            if (State.GetNewContext.ifExecute())
            {
                State.GetNewContext.Execute();
            }
            return(State);
        }
Beispiel #2
0
 private void ShowAll_Click(object sender, RoutedEventArgs e)
 {
     ProductsObserverWorkSpace.Content = ProductsViewer.GetInstance(employee).Content;
 }
Beispiel #3
0
 ProductsObserver(Employee employee)
 {
     this.employee = employee;
     InitializeComponent();
     ProductsObserverWorkSpace.Content = ProductsViewer.GetInstance(employee).Content;
 }