// Get a movie id by name public static int GetMovieForViewing(string input) { string sql = SqlProcedures.GetMoviesForViewings(input); DataTable temp = Call(sql); if (temp.Rows.Count > 0) { int id; int.TryParse(temp.Rows[0][0].ToString(), out id); return(id); } else { return(-1); } }