示例#1
0
 /// <summary>
 /// 判断公告是否已读
 /// </summary>
 /// <param name="Notice"></param>
 /// <param name="UserName"></param>
 /// <returns></returns>
 public static bool IsRead(int Notice, string UserName)
 {
     if (PN_HasReadUserBLL.GetModelList("Notice=" + Notice.ToString() + " AND Username='******'").Count > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#2
0
        /// <summary>
        /// 设置公告已读记录
        /// </summary>
        /// <param name="Notice"></param>
        /// <param name="UserName"></param>
        /// <param name="ReadInfo"></param>
        /// <returns></returns>
        public static int SetRead(int Notice, string UserName, string ReadInfo)
        {
            PN_HasReadUserBLL bll = new PN_HasReadUserBLL();

            bll.Model.Notice   = Notice;
            bll.Model.Username = UserName;
            bll.Model.ReadTime = DateTime.Now;
            bll.Model.ReadInfo = ReadInfo;
            int ret = bll.Add();

            return(ret >= 0 ? 0 : ret);
        }