Added Command Timeout to each query that did not have a specified timeout

This commit is contained in:
Rich
2017-03-01 15:42:00 +00:00
parent b5f4a0751e
commit 32cf8e2f3c
49 changed files with 315 additions and 0 deletions

View File

@@ -656,6 +656,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addItemAudit";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ItemID", _ItemID);
@@ -693,6 +694,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addItemAudit";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ItemID", itemID);
@@ -754,6 +756,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateItemAudit";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@AuditID", _AuditID);
@@ -801,6 +804,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateItemAudit";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@AuditID", auditID);
@@ -839,6 +843,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteItemAudit";
cm.Parameters.AddWithValue("@AuditID", criteria.AuditID);
cm.ExecuteNonQuery();
@@ -861,6 +866,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteItemAudit";
// Input PK Fields
cm.Parameters.AddWithValue("@AuditID", auditID);