Esempio n. 1
0
        /*форма для ввода данных подключения*/
        private BaseConnector CreateBaseConnector(Dictionary <string, string> io_params = null)
        {
            var base_connector = new BaseConnector(io_params);
            var wih            = new WindowInteropHelper(base_connector)
            {
                Owner = MParentWindow
            };

            return(base_connector);
        }
Esempio n. 2
0
        public override string CreateConnectionString()
        {
            QvxLog.SetLogLevels(true, true);
            QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Notice, "QvxServer.CreateConnectionString() avg");

            BaseConnector lo_baseConnector = CreateBaseConnector(go_qvConnector?.MParameters);

            lo_baseConnector.ShowDialog();

            if (lo_baseConnector.DialogResult.Equals(true))
            {
                if (lo_baseConnector.GetServerBase())
                {
                    if (string.IsNullOrEmpty(lo_baseConnector.GetUser()))
                    {
                        return(string.Format("Srvr={0};Ref={1};Query={2};QV_Table={3}",
                                             lo_baseConnector.GetBaseLocation(), lo_baseConnector.GetBaseName(),
                                             lo_baseConnector.GetQueryText(), lo_baseConnector.GetQvTable()
                                             ));
                    }
                    else
                    {
                        return(string.Format("Srvr={0};Ref={1};UserDB={2};PasswordDB={3};Query={4};QV_Table={5}",
                                             lo_baseConnector.GetBaseLocation(), lo_baseConnector.GetBaseName(),
                                             lo_baseConnector.GetUser(), lo_baseConnector.GetPassword(),
                                             lo_baseConnector.GetQueryText(), lo_baseConnector.GetQvTable()
                                             ));
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(lo_baseConnector.GetUser()))
                    {
                        return(string.Format("File={0};Query={1};QV_Table={2}",
                                             lo_baseConnector.GetBaseLocation(), lo_baseConnector.GetQueryText(),
                                             lo_baseConnector.GetQvTable()
                                             ));
                    }
                    else
                    {
                        return(string.Format("File={0};UserDB={1};PasswordDB={2};Query={3};QV_Table={4}",
                                             lo_baseConnector.GetBaseLocation(), lo_baseConnector.GetUser(),
                                             lo_baseConnector.GetPassword(), lo_baseConnector.GetQueryText(),
                                             lo_baseConnector.GetQvTable()
                                             ));
                    }
                }
            }
            return(string.Empty);
        }