Kyt
|
|
1 | |
Колекция ответных док-ов22.06.2007, 14:11. Показов 11289. Ответов 3
Метки нет (Все метки)
Есть три формы представляющие сабой иерархию, первая типа "Document", вторая и третья "ответ на ответ". Задача получить все нижестоящие документы которые являются ответными на выбранный (может быть ответным). Подскажи Как?
|
22.06.2007, 14:11 | |
Ответы с готовыми решениями:
3
Колекция -> Документ -> Выгрузить атачи -> Rar -> вернуть Колекция програм Колекция в ArrayList<e> в Java Обобщенная колекция в DbContext |
1 / 1 / 0
Регистрация: 23.04.2006
Сообщений: 226
|
|
22.06.2007, 15:37 | 2 |
Как связан основной документ с ответом??
0
|
1 / 1 / 0
Регистрация: 01.10.2006
Сообщений: 615
|
|
22.06.2007, 18:01 | 3 |
так как это написал KILL это responce связь..
если это так, то вот частный пример, в котором вычисляется количество всех документов ответов переделать и обобщить его под свои нужды, я думаю, не составит большой трудности Sub Click(Source As Button) Dim ses As New NotesSession Dim db As NotesDatabase Dim sourceColl As NotesDocumentCollection, firstRespColl As NotesDocumentCollection, secondRespColl As NotesDocumentCollection Dim sourceDoc As NotesDocument, firstRespDoc As NotesDocument Dim respCount As Long Set db = ses.CurrentDatabase Set sourceColl = db.AllDocuments If sourceColl.Count = 0 Then Exit Sub Set sourceDoc = sourceColl.GetFirstDocument While Not (sourceDoc Is Nothyng) If Not(sourceDoc.IsResponse) Then Set firstRespColl = sourceDoc.Responses If firstRespColl.Count > 0 Then respCount = respCount + firstRespColl.Count Set firstRespDoc = firstRespColl.GetFirstDocument While Not(firstRespDoc Is Nothyng) Set secondRespColl = firstRespDoc.Responses If secondRespColl.Count > 0 Then respCount = respCount + secondRespColl.Count End If Set firstRespDoc = firstRespColl.GetNextDocument(firstRespDoc) Wend End If End If Set sourceDoc = sourceColl.GetNextDocument(sourceDoc) Wend Msgbox "Всего количество ответных документов " + Cstr(respCount) End Sub
0
|
0 / 0 / 0
Регистрация: 12.05.2006
Сообщений: 329
|
|
23.06.2007, 17:59 | 4 |
<!--QuoteBegin-KIL+23:06:2007, 13:58 -->
<span class="vbquote">(KIL @ 23:06:2007, 13:58 )</span><!--QuoteEBegin-->Задача получить все нижестоящие документы которые являются ответными на выбранный [snapback]70387" rel="nofollow" target="_blank[/snapback]?[/quote] Вот так можно кодом. Код
Function all_desc(root As notesDocument, b_error As Boolean) As NotesdocumentCollection On Error Goto ErrLab Dim col As NotesDocumentCollection Dim children As NotesdocumentCollection Dim doc As Notesdocument, push As NotesDocument Dim k%, m% Set children = root.Responses If Not (children Is Nothyng) Then Set doc = children.getFirstDocument Do Until doc Is Nothyng If Not doc.IsDeleted And doc.IsValid Then Set col = all_desc(doc, b_error) If Not (col Is Nothyng) Then Set push = col.GetFirstDocument Do Until push Is Nothyng If Not push.IsDeleted And push.IsValid Then On Error 4469 Resume Next Call children.AddDocument(push) On Error Goto ErrLab End If Set push = col.getNextDocument(push) Loop End If End If Set doc = children.getNextDocument(doc) Loop End If Set all_desc = children Exit Function ErrLab: b_error = True Msgbox "Error " + Cstr(Err) + " at line " + Cstr(Erl) Exit Function End Function
0
|
23.06.2007, 17:59 | |
23.06.2007, 17:59 | |
Помогаю со студенческими работами здесь
4
Получить список ответных документов Отображение ответных документов в view Задать значение полю, в ответных документах Сортировка ответных документов в алфавитном порядке Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |