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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 27.11.2012, 21:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,497 / 847 (79) +++++++
Регистрация: 28.10.2006
ax-erp: Editing class method without opening the class
Источник: http://microsoft-dynamics-ax-erp.blo...t-opening.html
==============


Hi Hema.,
I've done the same in a form...
Check this code it might be useful....

static void addingcodeatruntime(Args _args)
{
TreeNode treeNode;
#AOT
str oldsource;
str newsource;
str LineString;
int pos;
container con;

int childCount;
;
TreeNode = TreeNode::findNode(#FormsPath + "\\Form1"); // "Form1" --
Form Name
treeNode = treeNode.AOTfindChild("Designs"); //Designs Node
treeNode = treeNode.AOTfindChild("Design");
treeNode = treeNode.AOTfindChild("[Tab:Tab2]");
treeNode = treeNode.AOTfindChild("[TabPage:TabPage]");
treeNode = treeNode.AOTfindChild("[ButtonGroup:ButtonGroup]");
treeNode = treeNode.AOTfindChild("CommandButton:CommandButton");
treeNode = treeNode.AOTfindChild("Methods");
treeNode = treeNode.AOTfindChild("clicked");

oldsource = treeNode.AOTgetSource();

con = str2con(oldsource, "\n");
LineString = conpeek(con,5);

pos = strscan(oldsource,LineString,1,strlen(oldsource));
pos += strlen(LineString);
newSource = strins(oldsource," \n \\Diwakar ",pos); //new line to be
inserted

treeNode.AOTsetSource(newsource);
treeNode.AOTcompile(1);
treeNode.AOTsave();

}



Источник: http://microsoft-dynamics-ax-erp.blo...t-opening.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
ax-erp: Walkthrough: Creating a Report Bound to a Report Data Provider Class (X++ Business Logic) [AX 2012] Blog bot DAX Blogs 0 20.09.2012 11:11
ax-erp: SysQueryRangeUtil class - use method name as query criteria Blog bot DAX Blogs 0 13.06.2012 22:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
Kashperuk Ivan: List panels in Dynaics AX - a short description of SysListPanel class Blog bot DAX Blogs 1 21.10.2007 22:51

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:28.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.