コード例 #1
0
        public void setTableList(IServiceProvider provider, object value)
        {
            if (provider != null)
            {
                // This service is in charge of popping our ListBox.
                _service = ((IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)));
                _list    = new ListBox();

                if (_service != null)
                {
                    _list.Click += ListBox_Click;
                    WizardSQLHelper.displayTable(_list, Program.AppSet.ConnectionString, (string)value, true);

                    _service.DropDownControl(_list);
                }
            }
        }
コード例 #2
0
        public TableFieldSelectorForm(TabloidConfigView view, string value, string tableName = null)
        {
            Value = value;
            InitializeComponent();

            WizardSQLHelper.displayTable(fieldSelector1.cmbTable, Program.AppSet.ConnectionString, view.NomTable);

            fieldSelector1.ConnectionString     = Program.AppSet.ConnectionString;
            fieldSelector1.cmdSchema.DataSource = AppSetting.GetSchemaList(Program.AppSet.ProviderType);

            fieldSelector1.lstChamp.SelectedIndexChanged += cmbChamp_SelectedIndexChanged;

            if (!string.IsNullOrEmpty(tableName))
            {
                fieldSelector1.cmbTable.SelectedIndex = fieldSelector1.cmbTable.FindStringExact(tableName);
            }
            if (!string.IsNullOrEmpty(value))
            {
                fieldSelector1.lstChamp.SelectedIndex = fieldSelector1.lstChamp.FindStringExact(value);
            }
        }
コード例 #3
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;
        }