Esempio n. 1
0
 /// <summary>
 /// 更新辩论信息
 /// </summary>
 /// <param name="debateInfo">辩论信息</param>
 /// <returns></returns>
 public static bool UpdateDebateTopic(DebateInfo debateInfo)
 {
     return DatabaseProvider.GetInstance().UpdateDebateTopic(debateInfo);
 }
Esempio n. 2
0
 /// <summary>
 /// 增加辩论主题扩展信息
 /// </summary>
 /// <param name="debatetopic"></param>
 public static void CreateDebateTopic(DebateInfo debateInfo)
 {
     //debatetopic = ReviseDebateTopicColor(debatetopic);
     DatabaseProvider.GetInstance().CreateDebateTopic(debateInfo);
 }
Esempio n. 3
0
 /// <summary>
 /// 获取辩论的扩展信息
 /// </summary>
 /// <param name="tid">主题ID</param>
 /// <returns>辩论主题扩展信息</returns>
 public static DebateInfo GetDebateTopic(int tid)
 {
     IDataReader debatetopic = DatabaseProvider.GetInstance().GetDebateTopic(tid);
     DebateInfo topicexpand = new DebateInfo();
     if (debatetopic.Read())
     {
         topicexpand.Positiveopinion = debatetopic["positiveopinion"].ToString();
         topicexpand.Negativeopinion = debatetopic["negativeopinion"].ToString();
         topicexpand.Terminaltime = DateTime.Parse(debatetopic["terminaltime"].ToString());
         topicexpand.Positivediggs = TypeConverter.ObjectToInt(debatetopic["positivediggs"]);
         topicexpand.Negativediggs = TypeConverter.ObjectToInt(debatetopic["negativediggs"]);
         topicexpand.Tid = tid;
     }
     debatetopic.Close();
     return topicexpand;
 }