GetVendors() 공개 메소드

public GetVendors ( int PortalId, bool UnAuthorized, int PageIndex, int PageSize, int &TotalRecords ) : ArrayList
PortalId int
UnAuthorized bool
PageIndex int
PageSize int
TotalRecords int
리턴 System.Collections.ArrayList
예제 #1
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;
                }
            }
        }
예제 #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;
                }
            }
        }