/// <summary> /// Returns a game from a given code /// </summary> /// <param name="code">16 char string of game code</param> /// <returns>id of game if found, else -1</returns> public static int GetGameFromCode(string code) { DataRow row = DalHelper.RowWhere("GameCodes", "Code", code, "Game"); if (row == null) { return(-1); } return((int)row["Game"]); }
/// <summary> /// Gets a user by username /// </summary> /// <param name="username">username of user</param> /// <returns>DataRow of user data</returns> public static DataRow GetUserByName(string username) { return(DalHelper.RowWhere("Users", "Username", username)); }