public static string TeamLookupTeamNameByTeamNameInDatabase(DateTime StartDate, string LeagueName, string TeamSource, string TeamNameInDatabase) { List <string> SqlParmNames = new List <string>(); List <object> SqlParmValues = new List <object>(); SqlParmNames.Add("@StartDate"); SqlParmValues.Add(StartDate); SqlParmNames.Add("@LeagueName"); SqlParmValues.Add(LeagueName); SqlParmNames.Add("@TeamSource"); SqlParmValues.Add(TeamSource); SqlParmNames.Add("@TeamNameInDatabase"); SqlParmValues.Add(TeamNameInDatabase); string StoredProcedureName = "TeamLookupTeamNameByTeamNameInDatabase"; string ConnectionString = GetConnectionString( ); string s = DALfunctions.ExecuteStoredProcedureQueryReturnSingleParm(ConnectionString, StoredProcedureName, SqlParmNames, SqlParmValues); if (String.IsNullOrEmpty(s)) { throw new Exception($"TeamLoop Exception - {StartDate} - {LeagueName} - TeamSource: {TeamSource} - Team: {TeamNameInDatabase}"); } return(s); }
public static string TeamLookupSourceToSource(DateTime StartDate, string LeagueName, string TeamSourceFrom, string TeamSourceTo, string TeamName) { List <string> SqlParmNames = new List <string>(); List <object> SqlParmValues = new List <object>(); SqlParmNames.Add("@StartDate"); SqlParmValues.Add(StartDate); SqlParmNames.Add("@LeagueName"); SqlParmValues.Add(LeagueName); SqlParmNames.Add("@TeamSourceFrom"); SqlParmValues.Add(TeamSourceFrom); SqlParmNames.Add("@TeamSourceTo"); SqlParmValues.Add(TeamSourceTo); SqlParmNames.Add("@TeamName"); SqlParmValues.Add(TeamName); string StoredProcedureName = "TeamLookupSourceToSource"; string ConnectionString = GetConnectionString(); string s = DALfunctions.ExecuteStoredProcedureQueryReturnSingleParm(ConnectionString, StoredProcedureName, SqlParmNames, SqlParmValues); return(s); }