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

@@ -877,6 +877,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addRevision";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ItemID", _ItemID);
@@ -922,6 +923,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addRevision";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ItemID", itemID);
@@ -988,6 +990,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateRevision";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@RevisionID", _RevisionID);
@@ -1046,6 +1049,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateRevision";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@RevisionID", revisionID);
@@ -1090,6 +1094,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteRevision";
cm.Parameters.AddWithValue("@RevisionID", criteria.RevisionID);
cm.ExecuteNonQuery();
@@ -1112,6 +1117,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteRevision";
// Input PK Fields
cm.Parameters.AddWithValue("@RevisionID", revisionID);
@@ -1164,6 +1170,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsRevision";
cm.Parameters.AddWithValue("@RevisionID", _RevisionID);
int count = (int)cm.ExecuteScalar();