Genesys CTI User Forum > Genesys-related Development

How to get the number of the caller in IW(C#)

<< < (3/3)

GnomE:
As I said it was impossible to initialize. I was told how to do it:
[code]//IView Members
        public object Context { get; set; }
        public void Create()
        {
            Model.Case = (Context as IDictionary<string, object>).TryGetValue("Case") as ICase;
            if (Model.Case != null)
            {
                if (Model.Case.MainInteraction != null)
                {
                    if (Model.Case.MainInteraction is IInteractionVoice)
                    {
                        Model.InteractionVoice = Model.Case.MainInteraction as IInteractionVoice;
                        //MessageBox.Show(Model.InteractionVoice.PhoneNumber);
                    }
                    else if (Model.Case.MainInteraction is IInteractionInboundEmail)
                    {
                        Model.InteractionInboundEmail = Model.Case.MainInteraction as IInteractionInboundEmail;
                        //MessageBox.Show(Model.InteractionInboundEmail.EntrepriseEmailInteractionCurrent.From);
                    }
                }
            }         
        }[/code]
I hope it will be useful to someone...

GnomE:
[quote author=Kubig link=topic=8334.msg36744#msg36744 date=1401251932]
Do not see any reason for doing this like that, but if is enough for you and you are happy with it, it is done.
[/quote]
I'm not experienced in this topic, if it's a bad version, please tell us what exactly? And how to make it better?
Thanks in advance!

Navigation

[0] Message Index

[*] Previous page

Go to full version