Example #1
0
        private void ButtonClick(object sender, CellClickEventArgs cellClickEventArgs)
        {
            if (cellClickEventArgs.Column == olvEditInPopup)
            {
                var col = cellClickEventArgs.Model as IColumn;
                if (col != null)
                {
                    var dialog = new SetSQLDialog(col.SelectSQL, new RDMPCombineableFactory());

                    var querySyntaxSource = col as IHasQuerySyntaxHelper ?? _aggregate;

                    var autoComplete = new AutoCompleteProviderWin(querySyntaxSource.GetQuerySyntaxHelper());
                    autoComplete.Add(col);
                    autoComplete.Add(_aggregate);

                    autoComplete.RegisterForEvents(dialog.QueryEditor);

                    if (dialog.ShowDialog() == DialogResult.OK)
                    {
                        col.SelectSQL = dialog.Result;
                        Save(col);
                    }
                }
            }
        }
Example #2
0
        private void btnSetSQL_Click(object sender, System.EventArgs e)
        {
            SetSQLDialog dialog = new SetSQLDialog((string)_args.InitialValue, new RDMPCombineableFactory());
            DialogResult d      = dialog.ShowDialog();

            if (d == DialogResult.OK)
            {
                _args.Setter(_args.InitialValue = dialog.Result);
            }
        }