mirror of
https://github.com/Queercon/QC14-Badge-Webview.git
synced 2025-08-14 18:47:38 -07:00
sql helper and code for view selection start
This commit is contained in:
parent
95032586d5
commit
11f497adee
2 changed files with 43 additions and 2 deletions
|
@ -8,7 +8,7 @@ namespace qcbadge.Controllers
|
|||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public IActionResult Index(string s)
|
||||
public IActionResult Index(string s, string id)
|
||||
{
|
||||
if ((String.Compare(Startup.scode, s, true) == 0))
|
||||
{
|
||||
|
@ -17,11 +17,19 @@ namespace qcbadge.Controllers
|
|||
ViewData["1"] = 1;
|
||||
ViewData["38"] = 1;
|
||||
|
||||
if (String.IsNullOrEmpty(id))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return View();
|
||||
}
|
||||
else { return StatusCode(401); }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
33
qcbadge/Helpers/Sql.cs
Normal file
33
qcbadge/Helpers/Sql.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
|
||||
namespace qcbadge.Helpers
|
||||
{
|
||||
public class Sql
|
||||
{
|
||||
private static string DataSource = Startup.dburi;
|
||||
private static string UserID = Startup.dbuser;
|
||||
private static string Password = Startup.dbpass;
|
||||
private static string db = Startup.dbname;
|
||||
private static string table = "qcbdage";
|
||||
|
||||
public bool[] selectGlobalView()
|
||||
{
|
||||
bool[] rtn = new bool[50];
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
public bool[] selectIndervidualView(int badgeid)
|
||||
{
|
||||
bool[] rtn = new bool[50];
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue