public static HPV1618Result GetResult(string pantherHPV16Result, string pantherHPV1845Result) { HPV1618Result result = null; if (pantherHPV16Result == PantherHPV16PositiveResult || pantherHPV1845Result == PantherHPV1845PositiveResult) { result = new HPV1618OneOrBothPositiveResult(pantherHPV16Result, pantherHPV1845Result); } else if (pantherHPV16Result == PantherHPV16InvalidResult || pantherHPV1845Result == PantherHPV1845InvalidResult) { result = new HPV1618InvalidResult(); } else { result = new HPV1618BothNegativeResult(); } return(result); }
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 hpv16Result = (string)payload["hpv16Result"]; string hpv18Result = (string)payload["hpv1845Result"]; HPV1618Result hpv1618Result = HPV1618Result.GetResult(hpv16Result, hpv18Result); string sql = hpv1618Result.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 hpv16Result = (string)payload["hpv16Result"]; string hpv18Result = (string)payload["hpv1845Result"]; HPV1618Result hpv1618Result = HPV1618Result.GetResult(hpv16Result, hpv18Result); string sql = hpv1618Result.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()); }