Ejemplo n.º 1
0
        public static NGCTResult GetResult(string pantherNGResult, string pantherCTResult)
        {
            NGCTResult result = null;

            if (pantherNGResult == PantherNGPositiveResult || pantherCTResult == PantherCTPositiveResult)
            {
                result = new NGCTOneOrBothPositiveResult(pantherNGResult, pantherCTResult);
            }
            else if (pantherNGResult == PantherNGInvalidResult || pantherCTResult == PantherCTInvalidResult)
            {
                result = new NGCTInvalidResult();
            }
            else
            {
                result = new NGCTBotNegativeResult();
            }
            return(result);
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }