public void InviteSerialList(
            string filter
            , string mode
            , int pageNumber
            , InviteSerialManagerTemplate listItem
            , GlobalTemplateMembers.CommonHeadFootTemplate foot
            , GlobalTemplateMembers.CommonHeadFootTemplate head
            )
        {
            InviteSerialFilter     searchFilter = InviteSerialFilter.GetFromFilter(filter);
            InviteSerialCollection inviteSerials;

            int rowCount;

            if (searchFilter == null)
            {
                searchFilter = new InviteSerialFilter();
            }
            int?owner = null;

            if (string.IsNullOrEmpty(mode) || !mode.Equals("admin", StringComparison.OrdinalIgnoreCase))
            {
                if (searchFilter.Status == null)
                {
                    searchFilter.Status = InviteSerialStatus.Unused;
                }
                owner = User.CurrentID;
            }

            inviteSerials = InviteBO.Instance.GetInviteSerials(User.Current, owner, searchFilter, pageNumber, out rowCount);

            UserBO.Instance.FillSimpleUsers(inviteSerials, 0);

            head.Invoke(new GlobalTemplateMembers.CommonHeadFootTemplateParams(rowCount, searchFilter.Pagesize));
            foreach (InviteSerial s in inviteSerials)
            {
                listItem.Invoke(s);
            }
            foot.Invoke(new GlobalTemplateMembers.CommonHeadFootTemplateParams(rowCount, searchFilter.Pagesize));
        }
Example #2
0
        private void DeleteAll()
        {
            InviteSerialFilter filter = InviteSerialFilter.GetFromFilter("filter");

            InviteBO.Instance.DeleteByFilter(My, filter);
        }