public override void SaveDetails() { var client = ClientSession.Instance.RelaxoClient; var script = new Script(); script.Id = Id; script.ScriptContent = ScriptContent; script.Variables.AddRange(from variable in ScriptVariable select new PythonVariable { Name = variable.Name, TaskComponentId = variable.TaskComponentId, TaskId = variable.TaskId}); client.UpdateScript(script); }
public ScriptViewModel(Script script) : base(script) { Image = "script.png"; Width = 90; Height = 90; ScriptVariable = new ObservableCollection<PythonVariableViewModel>(); AllTasks = new ObservableCollection<Task>(); ComponentsFromTask = new ObservableCollection<TaskComponent>(); }