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

@@ -917,6 +917,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addDocument";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@LibTitle", _LibTitle);
@@ -962,6 +963,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addDocument";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@LibTitle", libTitle);
@@ -1027,6 +1029,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateDocument";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@DocID", _DocID);
@@ -1086,6 +1089,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateDocument";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@DocID", docID);
@@ -1129,6 +1133,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteDocument";
cm.Parameters.AddWithValue("@DocID", criteria.DocID);
cm.ExecuteNonQuery();
@@ -1151,6 +1156,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteDocument";
// Input PK Fields
cm.Parameters.AddWithValue("@DocID", docID);
@@ -1203,6 +1209,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsDocument";
cm.Parameters.AddWithValue("@DocID", _DocID);
int count = (int)cm.ExecuteScalar();