GetVendorsByEmail() public method

public GetVendorsByEmail ( string Filter, int PortalId, int Page, int PageSize, int &TotalRecords ) : ArrayList
Filter string
PortalId int
Page int
PageSize int
TotalRecords int
return System.Collections.ArrayList
コード例 #1
0
ファイル: Vendors.ascx.cs プロジェクト: viraya/DNN.Vendors
        private void SetDataSource()
        {
            CreateLetterSearch();

            bool isUnauthorized = false;

            if (_searchFilter.Equals(Localization.GetString("All"), StringComparison.InvariantCultureIgnoreCase))
            {
                _searchFilter = "";
            }
            else if (_searchFilter.Equals(Localization.GetString("Unauthorized"), StringComparison.InvariantCultureIgnoreCase))
            {
                _searchFilter  = "";
                isUnauthorized = true;
            }

            //Get the list of vendors from the database
            var totalRecords     = 0;
            var vendorController = new Dnn.Modules.Vendors.Components.VendorsController();
            int portal           = Globals.IsHostTab(PortalSettings.ActiveTab.TabID) ? Null.NullInteger : PortalId;

            if (String.IsNullOrEmpty(_searchFilter))
            {
                grdVendors.DataSource       = vendorController.GetVendors(portal, isUnauthorized, grdVendors.CurrentPageIndex, grdVendors.PageSize, ref totalRecords);
                grdVendors.VirtualItemCount = totalRecords;
            }
            else
            {
                if (_searchField == "email")
                {
                    grdVendors.DataSource       = vendorController.GetVendorsByEmail(_searchFilter, portal, grdVendors.CurrentPageIndex, grdVendors.PageSize, ref totalRecords);
                    grdVendors.VirtualItemCount = totalRecords;
                }
                else
                {
                    grdVendors.DataSource       = vendorController.GetVendorsByName(_searchFilter, portal, grdVendors.CurrentPageIndex, grdVendors.PageSize, ref totalRecords);
                    grdVendors.VirtualItemCount = totalRecords;
                }
            }
        }
コード例 #2
0
        private void SetDataSource()
        {
            CreateLetterSearch();

            bool isUnauthorized = false;
            if (_searchFilter.Equals(Localization.GetString("All"), StringComparison.InvariantCultureIgnoreCase))
            {
                _searchFilter = "";
            }
            else if (_searchFilter.Equals(Localization.GetString("Unauthorized"), StringComparison.InvariantCultureIgnoreCase))
            {
                _searchFilter = "";
                isUnauthorized = true;
            }
			
            //Get the list of vendors from the database
            var totalRecords = 0;
            var vendorController = new Dnn.Modules.Vendors.Components.VendorsController();
            int portal = Globals.IsHostTab(PortalSettings.ActiveTab.TabID) ? Null.NullInteger : PortalId;
            
			if (String.IsNullOrEmpty(_searchFilter))
			{
			    grdVendors.DataSource = vendorController.GetVendors(portal, isUnauthorized, grdVendors.CurrentPageIndex, grdVendors.PageSize, ref totalRecords);
			    grdVendors.VirtualItemCount = totalRecords;
			}
            else
            {
                if (_searchField == "email")
                {
                    grdVendors.DataSource = vendorController.GetVendorsByEmail(_searchFilter, portal, grdVendors.CurrentPageIndex, grdVendors.PageSize, ref totalRecords);
                    grdVendors.VirtualItemCount = totalRecords;
                }
                else
                {
                    grdVendors.DataSource = vendorController.GetVendorsByName(_searchFilter, portal, grdVendors.CurrentPageIndex, grdVendors.PageSize, ref totalRecords);
                    grdVendors.VirtualItemCount = totalRecords;
                }
            }
        }