public void LoadDispostionCodes(string interactionID)
        {
            try
            {
                if (_chatDataContext.LoadDispositionCodes != null && _chatDataContext.LoadSubDispositionCodes != null)
                {
                    _chatDataContext.dicCMEObjects.Clear();
                    _chatDataContext.dicCMEObjects.Add("chat.disposition.codes", _chatDataContext.LoadDispositionCodes);
                    _chatDataContext.dicCMEObjects.Add("chat.subdisposition.codes", _chatDataContext.LoadSubDispositionCodes);
                    if (ConfigContainer.Instance().AllKeys.Contains("interaction.enable.multi-dispositioncode") && (((string)ConfigContainer.Instance().GetValue("interaction.enable.multi-dispositioncode")).ToLower().Equals("true")))
                    {
                        _chatDataContext.dicCMEObjects.Add("enable.multidisposition.enabled", true);
                    }
                    else
                    {
                        _chatDataContext.dicCMEObjects.Add("enable.multidisposition.enabled", false);
                    }
                    _chatDataContext.dicCMEObjects.Add("DispositionCodeKey", _chatDataContext.DisPositionKeyName);
                    if (ConfigContainer.Instance().AllKeys.Contains("interaction.disposition-object-name"))
                    {
                        _chatDataContext.dicCMEObjects.Add("DispositionName", (string)ConfigContainer.Instance().GetValue("interaction.disposition-object-name"));
                    }
                    else
                    {
                        _chatDataContext.dicCMEObjects.Add("DispositionName", string.Empty);
                    }
                    Pointel.Interactions.DispositionCodes.InteractionHandler.Listener _dispositionCodeListener = new Pointel.Interactions.DispositionCodes.InteractionHandler.Listener();
                    _dispositionCodeListener.NotifyCMEObjects(_chatDataContext.dicCMEObjects);
                    DispositionData disData = new DispositionData()
                    {
                        InteractionID = interactionID
                    };
                    _dispositionUC = _dispositionCodeListener.CreateUserControl();
                    _chatDataContext.DispositionObjCollection = new KeyValuePair <string, object>("DispositionObj", _dispositionUC);
                    stpDispCodelist.Children.Clear();
                    _dispositionUC.NotifyDispositionCodeEvent += new Pointel.Interactions.DispositionCodes.UserControls.Disposition.NotifyDispositionCode(NotifyDispositionCodeEvent);
                    _dispositionUC.Dispositions(Pointel.Interactions.IPlugins.MediaTypes.Chat, disData);

                    if (_dispositionUC != null)
                    {
                        if (!_dispositionUserControls.ContainsKey(interactionID))
                        {
                            _dispositionUserControls.Add(interactionID, _dispositionUC);
                        }
                        else
                        {
                            _dispositionUserControls[interactionID] = _dispositionUC;
                        }
                        stpDispCodelist.Children.Add(_dispositionUC);
                    }
                    isFirstTimeCall = false;
                }
            }
            catch (Exception generalException)
            {
                _logger.Error("Error Occurred as LoadDispostionCodes() :" + generalException.Message);
            }
        }
        /// <summary>
        /// Loads the dispostion codes.
        /// </summary>
        /// <param name="interactionID">The interaction identifier.</param>
        public void LoadDispostionCodes(string interactionID)
        {
            try
            {
                if (ConfigContainer.Instance().AllKeys.Contains("email.disposition.codes") && ConfigContainer.Instance().GetValue("email.disposition.codes") != null)
                //if (EmailDataContext.GetInstance().DispositonCodes != null && EmailDataContext.GetInstance().LoadSubDispositionCodes != null)
                {
                    Dictionary <string, object> dicCMEObjects   = new Dictionary <string, object>();
                    Dictionary <string, string> tempDisposition = new Dictionary <string, string>();
                    Dictionary <string, Dictionary <string, string> > subDisposition = new Dictionary <string, Dictionary <string, string> >();
                    dicCMEObjects.Clear();
                    if (ConfigContainer.Instance().AllKeys.Contains("email.subdisposition.codes") &&
                        ConfigContainer.Instance().GetValue("email.subdisposition.codes") != null)
                    {
                        subDisposition = (Dictionary <string, Dictionary <string, string> >)ConfigContainer.Instance().GetValue("email.subdisposition.codes");
                    }
                    tempDisposition = (Dictionary <string, string>)ConfigContainer.Instance().GetValue("email.disposition.codes");
                    dicCMEObjects.Add("email.disposition.codes", tempDisposition);
                    dicCMEObjects.Add("email.subdisposition.codes", subDisposition);
                    dicCMEObjects.Add("enable.multidisposition.enabled",
                                      (ConfigContainer.Instance().AllKeys.Contains("interaction.enable.multi-dispositioncode") &&
                                       ((string)ConfigContainer.Instance().GetValue("interaction.enable.multi-dispositioncode")).ToLower().Equals("true")) ? true : false);
                    dicCMEObjects.Add("DispositionCodeKey", (ConfigContainer.Instance().AllKeys.Contains("interaction.disposition.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition.key-name") : string.Empty));
                    dicCMEObjects.Add("DispositionName", (ConfigContainer.Instance().AllKeys.Contains("interaction.disposition-object-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition-object-name") : string.Empty));
                    stpDispCodelist.Children.Clear();
                    if (tempDisposition.Count <= 0)
                    {
                        tabitemDisposition.Visibility = Visibility.Collapsed;
                        return;
                    }

                    Pointel.Interactions.DispositionCodes.InteractionHandler.Listener _dispositionCodeListener = new Pointel.Interactions.DispositionCodes.InteractionHandler.Listener();
                    _dispositionCodeListener.NotifyCMEObjects(dicCMEObjects);
                    DispositionData disData = new DispositionData()
                    {
                        InteractionID = interactionID
                    };
                    _dispositionUC           = _dispositionCodeListener.CreateUserControl();
                    DispositionObjCollection = new KeyValuePair <string, object>("DispositionObj", _dispositionUC);
                    stpDispCodelist.Children.Clear();
                    _dispositionUC.NotifyDispositionCodeEvent += new Pointel.Interactions.DispositionCodes.UserControls.Disposition.NotifyDispositionCode(NotifyDispositionCodeEvent);

                    _dispositionUC.Dispositions(Pointel.Interactions.IPlugins.MediaTypes.Email, disData);

                    if (_dispositionUC != null)
                    {
                        if (!_dispositionUserControls.ContainsKey(interactionID))
                        {
                            _dispositionUserControls.Add(interactionID, _dispositionUC);
                        }
                        else
                        {
                            _dispositionUserControls[interactionID] = _dispositionUC;
                        }
                        stpDispCodelist.Children.Add(_dispositionUC);

                        //Reload  selected disposition code
                        if (CurrentData.ContainsKey((ConfigContainer.Instance().AllKeys.Contains("interaction.disposition.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition.key-name") : string.Empty)) || CurrentData.ContainsKey((ConfigContainer.Instance().AllKeys.Contains("interaction.disposition-collection.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition-collection.key-name") : string.Empty)))
                        {
                            Dictionary <string, string> dispositionTree = new Dictionary <string, string>();
                            //if (DispositionObjCollection.Value != null)
                            //{
                            //    var dispositionObject = (Pointel.Interactions.DispositionCodes.UserControls.Disposition)
                            //                    DispositionObjCollection.Value;
                            if (CurrentData.ContainsKey((ConfigContainer.Instance().AllKeys.Contains("interaction.disposition-collection.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition-collection.key-name") : string.Empty)))
                            {
                                if (!string.IsNullOrEmpty(CurrentData[(ConfigContainer.Instance().AllKeys.Contains("interaction.disposition-collection.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition-collection.key-name") : string.Empty)].ToString()))
                                {
                                    dispositionTree = CurrentData[(ConfigContainer.Instance().AllKeys.Contains("interaction.disposition-collection.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition-collection.key-name") : string.Empty)].ToString().Split(';').Select(s => s.Split(':')).ToDictionary(a => a[0].Trim().ToString(), a => a[1].Trim().ToString());
                                }
                            }
                            if (CurrentData.ContainsKey((ConfigContainer.Instance().AllKeys.Contains("interaction.disposition.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition.key-name") : string.Empty)))
                            {
                                if (!string.IsNullOrEmpty(CurrentData[(ConfigContainer.Instance().AllKeys.Contains("interaction.disposition.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition.key-name") : string.Empty)].ToString()))
                                {
                                    dispositionTree.Add((ConfigContainer.Instance().AllKeys.Contains("interaction.disposition.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition.key-name") : string.Empty), CurrentData[(ConfigContainer.Instance().AllKeys.Contains("interaction.disposition.key-name") ? (string)ConfigContainer.Instance().GetValue("interaction.disposition.key-name") : string.Empty)].ToString());
                                }
                            }
                            if (dispositionTree.Count > 0)
                            {
                                _dispositionUC.ReLoadDispositionCodes(dispositionTree, interactionId);
                            }

                            //}
                        }
                    }
                }
                isFirstTimeCall = false;
            }
            catch (Exception ex)
            {
                logger.Error("LoadDispostionCodes(): " + ex.Message);
            }
        }