Ejemplo n.º 1
0
 /// <summary>
 ///  发帖
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static OCFCLive ForumTopic_Add(OCFCLive model)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@TopicID", dbType: DbType.Int32, direction: ParameterDirection.Output);
             p.Add("@OCID", model.OCID);
             p.Add("@CourseID", 0);
             p.Add("@ForumTypeID", 0);
             p.Add("@GroupTaskID", 0);
             p.Add("@UserID", model.UserID);
             p.Add("@UserName", model.UserName);
             p.Add("@Title", model.Title);
             p.Add("@Conten", "");
             p.Add("@TopicType", 1); //1FC主题 2MOOC主题 3小组讨论主题
             p.Add("@Tags", "");
             p.Add("@ChapterID", 0);
             conn.Execute("ForumTopic_Add", p, commandType: CommandType.StoredProcedure);
             model.TopicID = p.Get<int>("TopicID");
             return model;
         }
     }
     catch (Exception e)
     {
         return null;
     }
 }
Ejemplo n.º 2
0
 /// 更改论题(OCFC)
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool ForumTopicTitle_Upd(OCFCLive model)
 {
     return ForumTopicDAL.ForumTopicTitle_Upd(model);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 编辑贴子(OCFC)
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool ForumTopicTitle_Upd(OCFCLive model)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@TopicID", model.TopicID);
             p.Add("@Title", model.Title);
             conn.Execute("ForumTopicTitle_Upd", p, commandType: CommandType.StoredProcedure);
             return true;
         }
     }
     catch (Exception e)
     {
         return false;
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 发帖
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public OCFCLive ForumTopic_Add(OCFCLive model)
 {
     //model.UserID = UserService.CurrentUser.UserID;
     //model.UserName = UserService.CurrentUser.UserName;
     return ForumTopicDAL.ForumTopic_Add(model);
 }