Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
        }