示例#1
0
文件: Debates.cs 项目: sword88/ASEWH
 /// <summary>
 /// 更新辩论信息
 /// </summary>
 /// <param name="debateInfo">辩论信息</param>
 /// <returns></returns>
 public static bool UpdateDebateTopic(DebateInfo debateInfo)
 {
     return DatabaseProvider.GetInstance().UpdateDebateTopic(debateInfo);
 }
示例#2
0
文件: Debates.cs 项目: sword88/ASEWH
 /// <summary>
 /// 增加辩论主题扩展信息
 /// </summary>
 /// <param name="debatetopic"></param>
 public static void CreateDebateTopic(DebateInfo debateInfo)
 {
     //debatetopic = ReviseDebateTopicColor(debatetopic);
     DatabaseProvider.GetInstance().CreateDebateTopic(debateInfo);
 }
示例#3
0
文件: Debates.cs 项目: sword88/ASEWH
 /// <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;
 }