Beispiel #1
0
 public override void Configure(IStaticTableConfiguration <Provincias> config)
 {
     config
     .SetAction("ListInvoices", "Gesem")
     .SetCssClass("table table-striped")
     .SetDefaultSortColumn(m => m.Nombre, true)
     .DisplayForColumn(m => m.Nombre)
     .DisplayForColumn(m => m.Paises.Nombre)
     .DisplayForColumn(m => m.Idiomas.Codigo)
     .ConfigurePagingControl(p => p.SetContainerCssClass("pagination").SetPageSizes(100, 500, 1000));
 }
Beispiel #2
0
 public override void Configure(IStaticTableConfiguration <Order> config)
 {
     config.SetAction("ListParentOrders", "Northwind")
     .SetCssClass("table table-striped")
     .ActionLinkColumn(c => c.OrderID, "", "#", o => new { o.OrderID }, new { @class = ChildOrderDetailTable.Filter })
     .DisplayForColumn(c => c.Customer.ContactName)
     .DisplayForColumn(c => c.Shipper.CompanyName)
     .AddColumn(c => c.Total,
                cfg => cfg.FormatUsing(d => d.ToString("c")).IsSortable(false).SetHeaderText("Order Total"))
     .ConfigurePagingControl(p => p.SetContainerCssClass("pagination"));
 }
 public override void Configure(IStaticTableConfiguration <Invoice> config)
 {
     config
     .SetAction("ListInvoices", "Northwind")
     .SetCssClass("table table-striped")
     .DisplayForColumn(m => m.ProductName)
     .DisplayForColumn(m => m.Quantity)
     .DisplayForColumn(m => m.Region)
     .DisplayForColumn(m => m.Salesperson)
     .EditorForColumn(m => m.Discount);
 }
Beispiel #4
0
 public override void Configure(IStaticTableConfiguration <Order> config)
 {
     config.SetAction("ListOrders", "Northwind")
     .SetCssClass("table table-striped")
     .HiddenColumnFor(c => c.OrderID, cfg => cfg.Hide())
     .ActionLinkColumn(c => c.Customer.City, "Category", "Home")
     .DisplayForColumn(c => c.Shipper.CompanyName)
     .DisplayForColumn(c => c.ShipRegion)
     .DisplayForColumn(c => c.Order_Details[0].Quantity)
     .ConfigurePagingControl(p => p.SetContainerCssClass("pagination"));
 }
Beispiel #5
0
 public override void Configure(IStaticTableConfiguration <Employee> config)
 {
     config
     .SetAction("ReadonlyEmployees", "Northwind")
     .SetCssClass("table table-striped")
     .DisplayForColumn(e => e.EmployeeID, cfg => cfg.IsSortable(false))
     .DisplayForColumn(e => e.FirstName, cfg => cfg.IsSortable(false))
     .DisplayForColumn(e => e.LastName, cfg => cfg.IsSortable(false))
     .DisplayForColumn(e => e.HomePhone, cfg => cfg.IsSortable(false))
     .DisplayForColumn(e => e.Title, cfg => cfg.IsSortable(false))
     .ConfigurePagingControl(p => p.SetContainerCssClass("pagination"));
 }
Beispiel #6
0
        public override void Configure(IStaticTableConfiguration <Employee> config)
        {
            var ents   = new NorthwindEntities.NorthwindEntities(new Uri(ConfigurationManager.AppSettings["NorthwindUrl"]));
            var titles = ents.Employees.Select(t => new { t.Title }).ToArray().Select(t => t.Title).Distinct();

            config
            .SetAction("ListEmployees", "Northwind")
            .SetCssClass("table table-striped")
            .HiddenColumnFor(c => c.EmployeeID, cfg => cfg.Hide())
            .EditorForColumn(e => e.FirstName)
            .EditorForColumn(e => e.LastName)
            .EditorForColumn(e => e.HomePhone)
            .DropdownColumnFor(e => e.Title, titles, s => s, s => s)
            .ConfigurePagingControl(p => p.SetContainerCssClass("pagination"));
        }
Beispiel #7
0
 public override void Configure(IStaticTableConfiguration <Order_Detail> config)
 {
     config.SetAction("ListChildOrderDetails", "Northwind")
     .SetCssClass("table table-striped")
     .SetFilterClass(Filter)
     .DisplayForColumn(c => c.Product.ProductName,
                       cfg =>
                       cfg.DefineFooter(
                           (h, rows) =>
                           rows.Any() ? "Order ID: " + h.ViewData.Model.First().OrderID : ""))
     .DisplayForColumn(c => c.Quantity)
     .DisplayForColumn(c => c.UnitPrice)
     .DisplayForColumn(c => c.LineTotal,
                       cfg =>
                       cfg.DefineFooter(
                           (h, rows) =>
                           rows.Any() ? rows.Sum(od => od.LineTotal).ToString("c") : ""));
 }
Beispiel #8
0
 public override void Configure(IStaticTableConfiguration <TModel> config)
 {
     config.SetAction(_action, _controller, _area).ScaffoldAllColumns();
 }