...
DbNetEditCore orderDetailsEdit = new DbNetEditCore("northwind", "[order details]", "orderDetailsEdit");
orderDetailsEdit.Column("OrderID").ForeignKey().Hidden();
orderDetailsEdit.Column("ProductID").Lookup(new Lookup("Products", "ProductId", "ProductName")).Label("Product");
orderDetailsEdit.Column("UnitPrice").Format("c");
orderDetailsEdit.LayoutColumns = 3;
DbNetEditCore ordersEdit = new DbNetEditCore("northwind", "orders", "ordersEdit");
ordersEdit.Column("CustomerID").ForeignKey().Hidden();
ordersEdit.Column("EmployeeID").Lookup(new Lookup("Employees", "EmployeeId", "lastname + ',' + firstname")).Label("Employee");
ordersEdit.Column("ShipVia").Lookup(new Lookup("Suppliers", "SupplierId", "CompanyName"));
ordersEdit.Column("Freight").Format("c");
ordersEdit.LayoutColumns = 3;
ordersEdit.AddLinkedControl(orderDetailsEdit);
DbNetEditCore customersEdit = new DbNetEditCore("northwind", "customers", "customersEdit");
customersEdit.Column("CustomerID").Hidden();
customersEdit.AddLinkedControl(ordersEdit);
customersEdit.LayoutColumns = 3;
@customersEdit.Render()
...
|