| 123456789101112131415161718192021222324252627282930313233 | using System; using System.Collections.Generic; using System.Text; using System.Data; using SysBaseLibs; using System.Web.Script.Serialization;using System.Web.UI.HtmlControls;namespace SysDataLibs.TableClass{    #region      BulletinInfo    public partial class BulletinInfo_info     {                public static int HasNotRead(string pcType, UserSession poSession)        {            string date = DateTime.Now.AddMonths(-1).ToShortDateString();            string lcSql = "select count(*) as mscount from " + Tn.BulletinInfo + "  where " + BulletinInfo_info.cBulletinTypeID + "='" + pcType +                "' and UpdateTime > '" + date + "' AND AuditFlag='1' and " + BulletinInfo_info.cID + " not in (select " + Sys_AttachTables_info.cSourceKey + " from " + Tn.Sys_AttachTables + " where " + Sys_AttachTables_info.cTableId + "='" + Tn.BulletinInfo + "' and " + Sys_AttachTables_info.cUserID + "='" + poSession.UserInfo.UserID + "')";            rsQuery loQuery = poSession.DBConn.OpenQuery(lcSql);            if (loQuery != null && loQuery.IsOpened)            {                return loQuery.GetInt("mscount");            }            return 0;        }    }    #endregion }
 |