Skip to content

Commit

Permalink
Signed-off-by: matt <[email protected]>
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantAsylum committed Apr 10, 2020
1 parent f795e09 commit 075c265
Show file tree
Hide file tree
Showing 15 changed files with 371 additions and 184 deletions.
19 changes: 5 additions & 14 deletions Tractor/Com.QuantAsylum.Tractor.Database/AuditDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static public string CheckService()
}
catch (Exception ex)
{

Log.WriteLine(LogType.Database, "CheckService() exception: " + ex.Message);
}

throw new HttpRequestException("CheckService() failed");
Expand Down Expand Up @@ -163,7 +163,7 @@ static public List<string> QueryGroupsBySerialNumber(string pid, string sn)
}
catch (Exception ex)
{

Log.WriteLine(LogType.Database, "QueryGroupsBySerialNumber() exception: " + ex.Message);
}

return new List<string> { "An error occured in QueryGroupsBySerialNumber()" };
Expand Down Expand Up @@ -205,7 +205,7 @@ static public string QueryTestsByGroup(string pid, string group)
}
catch (Exception ex)
{

Log.WriteLine(LogType.Database, "QueryTestsByGroup() exception: " + ex.Message);
}

return "An error occurred in QueryTestByGroup()";
Expand All @@ -230,7 +230,7 @@ static public List<string> QueryTestNames(string pid)
}
catch (Exception ex)
{

Log.WriteLine(LogType.Database, "QueryTestNames() exception: " + ex.Message);
}

return new List<string> { "An error occured in QueryTestNames()" };
Expand Down Expand Up @@ -274,7 +274,7 @@ static public string QueryStatsByTest(string pid, string testName, string testSe
}
catch (Exception ex)
{

Log.WriteLine(LogType.Database, "QueryStatsByTest() exception: " + ex.Message);
}

return "An error occurred. ";
Expand All @@ -295,15 +295,6 @@ static public string QueryTestNamesByProductId(string pid)
List<double> vals = jsSerializer.Deserialize<List<double>>(result);

StringBuilder sb = new StringBuilder();
//if (ad.Count > 0)
//{
// sb.AppendLine("Unit: " + ad[0].SerialNumber);
// sb.AppendLine("Date: " + ad[0].Time.ToString());
// for (int i = 0; i < ad.Count; i++)
// {
// sb.AppendFormat("{0}[{1}] {2} [{3}] {4}" + Environment.NewLine, ad[i].Name, ad[i].Channel, ad[i].ResultString, ad[i].TestLimits, ad[i].PassFail);
// }
//}

return sb.ToString();
}
Expand Down
8 changes: 4 additions & 4 deletions Tractor/Com.QuantAsylum.Tractor.Database/Db.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static public bool CreateNew(string connectString)
}
catch (Exception ex)
{
Log.WriteLine(LogType.Database, ex.Message);
Log.WriteLine(LogType.Database, "CreateNew() exception: " + ex.Message);
}

return false;
Expand All @@ -38,7 +38,7 @@ static public bool DeleteExisting(string connectString)
}
catch (Exception ex)
{
Log.WriteLine(LogType.Database, ex.Message);
Log.WriteLine(LogType.Database, "DeleteExisting() exception: " + ex.Message);
}

return false;
Expand All @@ -58,7 +58,7 @@ static public bool OpenExisting(string connectString)
}
catch (Exception ex)
{
Log.WriteLine(LogType.Database, ex.Message);
Log.WriteLine(LogType.Database, "OpenExisting() exception: " + ex.Message);
}

return false;
Expand All @@ -76,7 +76,7 @@ static public bool InsertTest(Test tri)
}
catch (Exception ex)
{
Log.WriteLine(LogType.Error, "Exception submitting changes in InsertTest(): " + ex.Message);
Log.WriteLine(LogType.Error, "InsertTest() exception: " + ex.Message);
}

return false;
Expand Down
6 changes: 4 additions & 2 deletions Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ private void button2_Click(object sender, EventArgs e)
}
catch (Exception ex)
{
MessageBox.Show("Web service call failed: " + ex.Message);
string s = "Web service call failed exception: " + ex.Message;
Log.WriteLine(LogType.Database, s);
MessageBox.Show(s);
}
}

Expand Down Expand Up @@ -221,7 +223,7 @@ private void LoadGuid(TextBox tb)
}
catch (Exception ex)
{
Log.WriteLine(LogType.Error, "An exception occured load a PID fron a file: " + ex.Message);
Log.WriteLine(LogType.Error, "An exception occured loading a PID fron a file: " + ex.Message);
}
}

Expand Down
Loading

0 comments on commit 075c265

Please sign in to comment.