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

@@ -886,6 +886,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addPermission";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@RID", RID);
@@ -931,6 +932,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addPermission";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@RID", myRole.RID);
@@ -1000,6 +1002,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updatePermission";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@PID", _PID);
@@ -1056,6 +1059,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updatePermission";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@PID", pid);
@@ -1102,6 +1106,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deletePermission";
cm.Parameters.AddWithValue("@PID", criteria.PID);
cm.ExecuteNonQuery();
@@ -1124,6 +1129,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deletePermission";
// Input PK Fields
cm.Parameters.AddWithValue("@PID", pid);
@@ -1176,6 +1182,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsPermission";
cm.Parameters.AddWithValue("@PID", _PID);
int count = (int)cm.ExecuteScalar();