LU logger bug fix. version 2.2.220.

This commit is contained in:
Milan Hanajik
2016-02-18 01:51:54 +01:00
parent a62ce451c4
commit 014ec3924f
3 changed files with 22 additions and 12 deletions
+15 -5
View File
@@ -79,17 +79,27 @@ namespace TBF.Forms
if (b.BatchNr == data.BatchNr)
{
#if IPERLST
OracleConnection conn = (Database.DBCfg.DBUsed == DBUsed.Production)
? new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;")
: new OracleConnection("Data Source=STARA_TEST.WORLD;User Id=deltachef;Password=deltachef;");
//System.IO.StreamWriter logger;
//string fname = "C:\\TBF\\Logs\\test.log";
//try { logger = new System.IO.StreamWriter(System.IO.File.Create(fname)); }
//catch
//{
// logger = null;
// log.ErrorFormat("Was not able to open LU log file {0}", fname);
//}
//Database.WriteLogsToDisk(logger, b);
OracleConnection conn = (Database.DBCfg.DBUsed == DBUsed.Production)
? new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;")
: new OracleConnection("Data Source=STARA_TEST.WORLD;User Id=deltachef;Password=deltachef;");
if (Database.WriteResultsToDatabase(conn, b) == Retv.OK)
{
b.RsltsSent = true; /// Result was successfully sent
session.SaveOrUpdate(b); /// Update MySQL DB
session.Flush();
session.Flush();
(sender as PreviousResultCtrl).Sent = true; /// Update UI
Redraw();
Redraw();
}
else
{