private async Task GetLine(string inModel) { PostgresDatabase database = new PostgresDatabase(); string sSQL = "select distinct line from processtbl where model = @model order by line asc"; var modelpara = new NpgsqlParameter("@model", inModel); await database.ExecuteReaderAsync(SQLConnectString, sSQL, modelpara) .ContinueWith(t => this.Invoke((Action)(() => { LineResult(t.Result); }))); }
private async Task GetModel() { PostgresDatabase database = new PostgresDatabase(); List <processtbl> listModel = new List <processtbl>(); string sSQL = "select distinct model from processtbl order by model asc"; await database.ExecuteReaderAsync(SQLConnectString, sSQL) .ContinueWith(t => this.Invoke((Action)(() => { ModelResult(t.Result); }))); }