public CombinationWithParamViewModel(Action act, Event ev, ActionParam actionParam, EventParam eventParam, CombinationWithParamListViewModel combinationWithParamListViewModel)
 {
     CombinationWithParamListViewModel = combinationWithParamListViewModel;
     this.Action = act;
     this.Event = ev;
     this.ActionParam = actionParam;
     this.EventParam = eventParam;
 }
 public EventWithParamViewModel(Event ev, EventParam eventParam, EventWithParamListViewModel eventWithParamListViewModel)
 {
     this.EventWithParamListViewModel = eventWithParamListViewModel;
     this.Name = ev.Name;
     this.Probability = ev.Probability;
     this.EventParam = eventParam;
     this.AddEventCommand = new DelegateCommand<object>(this.OnAddEvent, this.CanAddEvent);
 }
 public EventWithParamViewModel(EventWithParamListViewModel eventWithParamListViewModel)
 {
     var ev = new Event();
     var paramValue = new EventParam();
     this.EventWithParamListViewModel = eventWithParamListViewModel;
     this.Name = ev.Name;
     this.Probability = ev.Probability;
     this.EventParam = paramValue;
     this.AddEventCommand = new DelegateCommand<object>(this.OnAddEvent, this.CanAddEvent);
 }
 public void AddEvent(Event ev, EventParam eventParam)
 {
     var haveThisEvInEvents = Events.Any(e => e.Name.Trim() == ev.Name.Trim());
     if (haveThisEvInEvents) return;
     EventWithParamViewModels.Add(new EventWithParamViewModel(ev, eventParam, this));
     Events.Add(ev);
     eventParam.Event = ev;
     EventParams.Add(eventParam);
     _baseLayer.DssDbContext.Events.Local.Add(ev);
     Sum();
     NavigationWindowShower.IsSaved = false;
 }
 public void AddEventParam( Event eEvent, EventParam param, EventParamName name, decimal value)
 {
     if (param == null || eEvent == null) return;
     param.Event = eEvent;
     param.Value = value;
     param.EventParamName = name;
     dssDbContext.EventParams.Local.Add(param);
 }