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

@@ -893,6 +893,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addGroup";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@GroupName", _GroupName);
@@ -935,6 +936,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addGroup";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@GroupName", groupName);
@@ -998,6 +1000,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateGroup";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@GID", _GID);
@@ -1053,6 +1056,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateGroup";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@GID", gid);
@@ -1094,6 +1098,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteGroup";
cm.Parameters.AddWithValue("@GID", criteria.GID);
cm.ExecuteNonQuery();
@@ -1116,6 +1121,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteGroup";
// Input PK Fields
cm.Parameters.AddWithValue("@GID", gid);
@@ -1168,6 +1174,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsGroup";
cm.Parameters.AddWithValue("@GID", _GID);
int count = (int)cm.ExecuteScalar();