#Acumatica Web服务多语言状态和日期字段中的错误

时间:2018-11-15 17:33:11

标签: acumatica

我们有一个与acumatica 6.10一起使用的外部应用程序,现在我们正在迁移到acumatica 2017R2,该应用程序现在存在一些问题。例如,如果我在状态中使用“打开”,则会收到一个错误,但是如果我在西班牙语中使用“ Abierto”,它将起作用!那么,如果用户使用英语进行设置,为什么会发生这种情况?

using System;
using System.Linq;
using ConsoleApp3.AR302000;
using ConsoleApp3.GI000128;
using System.IO;


namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            // The code provided will print ‘Hello World’ to the console.
            // Press Ctrl+F5 (or go to Debug > Start Without Debugging) to run your app.
            AR302000.Screen src = new AR302000.Screen();

            GI000128.Screen GI128scr = new GI000128.Screen();
            try
            {
                GI128scr.Logout();
            }
            catch (Exception)
            {

            }
            GI128scr.CookieContainer = new System.Net.CookieContainer();
            GI000128.LoginResult lr = GI128scr.Login("user@company:SUC01", "thisisnotmtypassword");             

            if (lr != null && lr.Code == GI000128.ErrorCode.OK)
            {
                GI000128.Content GI128Content = GI128scr.GetSchema();
                GI000128execute(GI128scr, GI128Content);

                //AR302010method(src);



            }
            try
            {
                Console.WriteLine("Login out ....");
                GI128scr.Logout();
                Console.WriteLine("Desconectado");
            }
            catch (Exception e)
            {


            }

            Console.ReadKey();

        }


        private static void GI000128execute(GI000128.Screen gI128scr, GI000128.Content gI128Content)
        {
            GI000128.Command[] commands = new GI000128.Command[]
            {
                new GI000128.Value
                {
                     LinkedCommand = gI128Content.Filter_.BranchID,
                     Value = "S002"
                },
                new GI000128.Value
                {
                     LinkedCommand = gI128Content.Filter_.Status,
                     Value = "Open"
                },

                new GI000128.Value
                {
                     LinkedCommand = gI128Content.Filter_.DateFrom,
                     Value = "2018-10-31"
                },
                new GI000128.Value
                {
                     LinkedCommand = gI128Content.Filter_.DateTo,
                     Value = "2018-11-01"
                },

                gI128Content.Result.QTOrderDate,
                gI128Content.Result.QTStatus,       
                gI128Content.Result.BranchCD,
                gI128Content.Result.QTOrderNbr,
                gI128Content.Result.QTOrderType,
                gI128Content.Result.QTOrderTotal,
                gI128Content.Result.OwnerID
            };
            string[][] resultado = gI128scr.Export(commands, null, 0, true, true);
            imprimir(resultado);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               


        }

        private static void imprimir(string[][] resultado)

        {
            int row = resultado.GetLength(0);
            int column = resultado[0].GetLength(0);
            for (int i = 0; i<row; i++)
            {
                for (int j = 0; j<column; j++)
                {
                    Console.Write(resultado[i][j]+" | ");
                }
                Console.WriteLine();

            }
            Console.ReadKey();

        }

0 个答案:

没有答案