Ejemplo n.º 1
0
        public static DataTable GetLectuer(MyMySql sql)
        {
            string sqlstr = $@"
SELECT * FROM lecture";

            return(sql.executeQuery(sqlstr));
        }
Ejemplo n.º 2
0
        public static DataTable GetBooks(MyMySql sql)
        {
            string SQLstr = $@"
SELECT * FROM books;";

            return(sql.executeQuery(SQLstr));
        }
Ejemplo n.º 3
0
        public static DataTable getUnAviliableSeats(MyMySql sql, string roomid)
        {
            string sqlstr = $@"
SELECT
    deskid, seatid
FROM
    seats
WHERE
    roomid = {roomid}
    AND backdatetime IS NULL";

            return(sql.executeQuery(sqlstr));
        }
Ejemplo n.º 4
0
        public static string[] getBooksByTag(MyMySql sql, string tagid)
        {
            string    sqlstr = $@"
SELECT bookid
FROM book_tag
WHERE tagid = {tagid}
GROUP BY bookid";
            DataTable table  = null;

            if ((table = sql.executeQuery(sqlstr)) != null)
            {
                string[] result = table.AsEnumerable().Select(d => d.Field <string>("bookid")).ToArray <string>();
                return(result);
            }
            return(null);
        }
Ejemplo n.º 5
0
 public static DataTable GetAllUsers(MyMySql sql_users)
 {
     return(sql_users.executeQuery(@"SELECT * FROM users"));
 }