Ejemplo n.º 1
0
        // Полное обозначение
        public static string GetFullDesignation(string ImCode, ref string codeAxapta)
        {
            // Подключаем базу
            ImDataBase = new ImDataBaseClass();
            while (ImDataBase.Ready() != 1)
            {
                System.Threading.Thread.Sleep(10);
            }
            // Получаем данные по клюючу ImBase
            ImDataBase.GetKeyInfo(ImCode, out string TableRecord, out string CatalogRecord, out string KeysList);
            //      Debug.WriteLine(TableRecord);
            // Debug.WriteLine(CatalogRecord);
            // Debug.WriteLine(KeysList);

            // Возвращаем Код Axapta  "Код Axapta=757478.1336",ПРИМЕЧАНИЕ=
            int startIndex = TableRecord.IndexOf("\"Код Axapta=") + 12;
            int endIndex   = TableRecord.IndexOf("\",", startIndex);

            if (endIndex - startIndex > 0)
            {
                codeAxapta = TableRecord.Substring(startIndex, endIndex - startIndex);
            }
            // Возвращаем ПОЛНОЕ ОБОЗНАЧЕНИЕ
            startIndex = CatalogRecord.IndexOf("\"ПОЛНОЕ ОБОЗНАЧЕНИЕ=") + 20;
            endIndex   = CatalogRecord.IndexOf("\",КЛАСС=", startIndex);
            return(CatalogRecord.Substring(startIndex, endIndex - startIndex));
        }
Ejemplo n.º 2
0
        public static string CheckByImbaseKey(string ImCode)
        {
            ImDataBase.GetKeyInfo(ImCode, out string TableRecord, out string CatalogRecord, out string KeysList);
            //      Debug.WriteLine(TableRecord);
            //      Debug.WriteLine(CatalogRecord);
            //      Debug.WriteLine(KeysList);

            int startIndex = CatalogRecord.IndexOf("\"ПОЛНОЕ ОБОЗНАЧЕНИЕ=") + 20;
            //  Debug.WriteLine(startIndex);

            int endIndex = CatalogRecord.IndexOf("\",КЛАСС=");
            //  Debug.WriteLine(endIndex);

            var FullDesignation = CatalogRecord.Substring(startIndex, endIndex - startIndex);

            Debug.WriteLine(FullDesignation);

            Debug.WriteLine(DateTime.Now - TimeStart);
            // Console.ReadLine();
            ImbApplication = null;
            ImDataBase     = null;

            return(FullDesignation);
        }
Ejemplo n.º 3
0
 public static void CloseImbaseConnection()
 {
     ImApplication = null;
     ImDataBase    = null;
 }