Exemple #1
0
        /// <summary>
        /// 通过ID删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool Delete(int id)
        {
            var notice = FindById(id);

            if (notice != null)
            {
                notice.Notice_model_state = false;
                return(NoticeDb.Update(notice));
            }
            return(false);
        }
Exemple #2
0
 /// <summary>
 /// 添加公告信息
 /// </summary>
 /// <param name="Notice"></param>
 /// <returns></returns>
 public bool Add(Entity.T_Notice Notice)
 {
     return(NoticeDb.Insert(Notice));
 }
Exemple #3
0
 /// <summary>
 /// 更新公告信息
 /// </summary>
 /// <param name="Notice"></param>
 /// <returns></returns>
 public bool Update(Entity.T_Notice Notice)
 {
     return(NoticeDb.Update(Notice));
 }
Exemple #4
0
 /// <summary>
 /// 通过ID查询
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Entity.T_Notice FindById(int id)
 {
     return(NoticeDb.GetById(id));
 }