Ejemplo n.º 1
0
        public void lbTableDesc_TextChanged(object sender, EventArgs e)
        {
            if (lbTableDesc.Text != "_" && txtTable.Text.Trim() != twSchema1.Name)
            {
                _sqlBuilder.Table = txtTable.Text.Trim();
                BindingList <Node> list = SchemaDefinition.GetDecorateTableByCode(_sqlBuilder.Table, _sqlBuilder.Database);
                foreach (Node x in list)
                {
                    if (Regex.IsMatch(x.MyCode, @"^@"))
                    {
                        bool flag = false;
                        foreach (Filter f in _sqlBuilder.Filters)
                        {
                            if (x.MyCode == f.Code)
                            {
                                flag = true;
                                break;
                            }
                        }
                        if (!flag)
                        {
                            _sqlBuilder.Filters.Add(new QueryBuilder.Filter(x));
                        }
                    }
                }


                twSchema1 = TreeViewLoader.LoadTree(ref twSchema1, list, _sqlBuilder.Table, "");

                GetConnectString();
            }
        }
Ejemplo n.º 2
0
        private void QDAddin_Load(object sender, EventArgs e)
        {
            try
            {
                dgvResult.AllowDrop = true;

                DialogResult = DialogResult.Yes;
                BindingList <Node> list = SchemaDefinition.GetDecorateTableByCode(_sqlBuilder.Table, _sqlBuilder.Database);
                //twSchema = RadTreeViewLoader.LoadTree(ref twSchema, list, _sqlBuilder.Table, "");
                twSchema1 = TreeViewLoader.LoadTree(ref twSchema1, list, _sqlBuilder.Table, "");
                GetConnectString();
                LoadDataGrid();
            }
            catch (Exception ex) { lbErr.Text = ex.Message; }
            //if (_xlsApp == null)
            //    //TopMost = false;
            //dgvResult.ad
        }