示例#1
0
文件: dbs.cs 项目: phill2/ITP5WS2013
        public List<String> Read_Comments()
        {
            SqlCommand st = new SqlCommand("SELECT body, gid, Users.username FROM Comments JOIN Users ON Comments.uid=Users.id");// JOIN Games ON Comments.gid=Games.id");

            dbc c = new dbc(st);
            return c.r(3);
        }
示例#2
0
文件: dbs.cs 项目: phill2/ITP5WS2013
 private List<String> Read_Max()
 {
     dbc c = new dbc(new SqlCommand("SELECT max(id) FROM Comments"));
     return c.r(1);
 }
示例#3
0
文件: dbs.cs 项目: phill2/ITP5WS2013
 public List<String> Read_Users()
 {
     SqlCommand st = new SqlCommand("SELECT username, email, id, acctype FROM Users");
     dbc c = new dbc(st);
     return c.r(4);
 }
示例#4
0
文件: dbs.cs 项目: phill2/ITP5WS2013
 public List<String> Read_Login(String usr, String pwd)
 {
     SqlCommand st = new SqlCommand("SELECT id, username, acctype FROM Users WHERE username=@una AND password=@pwd");
     st.Parameters.Add(new SqlParameter("una", usr));
     st.Parameters.Add(new SqlParameter("pwd", pwd));
     dbc c = new dbc(st);
     return c.r(3);
 }
示例#5
0
文件: dbs.cs 项目: phill2/ITP5WS2013
        public List<String> Read_Scores()
        {
            SqlCommand st = new SqlCommand("SELECT * FROM Scores");// JOIN Games ON Comments.gid=Games.id");

            dbc c = new dbc(st);
            return c.r(3);
        }
示例#6
0
文件: dbs.cs 项目: phill2/ITP5WS2013
 public List<String> Read_Category(String kat)
 {
     SqlCommand st = new SqlCommand("SELECT * FROM Games WHERE kategorie=@kat");
     st.Parameters.Add(new SqlParameter("kat", kat));
     dbc c = new dbc(st);
     return c.r(5);
 }