/// <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); }
/// <summary> /// 添加公告信息 /// </summary> /// <param name="Notice"></param> /// <returns></returns> public bool Add(Entity.T_Notice Notice) { return(NoticeDb.Insert(Notice)); }
/// <summary> /// 更新公告信息 /// </summary> /// <param name="Notice"></param> /// <returns></returns> public bool Update(Entity.T_Notice Notice) { return(NoticeDb.Update(Notice)); }
/// <summary> /// 通过ID查询 /// </summary> /// <param name="id"></param> /// <returns></returns> public Entity.T_Notice FindById(int id) { return(NoticeDb.GetById(id)); }