BulletinInfo_info_Ext.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Data;
  5. using SysBaseLibs;
  6. using System.Web.Script.Serialization;
  7. using System.Web.UI.HtmlControls;
  8. namespace SysDataLibs.TableClass
  9. {
  10. #region BulletinInfo
  11. public partial class BulletinInfo_info
  12. {
  13. public static int HasNotRead(string pcType, UserSession poSession)
  14. {
  15. string date = DateTime.Now.AddMonths(-1).ToShortDateString();
  16. string lcSql = "select count(*) as mscount from " + Tn.BulletinInfo + " where " + BulletinInfo_info.cBulletinTypeID + "='" + pcType +
  17. "' 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 + "')";
  18. rsQuery loQuery = poSession.DBConn.OpenQuery(lcSql);
  19. if (loQuery != null && loQuery.IsOpened)
  20. {
  21. return loQuery.GetInt("mscount");
  22. }
  23. return 0;
  24. }
  25. }
  26. #endregion
  27. }