private void OnSaveRequestDetails(StandingOrderEntityData entityData)
        {
            if (string.IsNullOrEmpty(Details.EntityId))
            {
                var entityId = _application.Repository.CreateStandingOrder(entityData);
                Details.EntityId = entityId;

                var requestEntityViewModel = new StandingOrderEntityViewModel(_application, entityId);
                StandingOrders.AddValue(requestEntityViewModel);
                StandingOrders.Value = requestEntityViewModel;
                _allStandingOrders.Add(requestEntityViewModel);
            }
            else
            {
                _application.Repository.UpdateStandingOrder(Details.EntityId, entityData);
            }

            Details.IsInEditMode = false;
            _application.Repository.UpdateStandingOrdersToCurrentMonth(_application.ApplicationContext.Now.Year, _application.ApplicationContext.Now.Month);
            StandingOrders.Value.Refresh();
            UpdateCommandStates();
            _onStandingOrderUpdated();
        }
 private bool IsMatchingFilterCriteria(StandingOrderEntityViewModel standingOrder)
 {
     return ShowFinishedProperty.Value || standingOrder.State != StandingOrderState.Finished;
 }
        private void OnSaveRequestDetails(StandingOrderEntityData entityData)
        {
            if (string.IsNullOrEmpty(Details.EntityId))
            {
                var entityId = _application.Repository.CreateStandingOrder(entityData);
                Details.EntityId = entityId;

                var requestEntityViewModel = new StandingOrderEntityViewModel(_application, entityId);
                StandingOrders.AddValue(requestEntityViewModel);
                StandingOrders.Value = requestEntityViewModel;
            }
            else
            {
                _application.Repository.UpdateStandingOrder(Details.EntityId, entityData);
            }

            Details.IsInEditMode = false;
            _application.Repository.UpdateStandingOrdersToCurrentMonth();
            StandingOrders.Value.Refresh();
            UpdateCommandStates();
            _onStandingOrderUpdated();
        }
 private bool IsMatchingFilterCriteria(StandingOrderEntityViewModel standingOrder)
 {
     return(ShowFinishedProperty.Value || standingOrder.State != StandingOrderState.Finished);
 }