130 lines
3.9 KiB
C#
130 lines
3.9 KiB
C#
using BeWo.Core;
|
|
using BeWo.ViewModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.View.Detail
|
|
{
|
|
public abstract class MassnahmenHistoryRecord
|
|
{
|
|
public struct NodeRelation
|
|
{
|
|
public SupportConceptGoalTreeItem Current { get; set; }
|
|
public SupportConceptGoalTreeItem Parent { get; set; }
|
|
|
|
public NodeRelation(SupportConceptGoalTreeItem newitem, SupportConceptGoalTreeItem parent)
|
|
{
|
|
Current = newitem;
|
|
Parent = parent;
|
|
}
|
|
public NodeRelation(SupportConceptGoalTreeItem newitem)
|
|
{
|
|
Current = newitem;
|
|
Parent = newitem.ParentGoal as SupportConceptGoalTreeItem;
|
|
}
|
|
}
|
|
|
|
public struct NodeEditInformation
|
|
{
|
|
public string Abbreviation { get; set; }
|
|
public string Description { get; set; }
|
|
public string Notice { get; set; }
|
|
}
|
|
}
|
|
|
|
public class MassnahmenHistoryRecordOrigin : MassnahmenHistoryRecord
|
|
{
|
|
|
|
}
|
|
|
|
public class MassnahmenHistoryRecordAdd : MassnahmenHistoryRecord
|
|
{
|
|
public NodeRelation Parameter { get; set; }
|
|
|
|
public MassnahmenHistoryRecordAdd(SupportConceptGoalTreeItem newitem, SupportConceptGoalTreeItem parent)
|
|
{
|
|
Parameter = new NodeRelation(newitem, parent);
|
|
}
|
|
public MassnahmenHistoryRecordAdd(NodeRelation param)
|
|
{
|
|
Parameter = param;
|
|
}
|
|
}
|
|
|
|
public class MassnahmenHistoryRecordImport : MassnahmenHistoryRecord
|
|
{
|
|
public List<NodeRelation> Parameters { get; set; }
|
|
public List<NodeRelation> ParametersReversed { get; set; }
|
|
|
|
public MassnahmenHistoryRecordImport(List<NodeRelation> list)
|
|
{
|
|
Parameters = list;
|
|
ParametersReversed = new Stack<NodeRelation>(list).ToList();
|
|
}
|
|
}
|
|
|
|
public class MassnahmenHistoryRecordDelete : MassnahmenHistoryRecord
|
|
{
|
|
public NodeRelation ExNode { get; set; }
|
|
public List<NodeRelation> Parameters { get; set; }
|
|
|
|
public MassnahmenHistoryRecordDelete(NodeRelation exnode, List<NodeRelation> list)
|
|
{
|
|
Parameters = list;
|
|
ExNode = exnode;
|
|
}
|
|
}
|
|
|
|
public class MassnahmenHistoryRecordMove : MassnahmenHistoryRecord
|
|
{
|
|
public SupportConceptGoalTreeItem Child { get; set; }
|
|
public SupportConceptGoalTreeItem ExParent { get; set; }
|
|
public SupportConceptGoalTreeItem Parent { get; set; }
|
|
|
|
public MassnahmenHistoryRecordMove(SupportConceptGoalTreeItem child, SupportConceptGoalTreeItem exparent, SupportConceptGoalTreeItem parent)
|
|
{
|
|
Child = child;
|
|
ExParent = exparent;
|
|
Parent = parent;
|
|
}
|
|
}
|
|
|
|
public class MassnahmenHistoryRecordCopy : MassnahmenHistoryRecord
|
|
{
|
|
public NodeRelation CurrentNode { get; set; }
|
|
public List<NodeRelation> Parameters { get; set; }
|
|
|
|
public MassnahmenHistoryRecordCopy(NodeRelation root, List<NodeRelation> list)
|
|
{
|
|
Parameters = list;
|
|
CurrentNode = root;
|
|
}
|
|
}
|
|
|
|
public class MassnahmenHistoryRecordEdit : MassnahmenHistoryRecord
|
|
{
|
|
public ValueListEntryVM VM { get; set; }
|
|
|
|
public NodeEditInformation Before { get; set; }
|
|
public NodeEditInformation After { get; set; }
|
|
|
|
public MassnahmenHistoryRecordEdit(ValueListEntryVM vm, NodeEditInformation b, NodeEditInformation a)
|
|
{
|
|
Before = b;
|
|
After = a;
|
|
VM = vm;
|
|
}
|
|
|
|
public void SetVM(NodeEditInformation info)
|
|
{
|
|
VM.Abbreviation = info.Abbreviation;
|
|
VM.Description = info.Description;
|
|
VM.Notice = info.Notice;
|
|
VM.CommitToDataContract();
|
|
}
|
|
}
|
|
}
|