Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

List.cshtml

@model CustomerSearchModel

@{
    //page title
    ViewBag.PageTitle = T("Admin.Customers.Customers").Text;
    //active menu item (system name)
    NopHtml.SetActiveMenuItemSystemName("Customers list");
}

@{
    const string hideSearchBlockAttributeName = "CustomerListPage.HideSearchBlock";
    var hideSearchBlock = await genericAttributeService.GetAttributeAsync(await workContext.GetCurrentCustomerAsync(), hideSearchBlockAttributeName);
}

@T("Admin.Customers.Customers")

@T("Admin.Common.AddNew")
@await Component.InvokeAsync(typeof(AdminWidgetViewComponent), new { widgetZone = AdminWidgetZones.CustomerListButtons, additionalData = Model })
@{ var gridModel = new DataTablesModel { Name = "customers-grid", UrlRead = new DataUrl("CustomerList", "Customer", null), SearchButtonId = "search-customers", Length = Model.PageSize, LengthMenu = Model.AvailablePageSizes, Filters = new List { new FilterParameter(nameof(Model.SelectedCustomerRoleIds)), new FilterParameter(nameof(Model.SearchEmail)), new FilterParameter(nameof(Model.SearchUsername)), new FilterParameter(nameof(Model.SearchFirstName)), new FilterParameter(nameof(Model.SearchLastName)), new FilterParameter(nameof(Model.SearchDayOfBirth)), new FilterParameter(nameof(Model.SearchMonthOfBirth)), new FilterParameter(nameof(Model.SearchCompany)), new FilterParameter(nameof(Model.SearchRegistrationDateFrom)), new FilterParameter(nameof(Model.SearchRegistrationDateTo)), new FilterParameter(nameof(Model.SearchLastActivityFrom)), new FilterParameter(nameof(Model.SearchLastActivityTo)), new FilterParameter(nameof(Model.SearchPhone)), new FilterParameter(nameof(Model.SearchZipPostalCode)), new FilterParameter(nameof(Model.SearchIpAddress)), } }; gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.Id)) { IsMasterCheckBox = true, Render = new RenderCheckBox("checkbox_customers"), ClassName = NopColumnClassDefaults.CenterAll, Width = "30" }); gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.Email)) { Title = T("Admin.Customers.Customers.Fields.Email").Text }); if (Model.AvatarEnabled) { gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.AvatarUrl)) { Title = T("Admin.Customers.Customers.Fields.Avatar").Text, Width = "140", Render = new RenderPicture() }); } if (Model.UsernamesEnabled) { gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.Username)) { Title = T("Admin.Customers.Customers.Fields.Username").Text }); } gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.FullName)) { Title = T("Admin.Customers.Customers.Fields.FullName").Text }); gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.CustomerRoleNames)) { Title = T("Admin.Customers.Customers.Fields.CustomerRoles").Text, Width = "100" }); if (Model.CompanyEnabled) { gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.Company)) { Title = T("Admin.Customers.Customers.Fields.Company").Text }); } if (Model.PhoneEnabled) { gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.Phone)) { Title = T("Admin.Customers.Customers.Fields.Phone").Text }); } if (Model.ZipPostalCodeEnabled) { gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.ZipPostalCode)) { Title = T("Admin.Customers.Customers.Fields.ZipPostalCode").Text }); } gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.Active)) { Title = T("Admin.Customers.Customers.Fields.Active").Text, Width = "70", ClassName = NopColumnClassDefaults.CenterAll, Render = new RenderBoolean() }); gridModel.ColumnCollection.Add(new ColumnProperty(nameof(CustomerModel.Id)) { Title = T("Admin.Common.Edit").Text, Width = "80", ClassName = NopColumnClassDefaults.Button, Render = new RenderButtonEdit(new DataUrl("Edit")) }); } @await Html.PartialAsync("Table", gridModel)
@*export selected (XML). We don't use GET approach because it's limited to 2K-4K chars and won't work for large number of entities*@
@*import products form*@ @*export selected (Excel). We don't use GET approach because it's limited to 2K-4K chars and won't work for large number of entities*@