Ejemplo n.º 1
0
            public IGridDataRecords OpenData(byte[] dataSettings, IGridDataOpenContext openContext)
            {
                DirectConnectGridDataSettings thesettings = DirectConnectGridDataSettings.FromBytes(dataSettings);

                if (thesettings == null || thesettings.TableOrViewName == null)
                {
                    return(null);
                }

                return(new DirectConnectGridDataRecords(thesettings));
            }
Ejemplo n.º 2
0
            public string GetDataSummary(byte[] dataSettings)
            {
                DirectConnectGridDataSettings thesettings = DirectConnectGridDataSettings.FromBytes(dataSettings);

                if (thesettings == null || thesettings.TableOrViewName == null) // and maybe check that file exists and can be opened, etc?
                {
                    return(null);
                }

                return(String.Format("Bound to Direct Connect : {0}", thesettings.TableOrViewName));
            }
Ejemplo n.º 3
0
            public byte[] GetDataSettings(byte[] existingSettings)
            {
                DirectConnectGridDataSettings thesettings = DirectConnectGridDataSettings.FromBytes(existingSettings);

                if (thesettings == null)
                {
                    thesettings = new DirectConnectGridDataSettings();
                }

                DirectConnectSettingsDialog dlg = new DirectConnectSettingsDialog();

                dlg.SetSettings(thesettings);

                if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    return(thesettings.ToBytes());
                }

                return(existingSettings);
            }