private void OnSave_Completed(object sender, RunWorkerCompletedEventArgs e) { //DialogHelper.HideLoading(); if (_isInheritClick) { _isInheritClick = false; var dataRequest = new TaskProgressRequest { TaskId = Id, DirectoryEndpointId = ApplicationContext.NodesSelected[0].NodeId, IsFolder = ApplicationContext.NodesSelected[0].IsFolder }; var taskSoftwareInfo = ServiceManager.Invoke(sc => RequestResponseUtils.GetData <TaskDataResponse>(sc.GetTaskAndSoftwareInfo, dataRequest)); if (taskSoftwareInfo != null) { //Update task model UpdateModel(taskSoftwareInfo.Result.PocTasks.FirstOrDefault()); //Remove old software selected stated for (int i = ApplicationContext.TaskSoftwareSelectedList.Count - 1; i >= 0; i--) { var currentTask = ApplicationContext.TaskSoftwareSelectedList[i]; if (currentTask.TaskId == Id) { ApplicationContext.TaskSoftwareSelectedList.RemoveAt(i); } } ApplicationContext.TaskSoftwareSelectedList.AddRange(taskSoftwareInfo.Result.SoftwareTasks); //Refresh software package list InstallationPackagesViewModel.Refresh(); } } }
public void RefreshModel(PocTask model) { UpdateModel(model); InstallationPackagesViewModel.Refresh(); PieChartViewModel.Refresh(); }