private void ExecuteSaveScreentSettings(object obj) { ProgressInfo = "Saving " + SelectedProfile.Name + "..."; ShowAll = Visibility.Collapsed; ShowConfigAll = Visibility.Collapsed; ShowProgress = Visibility.Visible; System.Threading.Tasks.Task.Factory.StartNew(() => { screenpopConfigs = new ScreenPopConfig(); screenpopConfigs.AUXReasonEnabled = this.IsAUXReason; screenpopConfigs.CanScreenPop = this.CanScreenPop; screenpopConfigs.AutoRecieve = this.AutoRecieve; screenpopConfigs.VoiceScreenPop = this.VoiceScreenPop; screenpopConfigs.ChatScreenPop = this.ChatScreenPop; screenpopConfigs.IncidentScreenPop = this.IncidentScreenPop; screenpopConfigs.WrapupReasonEnabled = this.IsWrapup; screenpopConfigs.DefaultWorkSpace = SelectedWorkSpaceList; screenpopConfigs.IsEnhanced = this.Enhanced; screenpopConfigs.ChatDefaultWorkspace = SelectedChatWorkSpaceList; screenpopConfigs.IncidentDefaultWorkspace = SelectedIncidentWorkSpaceList; screenpopConfigs.CanOpen = IsDontOpen; screenpopConfigs.CanOpenChat = IsDontOpenChat; screenpopConfigs.CanOpenIncident = IsDontOpenIncident; screenpopConfigs.IsDefault = this.IsDefaultConfig; screenpopConfigs.LogoutReasonEnabled = this.IsLogout; screenpopConfigs.ProfileId = (int)SelectedProfile.Value; screenpopConfigs.PrimaryCTIEngine = (string.IsNullOrEmpty(PrimaryCTIEngine) ? " " : PrimaryCTIEngine); screenpopConfigs.SecondaryCTIEngine = (string.IsNullOrEmpty(SecondaryCTIEngine) ? " " : SecondaryCTIEngine); screenpopConfigs.IsQueueEnabled = this.IsQueueEnabled; screenpopConfigs.ScreenPopOptionsList = new List <ScreenPopOptions>(); SearchPopOptions.ToList().ForEach(p => { screenpopConfigs.ScreenPopOptionsList.Add(new ScreenPopOptions() { Name = p.Name, Pop_Label = p.Pop_Label, Type = p.Type, Description = p.Description }); }); WrapupReasoncodes.ToList().ForEach(p => { screenpopConfigs.ScreenPopOptionsList.Add(new ScreenPopOptions() { Name = p.Name, Pop_Label = p.Pop_Label, Type = p.Type, Description = p.Description }); }); LogoutReasonCodes.ToList().ForEach(p => { screenpopConfigs.ScreenPopOptionsList.Add(new ScreenPopOptions() { Name = p.Name, Pop_Label = p.Pop_Label, Type = p.Type, Description = p.Description }); }); AUXReasonCodes.ToList().ForEach(p => { screenpopConfigs.ScreenPopOptionsList.Add(new ScreenPopOptions() { Name = p.Name, Pop_Label = p.Pop_Label, Type = p.Type, Description = p.Description }); }); ScreenPopConfigModel.Instance.SaveAgentConfiguration(screenpopConfigs); BindData(); }).ContinueWith((s) => { ShowConfigAll = Visibility.Visible; ShowProgress = Visibility.Collapsed; ShowAll = Visibility.Visible; }); }