public GetVendorsByName ( string Filter, int PortalId, int Page, int PageSize, int &TotalRecords ) : |
||
Filter | string | |
PortalId | int | |
Page | int | |
PageSize | int | |
TotalRecords | int | |
return |
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; } } }
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; } } }