我的公司希望我在所罗门中创建一个自定义屏幕,以便从数据库的表中加载一些数据。
他们说使用visual studio .net,我看到手册上写着使用VBA。
我应该使用什么?VBA还是visual studio 5?
如何创建新的应用程序?
发布于 2013-03-01 21:31:31
我们的客户也有类似的要求。我们使用的是Dynamics Solomon 2011。在做了一些研究之后,我们发现我们需要创建一个开发环境,首先安装VS2008,然后在上面安装所罗门。在VS之后安装所罗门将在Visual Studio中为所罗门开发设置一些项目模板。
https://community.dynamics.com/product/sl/f/35/t/80585.aspx
还有一些谈话,VS 2010是不推荐使用时,为动态所罗门开发。
我相信也有动态所罗门的SDK,你可以在你的应用程序中使用它来连接到所罗门数据库并使用数据对象。我们还没有尝试过,但是我们找到了一些关于使用这个SDK开发代码的参考资料。
http://www.microsoftdynamicsforums.com/forums/forum_posts.asp?TID=191&title=solomon-Object-model-code
以下是使用所罗门SDK的示例代码:
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Dynamics.SL.ObjectModel;
using System.Threading;
using System.Runtime.InteropServices;
namespace LoginSL
{
class Program
{
[DllImport("kernel32")]
static extern void Sleep(uint dwMilliseconds);
public static Microsoft.Dynamics.SL.ObjectModel.SIVToolbar sivTB;
public static Microsoft.Dynamics.SL.ObjectModel.SIVApplication sivApp;
static void Main(string[] args)
{
sivTB = new SIVToolbar();
sivTB.Login("servername", "systemdb", "company", "username", "password");
sivApp = sivTB.StartApplication("9850000.exe");
sivApp.Visible = true;
string datafile = "C:\\0101000.DTA";
string ctrlfile = "C:\\0101000.ctl";
string outfile = "C:\\0101000.log";
//In C# "\\" is the predefined escape sequence for backslash.
sivApp.Controls["cdata"].Value = (datafile.ToUpper());
sivApp.Controls["cfiletype"].Value = "ASCII";
sivApp.Controls["cscreen"].Value = "0101000";
sivApp.Controls["ccontrol"].Value = (ctrlfile.ToUpper());
sivApp.Controls["coutput"].Value = (outfile.ToUpper());
sivApp.Controls["cBegProcessing"].Value = true;
Sleep(5000); //remove the comment marks at the beginning of this line for workaround
sivApp.Quit();
sivApp.Dispose();
//GC.Collect();
//GC.WaitForPendingFinalizers();
//GC.Collect();
Sleep(5000); //remove the comment marks at the beginning of this line for workaround
sivTB.Logout();
sivTB.Quit();
sivTB.Dispose();
//GC.Collect();
//GC.WaitForPendingFinalizers();
//GC.Collect();
//MessageBox.Show("TI is complete"); // Displays complete message
}
}
}https://stackoverflow.com/questions/4391719
复制相似问题