![]() |
#1 |
Участник
|
workflowax: Creating a Visual Interface for AX2012 Model Importing
Источник: http://workflowax.wordpress.com/2012...del-importing/
============== ![]() Although I cannot answer this, I can, for those of you who are interested in getting your hands dirty with a bit of C# code, point you in the right direction of how to build your own interface with relative ease. Recently i discovered a handy little dll that really makes writing a model management program a breeze. Its located at: C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\AXUtilLib.dll. This inconspicuous dll exposes all the functionality of the AXUtil.exe program directly to the developer. For example to delete a model (in a C# application): AxUtilContext context = new AxUtilContext(); AxUtilConfiguration config = new AxUtilConfiguration(); config.Server = 'SQLSERVERNAME'; config.Database = 'DATABASENAME'; string modelName = 'TestModel'; if (modelName != "") { if (MessageBox.Show( "Are you sure you wish to delete model " + modelName + "?","Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes) { config.ModelArgument = new ModelArgument(modelName); AxUtil util = new AxUtil(context, config); util.Delete(context, config); if (context.HasError) { MessageBox.Show("Failed to delete model " + modelName, "Error", MessageBoxButtons.OK); ICollection errors = context.Errors; IEnumerator enums = errors.GetEnumerator(); while (enums.MoveNext()) { console.write(enums.Current); } } else { MessageBox.Show("Model Deleted", "Model Deleted", MessageBoxButtons.OK); } this.reloadModels(); }}You can use the AXUtil class to do your import, export, get a list of all installed models etc… Below is a quick demo of an application I wrote to do basic importing, listing and deleting models. Please leave some comments if you have had the chance to explore this ![]() Источник: http://workflowax.wordpress.com/2012...del-importing/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
![]() |
#2 |
Участник
|
Вот еще одна GUI-оболочка к функционалу AxUtil:
http://daxldsoft.blogspot.it/2012/05/axutil-gui.html |
|
|
|