AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.12.2010, 22:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
axaptapedia: AOT Search Results Save/Load
Источник: http://www.axaptapedia.com/AOT_Search_Results_Save/Load
==============

Summary: Saving and Loading AOT Search Results

<div>So, this might not interest a lot of people...
But, then again...

It takes me on average about 45 Minutes to do a full scan of the AOT when I'm looking at all levels. That's a lot of time when you're analysing a system and I don't like repeating the search, because it's the end of the day or someone wants to restart the AOS or some such.

So I came up with a way of saving and loading search results.

Here are the Methods for accomplishing this.

I'll leave setting up the Buttons on the Form SysAOTFind, getting the Filename and calling the Methods up to You!

Have fun and I hope that it helps you out!


void SaveResults(Filename _file)
{
FormListColumn formListColumn;
FormListItem formListItem;
AsciiIo asciiIo = new AsciiIo(_file, 'w');
int columns = resultListView.getColumnCount();
int rows = resultListView.getCount();
int i;
int j;
str text;
str productName;
str licenceHolder;
str applicationDirectory;
anytype data;
int image, overlay, indent;
boolean foundProperties;
;

productName = xInfo::productName()
+ ' ' + xInfo::releaseVersion()
+ ' Build #' + xInfo::buildNo()
+ '/' + ApplicationVersion::buildNo();
licenceHolder = xInfo::licenseName() ? xInfo::licenseName() : 'Internal';
applicationDirectory = xInfo::directory(DirectoryType::Appl);

asciiIo.inRecordDelimiter('\n');

asciiIo.write("***Element: System");
asciiIo.write(" ");
asciiIo.write(strfmt(" ProductName: %1", productName));
asciiIo.write(strfmt(" LicenseHolder: %1", licenceHolder));
asciiIo.write(strfmt(" ApplicationDirectory: %1", applicationDirectory));
asciiIo.write(" ");
asciiIo.write("***Element: Search Definition");
asciiIo.write(" ");
asciiIo.write(strfmt(" Search: %1", search.selection()));
asciiIo.write(strfmt(" Named: %1", Named.text()));
asciiIo.write(strfmt(" ContainingText: %1", ContainingText.text()));
asciiIo.write(strfmt(" LookInRange: %1", LookInRange.text()));
asciiIo.write(strfmt(" ShowSource: %1", ShowSource.checked()));
asciiIo.write(strfmt(" UseTreeSelection: %1", UseTreeSelection.checked()));
asciiIo.write(strfmt(" DateRange: %1", DateRange.text()));
asciiIo.write(strfmt(" ByRange: %1", ByRange.text()));
asciiIo.write(strfmt(" IncludeEmpty: %1", IncludeEmpty.checked()));
asciiIo.write(strfmt(" ApplObjectTypeRange: %1", ApplObjectTypeRange.text()));
asciiIo.write(strfmt(" SizeRange: %1", SizeRange.text()));
asciiIo.write(strfmt(" applObjectLayerRange: %1", applObjectLayerRange.text()));
asciiIo.write(strfmt(" RunModeRange: %1", RunModeRange.text()));
asciiIo.write(strfmt(" FilterMethod: %1", FilterMethod.text()));
if (search.selection() == 0)
{
while select tmpPropertySelection
index Selected
where tmpPropertySelection.Selected == true
|| tmpPropertySelection.Criteria != ''
{
if (!foundProperties)
{
asciiIo.write(" Properties: ");
foundProperties = true;
}
asciiIo.write(strfmt(" Property: %1", tmpPropertySelection.Property));
asciiIo.write(strfmt(" Selected: %1", tmpPropertySelection.Selected));
asciiIo.write(strfmt(" Criteria: %1", tmpPropertySelection.Criteria));
}
if (foundProperties)
asciiIo.write(" EndProperties:");
}

asciiIo.write(" ");
asciiIo.write("***Element: Result Count");
asciiIo.write(" ");
asciiIo.write(strfmt(" Count: %1", counterHits));

asciiIo.write(" ");
asciiIo.write("***Element: Result Definition");
asciiIo.write(" ");

for (i = 0; i 0)
hitsText.text(strFmt("@SYS26824", counter));
}
}
catch
{
element.unLock();
endLengthyOperation();
throw error("@SYS79625");
}

element.resetSize();
element.unLock();
endLengthyOperation();
}


boolean CheckIsSystemOkay(container _data)
{
str line;
str token, value;
str productName;
str licenseHolder;
str applicationDirectory;
int i;
int lines = conlen(_data);
boolean foundProdName;
boolean foundLicHolder;
boolean foundAppDir;
boolean ok = true;
boolean ret;
;

productName = xInfo::productName()
+ ' ' + xInfo::releaseVersion()
+ ' Build #' + xInfo::buildNo()
+ '/' + ApplicationVersion::buildNo();
licenseHolder = xInfo::licenseName() ? xInfo::licenseName() : 'Internal';
applicationDirectory = xInfo::directory(DirectoryType::Appl);

for (i = 2; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axblog4u: TreeNode AOT Save – Did you know? Blog bot DAX Blogs 0 04.12.2010 20:12
Kashperuk Ivan: Editor script for simplifying the search in AOT Blog bot DAX Blogs 11 07.01.2010 12:23
axaptapedia: Load Web Documents Blog bot DAX Blogs 1 03.01.2009 23:50
axaptapedia: Create New AOT Project From Template Blog bot DAX Blogs 0 29.08.2008 21:10
axaptafreak: AOT search within search results Blog bot DAX Blogs 0 16.11.2006 17:40

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 10:07.