public static bool EditObject(object data, Form caller)
        {
            DlgConnection dlg = new DlgConnection();

            dlg.LoadData(data);
            return(dlg.ShowDialog(caller) == DialogResult.OK);
        }
        public void SelectQuery(Form dialogParent)
        {
            Connection cnn;

            if (connect != null)
            {
                cnn = (Connection)connect.ConnectionObject.Clone();
            }
            else
            {
                cnn = new Connection();
            }
            DlgConnection dlg = cnn.CreateDataDialog();

            if (dlg.ShowDialog(dialogParent) == DialogResult.OK)
            {
                connect = new ConnectionItem(cnn);
            }
        }