mirror of
https://github.com/Queercon/QC14-Badge-Webview.git
synced 2025-08-20 13:23:36 -07:00
spelling...
Indervidual view now working
This commit is contained in:
parent
11f497adee
commit
782e1e8619
3 changed files with 126 additions and 8 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue