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

@@ -823,6 +823,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addMembership";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@UID", UID);
@@ -865,6 +866,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addMembership";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@UID", myUser.UID);
@@ -932,6 +934,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateMembership";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@UGID", _UGID);
@@ -985,6 +988,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateMembership";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@UGID", ugid);
@@ -1028,6 +1032,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteMembership";
cm.Parameters.AddWithValue("@UGID", criteria.UGID);
cm.ExecuteNonQuery();
@@ -1050,6 +1055,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteMembership";
// Input PK Fields
cm.Parameters.AddWithValue("@UGID", ugid);
@@ -1102,6 +1108,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsMembership";
cm.Parameters.AddWithValue("@UGID", _UGID);
int count = (int)cm.ExecuteScalar();