Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: innspiron on April 28, 2015, 01:38:31 PM

Title: Interaction and InteractionVoice in MySampleView.xaml.cs
Post by: innspiron on April 28, 2015, 01:38:31 PM
I am new, so please be polite  :)
I am trying to get IInteractionVoice and IInteraction thisinteraction inside this sample class. Provided by genesys. But struggling with it lots and lots.
Code is here http : //prntscr . com/6z50z3
And lets say I have new method private void ccancel_Click(object sender, RoutedEventArgs e) {IInteraction i = .....[here should go some code] ; i.SetAttachedData.....}
Title: Re: Interaction and InteractionVoice in MySampleView.xaml.cs
Post by: Kubig on April 29, 2015, 08:48:35 AM
And what is the problem or question?
Title: Re: Interaction and InteractionVoice in MySampleView.xaml.cs
Post by: PeteHoyle on May 01, 2015, 10:50:18 AM
Hi,

To get the Interaction you would need to do something like this:

ICase myCase = (Extensions.TryGetValue<string, object>(this.Context as IDictionary<string, object>, "Case") as ICase);
if (myCase.MainInteraction is IInteractionVoice)
                {
                    IInteractionVoice iv = myCase.MainInteraction as IInteractionVoice;

                }