/// <summary> /// 获取帮助内容 /// </summary> /// <param name="id"></param> /// <returns>帮助内容</returns> public static HelpInfo GetMessage(int id) { IDataReader reader = DatabaseProvider.GetInstance().ShowHelp(id); HelpInfo info = null; if (reader != null) { if (reader.Read()) { info = new HelpInfo(); info.Title = reader["title"].ToString(); info.Message = reader["message"].ToString(); info.Pid = TypeConverter.ObjectToInt(reader["pid"]); info.Orderby = TypeConverter.ObjectToInt(reader["orderby"]); } reader.Close(); } return info; }
/// <summary> /// 获取帮助列表 /// </summary> /// <returns>帮助列表</returns> public static List<HelpInfo> GetHelpList() { IDataReader reader = DatabaseProvider.GetInstance().GetHelpList(); List<HelpInfo> helplist = new List<HelpInfo>(); while (reader.Read()) { HelpInfo info = new HelpInfo(); info.Id = TypeConverter.ObjectToInt(reader["id"]); info.Title = reader["title"].ToString(); info.Message = reader["message"].ToString(); info.Pid = TypeConverter.ObjectToInt(reader["pid"]); info.Orderby = TypeConverter.ObjectToInt(reader["orderby"]); helplist.Add(info); } reader.Close(); return helplist; }