Esempio n. 1
0
 /// <summary>
 /// 编辑贴子
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool ForumTopic_Upd(ForumTopic model)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@TopicID", model.TopicID);
             p.Add("@Title", model.Title);
             p.Add("@ForumTypeID", model.ForumTypeID);
             p.Add("@ChapterID", model.ChapterID);
             p.Add("@Conten", model.Conten);
             p.Add("@Tags", model.Tags);
             conn.Execute("ForumTopic_Upd", p, commandType: CommandType.StoredProcedure);
             return true;
         }
     }
     catch (Exception e)
     {
         return false;
     }
 }
Esempio n. 2
0
        public static List<ForumTopic> App_ForumTopic_List(ForumTopic model, int IsMyClass, int PageIndex, int PageSize)
        {
            try
            {
                using (var conn = DbHelper.CCService())
                {
                    var p = new DynamicParameters();
                    p.Add("@SearchKey", model.SearchKey);
                    p.Add("@OCID", model.OCID);
                    p.Add("@UserID", model.UserID);
                    p.Add("@ForumTypeID", model.ForumTypeID);
                    p.Add("@IsEssence", model.IsEssence);
                    p.Add("@IsMyStart", model.IsMyStart);
                    p.Add("@IsMyJoin", model.IsMyJoin);
                    p.Add("@IsMyClass", IsMyClass);
                    p.Add("@PageSize", PageSize);
                    p.Add("@PageIndex", PageIndex);
                    return conn.Query<ForumTopic>("App_ForumTopic_List", p, commandType: CommandType.StoredProcedure).ToList();
                }
            }
            catch (Exception e)
            {

                return null;
            }
        }
Esempio n. 3
0
 public static bool ForumTopic_Upd(ForumTopic model)
 {
     return new ForumTopicBLL().ForumTopic_Upd(model);
 }
Esempio n. 4
0
 /// <summary>
 /// 发帖
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static ForumTopic ForumTopic_Add(ForumTopic 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", model.CourseID);
             p.Add("@ForumTypeID", model.ForumTypeID);
             p.Add("@GroupTaskID", 0);
             p.Add("@UserID", model.UserID);
             p.Add("@UserName", model.UserName);
             p.Add("@Title", model.Title);
             p.Add("@Conten", model.Conten);
             p.Add("@TopicType", model.TopicType);
             p.Add("@ChapterID", model.ChapterID);
             p.Add("@Tags", model.Tags);
             conn.Execute("ForumTopic_Add", p, commandType: CommandType.StoredProcedure);
             model.TopicID = p.Get<int>("TopicID");
             return model;
         }
     }
     catch (Exception e)
     {
         return null;
     }
 }
Esempio n. 5
0
 public static ForumTopic ForumTopic_Add(ForumTopic model)
 {
     IES.JW.Model.User user = IES.Service.UserService.CurrentUser;
     model.UserID = user.UserID;
     model.UserName = user.UserName;
     return new ForumTopicBLL().ForumTopic_Add(model);
 }
Esempio n. 6
0
 public static List<ForumTopic> ForumTopic_Search(ForumTopic model, int PageIndex = 1, int PageSize = 20)
 {
     return new ForumTopicBLL().ForumTopic_Search(model, PageIndex, PageSize);
 }
Esempio n. 7
0
 public List<ForumTopic> App_ForumTopic_List(ForumTopic model, int IsMyClass, int PageIndex, int PageSize)
 {
     return ForumTopicDAL.App_ForumTopic_List(model,IsMyClass,PageIndex,PageSize);
 }
Esempio n. 8
0
 /// <summary>
 /// 编辑贴子
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool ForumTopic_Upd(ForumTopic model)
 {
     return ForumTopicDAL.ForumTopic_Upd(model);
 }
Esempio n. 9
0
 /// <summary>
 /// 论坛主题查询
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public List<ForumTopic> ForumTopic_Search(ForumTopic model, int PageIndex = 1, int PageSize = 20)
 {
     return ForumTopicDAL.ForumTopic_Search(model, PageIndex, PageSize);
 }
Esempio n. 10
0
 /// <summary>
 /// 发帖
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ForumTopic ForumTopic_Add(ForumTopic model)
 {
     return ForumTopicDAL.ForumTopic_Add(model);
 }
Esempio n. 11
0
 /// <summary>
 /// 新增论题
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static ForumTopic ForumTopic_ADD(ForumTopic model)
 {
     return new ForumTopic();
 }