Added Command Timeout to each query that did not have a specified timeout
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user