Пример #1
0
        public static bool EditeParametres(CEasyQuerySource source)
        {
            CFormProprietesQuerySource frm = new CFormProprietesQuerySource();

            frm.m_source = source;
            DialogResult res = frm.ShowDialog();

            frm.Dispose();
            return(res == DialogResult.OK);
        }
Пример #2
0
        //--------------------------------------------------------------------------------
        void m_menuProprietesConnexion_Click(object sender, EventArgs e)
        {
            TreeNode         node   = SelectedNode;
            CEasyQuerySource source = node != null ? node.Tag as CEasyQuerySource : null;

            if (source != null)
            {
                if (CFormProprietesQuerySource.EditeParametres(source))
                {
                    node.Text = source.SourceName;
                    source.ClearStructure();
                    RefreshTree();
                }
            }
        }
Пример #3
0
        //--------------------------------------------------------------------------------
        void itemNewCnx_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem   item = sender as ToolStripMenuItem;
            IEasyQueryConnexion cnx  = item != null ? item.Tag as IEasyQueryConnexion : null;

            if (cnx != null)
            {
                cnx = (IEasyQueryConnexion)Activator.CreateInstance(cnx.GetType(), new object[0]);
                CEasyQuerySource src = new CEasyQuerySource();
                src.Connexion  = cnx;
                src.SourceName = cnx.ConnexionTypeName;
                if (CFormProprietesQuerySource.EditeParametres(src))
                {
                    m_sources.AddSource(src);
                    RefreshTree();
                }
            }
        }