Пример #1
0
 /// <summary>
 /// 更新公告
 /// </summary>
 /// <param name="announcementInfo">公告对象</param>
 public static void UpdateAnnouncement(AnnouncementInfo announcementInfo)
 {
     DatabaseProvider.GetInstance().UpdateAnnouncement(announcementInfo);
 }
Пример #2
0
 /// <summary>
 /// 装载实体对象
 /// </summary>
 /// <param name="reader"></param>
 /// <returns></returns>
 private static AnnouncementInfo LoadSingleAnnouncementInfo(IDataReader reader)
 {
     AnnouncementInfo announcementInfo = new AnnouncementInfo();
     announcementInfo.Id = reader["id"].ToString();
     announcementInfo.Poster = reader["poster"].ToString();
     announcementInfo.Title = reader["title"].ToString();
     announcementInfo.Displayorder = TypeConverter.ObjectToInt(reader["displayorder"]);
     announcementInfo.Starttime = Convert.ToDateTime(reader["starttime"].ToString());
     announcementInfo.Endtime = Convert.ToDateTime(reader["endtime"].ToString());
     announcementInfo.Message = reader["message"].ToString();
     return announcementInfo;
 }