public ActionWithParamViewModel(Action action, ActionParam actionParam,  ActionWithParamListViewModel actionWithParamListViewModel)
 {
     this.ActionWithParamListViewModel = actionWithParamListViewModel;
     this.Name = action.Name;
     this.ActionParam = actionParam;
     this.AddActionCommand = new DelegateCommand<object>(this.OnAddAction,this.CanAddAction);
 }
 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;
 }
Пример #3
0
 public void AddActionParam(Action action, ActionParam param, ActionParamName name, decimal value)
 {
     if (param == null || action == null) return;
     param.Action = action;
     param.Value = value;
     param.ActionParamName = name;
     dssDbContext.ActionParams.Local.Add(param);
 }
 public ActionViewModelForTask9(Action action, ActionParam credit, ActionParam isExtensable, ActionParam period, ActionListViewModelForTask9 actionListViewModel)
 {
     this.ActionListViewModel = actionListViewModel;
     this.Name = action.Name;
     this.Credit = credit;
     this.IsExtendable = isExtensable;
     this.Period = period;
     this.AddActionCommand = new DelegateCommand<object>(this.OnAddAction,this.CanAddAction);
 }
 public ActionWithParamViewModel(ActionWithParamListViewModel actionWithParamListViewModel)
 {
     var action = new Action();
     var paramValue = new ActionParam();
     this.ActionWithParamListViewModel = actionWithParamListViewModel;
     this.Name = action.Name;
     this.ActionParam = paramValue;
     this.AddActionCommand = new DelegateCommand<object>(this.OnAddAction, this.CanAddAction);
 }
 public void AddAction(Action act, ActionParam actionParam)
 {
     var haveThisActInActions = Actions.Any(a => a.Name.Trim() == act.Name.Trim());
     if (haveThisActInActions) return;
     ActionWithParamViewModels.Add(new ActionWithParamViewModel(act, actionParam, this));
     Actions.Add(act);
     actionParam.Action = act;
     ActionParams.Add(actionParam);
     NavigationWindowShower.IsSaved = false;
 }