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

@@ -974,6 +974,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addUser";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@UserID", _UserID);
@@ -1023,6 +1024,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addUser";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@UserID", userID);
@@ -1094,6 +1096,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateUser";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@UID", _UID);
@@ -1155,6 +1158,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateUser";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@UID", uid);
@@ -1204,6 +1208,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteUser";
cm.Parameters.AddWithValue("@UID", criteria.UID);
cm.ExecuteNonQuery();
@@ -1226,6 +1231,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteUser";
// Input PK Fields
cm.Parameters.AddWithValue("@UID", uid);
@@ -1278,6 +1284,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsUser";
cm.Parameters.AddWithValue("@UID", _UID);
int count = (int)cm.ExecuteScalar();