Verzeichnisse umgeräumt
This commit is contained in:
144
SewerStammGen.WPF/ViewModel/Haltung/HaltungEditViewModel.cs
Normal file
144
SewerStammGen.WPF/ViewModel/Haltung/HaltungEditViewModel.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
using SewerStammGen.Shared.Contracts;
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using SewerStammGen.WPF.Commands;
|
||||
using SewerStammGen.WPF.ViewModel.State;
|
||||
using Shared.Contracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace SewerStammGen.WPF.ViewModel
|
||||
{
|
||||
internal class HaltungEditViewModel : BaseViewModel
|
||||
{
|
||||
private readonly IActualState _actualState;
|
||||
//private readonly IHaltungDataService _kanalDataService;
|
||||
|
||||
private Kanal _model;
|
||||
|
||||
public Kanal Model
|
||||
{
|
||||
get => _model;
|
||||
set
|
||||
{
|
||||
_model = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string _oberePunkt { get; set; }
|
||||
public string _unterePunkt { get; set; }
|
||||
|
||||
public string ObereSchacht
|
||||
{
|
||||
get => _oberePunkt;
|
||||
|
||||
set
|
||||
{
|
||||
if (_oberePunkt != value)
|
||||
{
|
||||
_oberePunkt = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string UntereSchacht
|
||||
{
|
||||
get => _unterePunkt;
|
||||
set
|
||||
{
|
||||
if (_unterePunkt != value)
|
||||
{
|
||||
_unterePunkt = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string Haltungsbezeichnung
|
||||
{
|
||||
get => _model.Objektbezeichnung;
|
||||
set
|
||||
{
|
||||
if(_model.Objektbezeichnung != value)
|
||||
{
|
||||
_model.Objektbezeichnung = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Material
|
||||
{
|
||||
get => _model.Material;
|
||||
set
|
||||
{
|
||||
if( _model.Material != value)
|
||||
{
|
||||
_model.Material = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Durchmesser
|
||||
{
|
||||
get => _model.DN.ToString();
|
||||
set
|
||||
{
|
||||
if(_model.DN.ToString() != value)
|
||||
{
|
||||
_model.DN = int.Parse(value);
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Haltungslaenge
|
||||
{
|
||||
get => _model.Haltungslaenge.ToString();
|
||||
set
|
||||
{
|
||||
if(_model.Haltungslaenge.ToString() != value)
|
||||
{
|
||||
_model.Haltungslaenge = decimal.Parse(value);
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand Speichern { get; set; }
|
||||
|
||||
public HaltungEditViewModel(
|
||||
|
||||
IActualState actualState)
|
||||
{
|
||||
_actualState = actualState;
|
||||
//_kanalDataService = kanalDataService;
|
||||
|
||||
_model = new Kanal();
|
||||
Speichern = new HaltungEditSaveCommand(this);
|
||||
|
||||
LoadModel();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private async void LoadModel()
|
||||
{
|
||||
/*_model = await _kanalDataService.Get(_actualState.HaltungID);
|
||||
UntereSchacht = _model.EndSchacht.Objektbezeichnung;
|
||||
ObereSchacht = _model.StartSchacht.Objektbezeichnung;
|
||||
OnPropertyChanged(nameof(ObereSchacht));
|
||||
OnPropertyChanged(nameof(UntereSchacht));
|
||||
OnPropertyChanged(nameof(Haltungslaenge));
|
||||
OnPropertyChanged(nameof(Haltungsbezeichnung));
|
||||
OnPropertyChanged(nameof(Material));
|
||||
OnPropertyChanged(nameof(Durchmesser));
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
57
SewerStammGen.WPF/ViewModel/Haltung/HaltungListViewModel.cs
Normal file
57
SewerStammGen.WPF/ViewModel/Haltung/HaltungListViewModel.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using SewerStammGen.Shared.Contracts;
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using SewerStammGen.WPF.Commands;
|
||||
using SewerStammGen.WPF.Interface.Navigator;
|
||||
using SewerStammGen.WPF.ViewModel.State;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace SewerStammGen.WPF.ViewModel
|
||||
{
|
||||
public class HaltungListViewModel : BaseViewModel
|
||||
{
|
||||
private readonly ObservableCollection<Kanal> _haltungen;
|
||||
private readonly IActualState _actualState;
|
||||
//private readonly IHaltungDataService _haltungDataService;
|
||||
|
||||
public Kanal? SelectedHaltung { get; set; }
|
||||
public ObservableCollection<Kanal> Haltungen { get => _haltungen; }
|
||||
|
||||
public ICommand EditCommand { get; set; }
|
||||
public ICommand AddCommand { get; set; }
|
||||
|
||||
public HaltungListViewModel( IActualState actualState, IRenavigator renavigator )
|
||||
{
|
||||
_haltungen = new ObservableCollection<Kanal>();
|
||||
|
||||
_actualState = actualState;
|
||||
|
||||
|
||||
EditCommand = new HaltungEditCommand(actualState, renavigator, this);
|
||||
AddCommand = new HaltungAddCommand();
|
||||
|
||||
LoadHaltungen();
|
||||
}
|
||||
|
||||
private async void LoadHaltungen()
|
||||
{
|
||||
/* var haltungen = await _haltungDataService.GetAll(_actualState.ProjektID);
|
||||
InitCollection(_haltungen, haltungen);
|
||||
*/
|
||||
}
|
||||
|
||||
private void InitCollection(ObservableCollection<Kanal> dest, IEnumerable<Kanal> source)
|
||||
{
|
||||
dest.Clear();
|
||||
foreach (var sourceItem in source)
|
||||
{
|
||||
dest.Add(sourceItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
SewerStammGen.WPF/ViewModel/Haltung/TextBoxFilterAction.cs
Normal file
18
SewerStammGen.WPF/ViewModel/Haltung/TextBoxFilterAction.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xaml.Behaviors;
|
||||
using Syncfusion.UI.Xaml.Grid;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SewerStammGen.WPF.Views
|
||||
{
|
||||
public class TextBoxFilterAction : TargetedTriggerAction<SfMultiColumnDropDownControl>
|
||||
{
|
||||
protected override void Invoke(object parameter)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user