Пример #1
0
        public WizardJoin(TabloidConfigView view, TabloidConfigJointure parentJoin, string connectionString)
        {
            _connectionString = connectionString;
            _view             = view;
            _parentJoin       = parentJoin;

            InitializeComponent();

            wjStart.CloseFromNext += wjRef_CloseFromNext;
            wjRef2.ShowFromNext   += Rel_ShowFromNext;
            wjRef2.ShowFromBack   += Back_Rel_ShowFromNext;
            Fin.CloseFromBack     += Fin_CloseFromBack;

            _srcView = parentJoin == null ? view : TabloidConfig.Config.Views[parentJoin.NomTable];

            upDateList();

            WizardSQLHelper.displayTable(cmbTable, Program.AppSet.ConnectionString, _srcView.NomTable, false);

            cmbTable.SelectedIndex = 0;

            lblChampRef.Text = string.Format(lblChampRef.Text, _srcView.NomTable);

            cmbTypeJointure.SelectedIndex = 0;

            cmbOrderType.Items.Add(Properties.Resources.Increasing);
            cmbOrderType.Items.Add(Properties.Resources.Decreasing);
            cmbOrderType.SelectedIndex = 0;

            WizardSQLHelper.SetVisibiliteCheckedBoxList(lstVisibilites);

            string lastError = "";
            // list automatic join
            var searchTable = _parentJoin == null ? _view : TabloidConfig.Config.Views[_parentJoin.NomTable];

            _autoJoinList          = WizardSQLHelper.SetJoinFromConstraint(searchTable, Program.AppSet.ConnectionString, ref lastError, false);
            lstAutoJoin.DataSource = _autoJoinList;

            radManu.Checked = _autoJoinList.Count == 0;
        }