private void OpenCustomerSelectionView(object parameter)
 {
     var view = new CustomerViewModel();
     view.View.ControlMode = ControlMode.Selection;
     if (Terminal.Instance.Session.Rules.IsValid(Rules.IsTerminalZero))
     {
         view.View.ControlMode |= ControlMode.Update;
     }
     Terminal.Instance.Client.ShowDialog(view.View,null, (res) =>
     {
         if (res)
         {
             Terminal.Instance.Session[typeof(Customer)] = new ActionParameter<Customer>(false, view.SelectedItem.Customer, true);
         }
         Terminal.Instance.Session.Actions[Actions.OpenCustomersSelectionView].RaiseExecuted();
     });
 }
 private void OpenCustomerView(object parameter)
 {
     BusinessContext.Instance.BeginOperation();
     var view = new CustomerViewModel();
     if (Terminal.Instance.Session.Rules.IsValid(Rules.IsTerminalZero))
     {
         view.View.ControlMode = ControlMode.Update;
     }
     Terminal.Instance.Client.ShowView(view.View);
 }