示例#1
0
 public ConnFrame(PostgreSqlStoredConnection conn)
     : base(conn)
 {
     InitializeComponent();
     tbxDataSource.Text = conn.DataSource;
     tbxLogin.Text      = conn.Login;
     tbxPassword.Text   = conn.Password;
     tbxPort.Text       = conn.Port.ToString();
 }
示例#2
0
        public static PostgreSqlStoredConnection CheckPostgreSource(IDatabaseSource source)
        {
            PostgreSqlStoredConnection sconn = source.Connection.StoredConnection as PostgreSqlStoredConnection;

            if (sconn == null)
            {
                throw new InvalidInputError("DAE-00349 " + Texts.Get("s_connection_required$engine", "engine", "PostgreSQL"));
            }
            return(sconn);
        }
示例#3
0
        public override void SaveConnection()
        {
            PostgreSqlStoredConnection conn = (PostgreSqlStoredConnection)m_conn;

            conn.DataSource = tbxDataSource.Text;
            conn.Login      = tbxLogin.Text;
            conn.Password   = tbxPassword.Text;
            try { conn.Port = Int32.Parse(tbxPort.Text); }
            catch { conn.Port = 0; }
        }