spelling...

Indervidual view now working
This commit is contained in:
Jake Visser 2017-07-05 17:02:39 -07:00
commit 782e1e8619
3 changed files with 126 additions and 8 deletions

View file

@ -10,19 +10,36 @@ namespace qcbadge.Controllers
{
public IActionResult Index(string s, string id)
{
Helpers.Sql sql = new Helpers.Sql();
if ((String.Compare(Startup.scode, s, true) == 0))
{
ViewData["Message"] = "";
ViewData["0"] = 1;
ViewData["1"] = 1;
ViewData["38"] = 1;
ViewData["0"] = 0;
ViewData["1"] = 0;
ViewData["38"] = 0;
bool[] imglist = new bool[50];
if (String.IsNullOrEmpty(id))
{
imglist = sql.selectGlobalView();
for (int i = 0; i < 50; i++)
{
ViewData[i.ToString()] = imglist[i];
}
}
else
{
int badgeid = Convert.ToInt32(id);
badgeid = badgeid - 1;
imglist = sql.selectIndervidualView(badgeid);
for (int i = 0; i < 50; i++)
{
ViewData[i.ToString()] = imglist[i];
}
}