Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 票据和调整的应用页签菜单导出记录的不同结果';Acumatica ERP系统中的s屏幕_C#_Web Services_Soap_Wsdl_Acumatica - Fatal编程技术网

C# 票据和调整的应用页签菜单导出记录的不同结果';Acumatica ERP系统中的s屏幕

C# 票据和调整的应用页签菜单导出记录的不同结果';Acumatica ERP系统中的s屏幕,c#,web-services,soap,wsdl,acumatica,C#,Web Services,Soap,Wsdl,Acumatica,我已经创建了一些代码,用于在账单和调整屏幕的应用程序选项卡菜单中导出记录。我使用以下代码将所有记录导出并存储到DataGridView: public Form1() { InitializeComponent(); username = Properties.Settings.Default.username; password = Properties.Settings.Default.password; url = Properties.Settings.D

我已经创建了一些代码,用于在账单和调整屏幕的应用程序选项卡菜单中导出记录。我使用以下代码将所有记录导出并存储到DataGridView:

public Form1()
{
    InitializeComponent();
    username = Properties.Settings.Default.username;
    password = Properties.Settings.Default.password;
    url = Properties.Settings.Default.url;

    serverDb = Properties.Settings.Default.serverDb;
    dbName = Properties.Settings.Default.dbName;
    userDb = Properties.Settings.Default.userDB;
    passDb = Properties.Settings.Default.passDB;
}


private void btnFindRefNbr_Click(object sender, EventArgs e)
{
   dgvRefNbrPre.Rows.Clear();
   sCon.getLogin(username, password, url, context);
   AP301000Content billSchema2 = context.AP301000GetSchema();
   billSchema2.DocumentSummary.Type.Commit = false;
   billSchema2.DocumentSummary.Type.LinkedCommand = null;
   var command2 = new Command[]
   {
       new Value { Value = "Bill", LinkedCommand = billSchema2.DocumentSummary.Type},
       new Value { Value = "1700020537", LinkedCommand = billSchema2.DocumentSummary.ReferenceNbr},
       billSchema2.Applications.DocTypeDisplayDocType,
       billSchema2.Applications.ReferenceNbrDisplayRefNbr,
       billSchema2.Applications.Balance,
       billSchema2.Applications.AmountPaid
    };
    //var applications = context.AP301000Submit(command2).ToList();
    var applications = context.AP301000Export(command2, null, 0, false, true);
    int rowApp = applications.Count();
    int ab = 0;
    foreach (var data in applications)
    {
        string docTypeApp = data[0].ToString();
        string refNbrApp = data[1].ToString();
        string balanceApp = data[2].ToString();
        string amountPaid = data[3].ToString();

        dgvRefNbrPre.Rows.Add();
        dgvRefNbrPre.Rows[ab].Cells[0].Value = ab.ToString();
        dgvRefNbrPre.Rows[ab].Cells[1].Value = docTypeApp;
        dgvRefNbrPre.Rows[ab].Cells[2].Value = refNbrApp;
        dgvRefNbrPre.Rows[ab].Cells[3].Value = balanceApp;
        dgvRefNbrPre.Rows[ab].Cells[4].Value = amountPaid;
        ab++;
    }
    sCon.getLogout(context);
}

public void getLogin(string username, string password, string url, Screen context)
{

    context.CookieContainer = new System.Net.CookieContainer();
    context.Timeout = 1000000;
    context.Url = url;
    LoginResult login = context.Login(username, password);
}

public void getLogout(Screen context)
{
    context.Logout();
}
此代码在我的本地PC实例中运行良好。 我尝试在另一个实例中实现上述相同的代码,并运行此代码,但不起作用

     wsdl of instance 1 : http://localhost/SGL2016/(W(1))/Soap/SGLI.asmx,
     wsdl of instance 2 : http://202.182.186.133:82/SGLI/Soap/SGLI.asmx,
     wsdl of instance 3 : http://localhost/AcuSGL/(W(1))/Soap/SGLI.asmx,

仅在wsdl中使用了实例1。在wsdl 2和3中,它不起作用。

您是否在所有3个实例上发布了建议的APInvoiceEntry BLC扩展?很抱歉,我忘记了根据您为每个实例提供的建议创建ApinVoiceEntryText,但必须这样做才能获得结果。谢谢你提醒我这件事