|
@@ -1,7 +1,9 @@
|
|
|
-using System;
|
|
|
+using SXLibrary;
|
|
|
+using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Data.SqlClient;
|
|
|
+using System.Diagnostics;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
@@ -28,9 +30,9 @@ namespace MOKA_Factory_Tools.Database
|
|
|
connection.Close();
|
|
|
return true;
|
|
|
}
|
|
|
- catch
|
|
|
+ catch(Exception e)
|
|
|
{
|
|
|
-
|
|
|
+ Log.WriteErrorLog(string.Format("{0}", e.Message));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -870,6 +872,7 @@ namespace MOKA_Factory_Tools.Database
|
|
|
}
|
|
|
catch (System.Data.SqlClient.SqlException e)
|
|
|
{
|
|
|
+ Log.WriteErrorLog(string.Format("{0}-{1}", strSQL, e.Message));
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
@@ -897,6 +900,7 @@ namespace MOKA_Factory_Tools.Database
|
|
|
catch (System.Data.SqlClient.SqlException e)
|
|
|
{
|
|
|
connection.Close();
|
|
|
+ Log.WriteErrorLog(string.Format("{0}.{1}", strSQL, e.Message));
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
@@ -924,6 +928,7 @@ namespace MOKA_Factory_Tools.Database
|
|
|
}
|
|
|
catch (System.Data.SqlClient.SqlException e)
|
|
|
{
|
|
|
+ Log.WriteErrorLog(string.Format("{0}.{1}", strSQL, e.Message));
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
@@ -951,6 +956,7 @@ namespace MOKA_Factory_Tools.Database
|
|
|
}
|
|
|
catch (System.Data.SqlClient.SqlException e)
|
|
|
{
|
|
|
+ Log.WriteErrorLog(string.Format("{0}.{1}", strSQL, e.Message));
|
|
|
throw e;
|
|
|
}
|
|
|
}
|