protected void CreateDocument(int orderId) { var id = new ViewID(typeof(Order), orderId); IDocument document = DocumentManagerService.FindDocumentByIdOrCreate(id, svc => { var doc = svc.CreateDocument("EditOrderView", orderId, this); doc.Id = id; doc.Title = string.Format("Edit Order {0}", orderId); return(doc); }); document.Show(); }
public void ShowCustomers() { var id = new ViewID(typeof(Customer)); IDocument document = DocumentManagerService.FindDocumentByIdOrCreate(id, svc => { var doc = svc.CreateDocument("CustomerListView", null, this); doc.Id = id; doc.Title = "Customers"; return(doc); }); document.Show(); }