动态所罗门定制

发布于 2024-10-06 20:58:34 字数 152 浏览 1 评论 0原文

我的公司希望我在所罗门中创建一个自定义屏幕,以从数据库中的表加载一些数据。

他们说使用了 Visual Studio .net,我看到手册上说使用 VBA。

我应该用什么? VBA 还是 Visual Studio 5?

如何创建新应用程序?

My company wants me to create a custom screen in solomon to load some data from a table in the database.

They said used visual studio .net and i see manuals it says use VBA.

What should I use? VBA or visual studio 5?

How do I create a new application?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏末 2024-10-13 20:58:34

我们从客户那里收到了类似的要求。我们使用的是Dynamics Solomon 2011。经过一些研究,我们发现我们需要先安装VS 2008来创建一个开发环境,然后在其上安装Solomon。在VS之后安装Solomon将在Visual Studio中设置一些项目模板以进行Solomon开发。

https://community.dynamics.com/product/sl/f /35/t/80585.aspx

还有一些讨论称,在为 Dynamics Solomon 进行开发时不建议使用 VS 2010。

我还相信,您可以在应用程序内部使用 Dynamics Solomon SDK 连接到 Solomon 数据库并使用数据对象。我们尚未尝试此操作,但我们发现了一些有关使用此 SDK 开发代码的参考资料。

http://www.microsoftdynamicsforums.com /forums/forum_posts.asp?TID=191&title=solomon-Object-model-code

下面是使用 Solomon 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

        }
    }

    }

We got similar request from our customer. We're using Dynamics Solomon 2011. After doing some research, we found that we will need to create a development environment by installing VS 2008 first and then install Solomon over it. Installing Solomon after VS will setup some project templates in Visual Studio for Solomon development.

https://community.dynamics.com/product/sl/f/35/t/80585.aspx

There is some talks also that VS 2010 is not recommended for use when developing for Dynamics Solomon.

I believe also that there is SDK for Dynamics Solomon that you can use inside you application to connect to Solomon database and use data objects. We didn't try this yet but we found some references talking about developing code using this SDK.

http://www.microsoftdynamicsforums.com/forums/forum_posts.asp?TID=191&title=solomon-Object-model-code

Below is a sample code that uses Solomon 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

        }
    }

    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文