Exemplo n.º 1
0
        //        private Hashtable PROP_BAG_PROPS;
        //        private int URL_PROP = 106;
        private bool getSession()
        {
            try
            {
                if (session != null)
                    return true;

                IOKContext okContext = OKConfigFactory.createInstance(txtConfig.Text, "portal");
                PortalObjectsFactory.Init(okContext);
                session = PortalObjectsFactory.CreateSession();

                session.Connect(txtUser.Text, txtPass.Text, null);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception getting session: " + ex.Message + Environment.NewLine + ex.StackTrace);
            }
            return true;
        }