public static String GetXml(int id) { String commStr = "select * from Topic where id = " + id; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }
public static String GetRecommandTopic(String Part) { String commStr = "select * from Topic where Recommand = 1 and Part in ('" + Part.Substring(0,Part.Length-1).Replace(",","','") + "')"; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }
public static String GetUserTopic(String Author) { String commStr = "select * from Topic where Author = '" + Author + "'"; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }
public static String GetPartTopic(String Part) { String commStr = "select * from Topic where Part = '" + Part + "'"; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }
public static String GetAllRecommandTopic() { String commStr = "select * from Topic where Recommand = 1"; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }
public static String GetTopicAnswer(int TopicId) { String commStr = "select * from Answer where TopicId = " + TopicId; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }
public static String GetXml(String UserName) { String commStr = "select UserName,Email,StudentNumber,Major,AccumulatePoint,FocusPart from Users where UserName = '******'"; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }
public static String GetRecommandAnswer() { String commStr = "select * from Answer where Recommand = 1"; SQL sql = new SQL(); String ans = sql.ExecuteXml(commStr); sql.Dispose(); return ans; }