/// <summary>
        /// 阅读短信
        /// </summary>
        /// <param name="id">短信ID</param>
        /// <returns>数据集</returns>
        public DataTable Read(string id)
        {
            // 阅读处理
            DataTable dataTable = this.GetDataTableById(id);
            BaseContactDetailsEntity contactDetailsEntity = new BaseContactDetailsEntity(dataTable);

            this.OnRead(contactDetailsEntity);
            // 返回结果
            BaseContactManager contactManager = new BaseContactManager(DbHelper, UserInfo);

            return(contactManager.GetDataTableById(contactDetailsEntity.ContactId));
        }
        /// <summary>
        /// 邮件有评论时要进行的操作
        /// </summary>
        /// <param name="detailsID">邮件主键</param>
        /// <returns>影响行数</returns>
        public int OnCommnet(string detailsId)
        {
            int returnValue = 0;
            BaseContactDetailsEntity contactDetailsEntity = this.GetEntity(detailsId);
            // 更新子表的其他人的通知,首先是有效的邮件,其次不是新邮件,其次不是自己的邮件
            string sqlQuery = " UPDATE BaseContactDetails "
                              + "    SET NewComment = 1 "
                              + "  WHERE (Enabled = 1) "
                              + "        AND (IsNew = 0) "
                              + "        AND (ContactId = '" + contactDetailsEntity.ContactId + "') "
                              + "        AND (ID <> '" + detailsId + "')";

            returnValue += DbHelper.ExecuteNonQuery(sqlQuery);
            BaseContactManager contactManager = new BaseContactManager(DbHelper, UserInfo);
            BaseContactEntity  contactEntity  = contactManager.GetEntity(contactDetailsEntity.ContactId);

            // 更新主表状态,评论人、评论时间发布上去
            contactEntity.CommentDate         = DateTime.Now;
            contactEntity.CommentUserId       = UserInfo.Id;
            contactEntity.CommentUserRealName = UserInfo.RealName;
            returnValue += contactManager.Update(contactEntity);
            return(returnValue);
        }
 /// <summary>
 /// 阅读短信
 /// </summary>
 /// <param name="id">短信ID</param>
 /// <returns>数据集</returns>
 public DataTable Read(string id)
 {
     // 阅读处理
     DataTable dataTable = this.GetDataTableById(id);
     BaseContactDetailsEntity contactDetailsEntity = new BaseContactDetailsEntity(dataTable);
     this.OnRead(contactDetailsEntity);
     // 返回结果
     BaseContactManager contactManager = new BaseContactManager(DbHelper, UserInfo);
     return contactManager.GetDataTableById(contactDetailsEntity.ContactId);
 }
 /// <summary>
 /// 邮件有评论时要进行的操作
 /// </summary>
 /// <param name="detailsID">邮件主键</param>
 /// <returns>影响行数</returns>
 public int OnCommnet(string detailsId)
 {
     int returnValue = 0;
     BaseContactDetailsEntity contactDetailsEntity = this.GetEntity(detailsId);
     // 更新子表的其他人的通知,首先是有效的邮件,其次不是新邮件,其次不是自己的邮件
     string sqlQuery = " UPDATE BaseContactDetails "
                     + "    SET NewComment = 1 "
                     + "  WHERE (Enabled = 1) "
                     + "        AND (IsNew = 0) "
                     + "        AND (ContactId = '" + contactDetailsEntity.ContactId + "') "
                     + "        AND (ID <> '" + detailsId + "')";
     returnValue += DbHelper.ExecuteNonQuery(sqlQuery);
     BaseContactManager contactManager = new BaseContactManager(DbHelper, UserInfo);
     BaseContactEntity contactEntity = contactManager.GetEntity(contactDetailsEntity.ContactId);
     // 更新主表状态,评论人、评论时间发布上去
     contactEntity.CommentDate = DateTime.Now;
     contactEntity.CommentUserId = UserInfo.Id;
     contactEntity.CommentUserRealName = UserInfo.RealName;
     returnValue += contactManager.Update(contactEntity);
     return returnValue;
 }