示例#1
0
        public void Cancel()
        {
            if (_sortedCars.IsAddingNew)
            {
                _sortedCars.CancelNew();
            }
            else if (_sortedCars.IsEditingItem)
            {
                _sortedCars.CancelEdit();
            }
            ScreenEditingMode = false;

            if (_listBookMark >= 0)
            {
                if (!_sortedCars.MoveCurrentToPosition(_listBookMark))
                {
                    return;
                }
                FieldedCar = _sortedCars.CurrentItem as CarModel;
            }
        }
示例#2
0
        public void Cancel()
        {
            if (_sortedServices.IsAddingNew)
            {
                _sortedServices.CancelNew();
            }
            else if (_sortedServices.IsEditingItem)
            {
                _sortedServices.CancelEdit();
            }

            ScreenEditingMode = false;
            NotifyOfPropertyChange(() => ServiceLines);

            if (_listBookMark >= 0)
            {
                if (!_sortedServices.MoveCurrentToPosition(_listBookMark))
                {
                    return;
                }
                FieldedService = _sortedServices.CurrentItem as ServiceModel;
            }
        }