Tuesday, March 3, 2009

Will A Windows 7 Dvd Work Twice

Le basi di una composite application parte 1

Let's see how you create a composite application minimal, but functional. In this first post will be created only 2 database on which to apply the concepts of composite application, the steps to create the composite application describe them in future posts.

First you must create these two databases:
Project: TeamRoom we will use the template, which is present in your Notes client, we create the database as shown below (except the fact of inheriting the design!):



















Hours let's create another DB, using a standard template PERNAMES.NTF, where he manages the book reviews:



















Now open the DB Manager configuriamolo project (roughly) like this:





Now open the Db Project Management in designer and go to change the main form 'Main Document', entering a field and on the small button in order to post in every document, contact Document reference in oggetto.

Se avete fretta potete fare copia incolla del codice seguente, avend cura di modificare il valore delle 2 costanti in base ai vostri parametri:

Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim Uidoc As NotesuiDocument
Dim doc As NotesDocument
Dim docRubrica As NotesDocument
Dim item As NotesItem
Dim sCustomer As String


Const NOMERUBRICA= "skill\Rubrica.nsf"
Const NOMEVISTA = "People"


Dim s As New NotesSession
Dim w As New NotesUIWorkspace
Set db = s.CurrentDatabase
Set UiDoc = w.CurrentDocument
Set Doc = UiDoc.document
September w.PickListCollection collection = (PICKLIST_CUSTOM, False, _
db.server, NOMERUBRICA, VarName,
_ "Client List", "Select a Customer") If

collection.Count = 0 Then Exit Sub
September docRubrica = collection.GetFirstDocument


sCustomer docRubrica.CompanyName = (0)
If sCustomer = "" Then
sCustomer = Trim (docRubrica.LAstName (0) & "" & docRubrica.FirstNAme (0)) End If
If
sCustomer = "" Then
Msgbox "You must choose at least a contact name and company name entered", 0 +16, "WARNING"
Exit Sub End If

doc.Customer = sCustomer
Doc.CustomerContatto docRubrica.fullname = (0)
Call UiDoc.Reload
Call UiDoc.Refresh

CustomerContatto field we will use it later.
Now we have to do at least a categorized view for the Customer field, and add that to the browser view of the DB project. If you want you can add a column in any view that includes the client, so as to identify each document to the customer quickly.

Well, the first step is done, now we can create sample documents in the database project, together with the contacts in the phonebook.

In the next post we will see the very first things basis for the CA

0 comments:

Post a Comment