public ConnFrame(PostgreSqlStoredConnection conn) : base(conn) { InitializeComponent(); tbxDataSource.Text = conn.DataSource; tbxLogin.Text = conn.Login; tbxPassword.Text = conn.Password; tbxPort.Text = conn.Port.ToString(); }
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); }
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; } }