private ObjectList<NoticeNotice> FilterNotices(ObjectList<NoticeNotice> noticesToBeFiltered, NoticeNoticeTemplate template) { ObjectList<NoticeNotice> list = new ObjectList<NoticeNotice>(); System.Data.DataTable table = NoticeNotice.GetHeader(noticesToBeFiltered, this.cbHideClosedAccounts.get_Checked(), this.cbNoticeInformation.get_Checked()); System.Data.DataSet set = NoticeNotice.GetReport(noticesToBeFiltered, template.Sql, true); foreach (NoticeNotice notice in noticesToBeFiltered) { bool flag = false; foreach (System.Data.DataRow row in table.Rows) { if (System.Convert.ToInt64(row.get_Item("id")) == notice.Id) { foreach (System.Data.DataRow row2 in set.Tables.get_Item(0).Rows) { if (System.Convert.ToInt64(row2.get_Item("id")) == notice.Id) { flag = true; break; } } } } if (flag) { list.Add(notice); } } return list; }
public NoticeReportGeneratorAccount(NoticeNoticeTemplate noticeNoticeTemplate, Account account, System.DateTime noticePeriod) : this(noticeNoticeTemplate.GetDefaultNoticeNoticeTemplateSetting(), account, noticePeriod) { }