Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JoseGonzalez321/880047ba224fe45ce407 to your computer and use it in GitHub Desktop.
Save JoseGonzalez321/880047ba224fe45ce407 to your computer and use it in GitHub Desktop.
private static Dictionary<string, object> SetupStoredProcParameters(Level level,
DateTime valueDate,
string branch,
string levelName,
string subLevelName)
{
var parameters = new Dictionary<string, object>();
switch(level)
{
case Level.Top:
parameters.Add(StoredProcParam.ValueDate, valueDate);
parameters.Add(StoredProcParam.Branch, branch);
break;
case Level.One:
parameters.Add(StoredProcParam.ValueDate, valueDate);
parameters.Add(StoredProcParam.Branch, branch);
parameters.Add(StoredProcParam.LevelName, levelName);
break;
case Level.Two:
parameters.Add(StoredProcParam.ValueDate, valueDate);
parameters.Add(StoredProcParam.Branch, branch);
parameters.Add(StoredProcParam.LevelName, levelName);
parameters.Add(StoredProcParam.SubLevelName, subLevelName);
break;
default:
break;
}
return parameters;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment