/// <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; } }
/// 更改论题(OCFC) /// </summary> /// <param name="model"></param> /// <returns></returns> public bool ForumTopicTitle_Upd(OCFCLive model) { return ForumTopicDAL.ForumTopicTitle_Upd(model); }
/// <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; } }
/// <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); }