コード例 #1
0
 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();
     });
 }
コード例 #2
0
 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);
 }