public async Task <string> HandleResult(IDictionary <string, object> payload) { var connectionString = "Server = 10.1.2.26; Uid = sqldude; Pwd = 123Whatsup; Database = lis;"; string testName = (string)payload["testName"]; string aliquotOrderId = (string)payload["aliquotOrderId"]; string ngResult = (string)payload["ngResult"]; string ctResult = (string)payload["ctResult"]; NGCTResult ngctResult = NGCTResult.GetResult(ngResult, ctResult); string sql = ngctResult.GetSqlStatement(aliquotOrderId); using (var cnx = new MySqlConnection(connectionString)) { using (var cmd = new MySqlCommand(sql, cnx)) { await cnx.OpenAsync(); await cmd.ExecuteNonQueryAsync(); } } return("Optimus Prime updated result: " + aliquotOrderId + " - " + testName + " on " + DateTime.Now.ToString()); }
public async Task <string> HandleResult(IDictionary <string, object> payload) { var connectionString = "Data Source=TestSQL;Initial Catalog=YPIData;Integrated Security=True"; string testName = (string)payload["testName"]; string aliquotOrderId = (string)payload["aliquotOrderId"]; string ngResult = (string)payload["ngResult"]; string ctResult = (string)payload["ctResult"]; NGCTResult ngctResult = NGCTResult.GetResult(ngResult, ctResult); string sql = ngctResult.GetSqlStatement(aliquotOrderId); using (var cnx = new SqlConnection(connectionString)) { using (var cmd = new SqlCommand(sql, cnx)) { await cnx.OpenAsync(); await cmd.ExecuteNonQueryAsync(); } } return("Optimus Prime updated result: " + aliquotOrderId + " - " + testName + " on " + DateTime.Now.ToString()); }