Example #1
0
        static void Main(string[] args)
        {
            displayExcelTableStructure();
            displayExcelTableOpeningInvite();
            String exselFilePath = getExcelFilePath();

            ExcelTypesTable types   = new ExcelTypesTable(exselFilePath);
            XsdFile         xsdFile = new XsdFile(types);

            String xsdBody = xsdFile.getXsdBody();
            Dictionary <String, String> MQBodyMessageModifications = xsdFile.getMQBodyMessageModifications();
            Dictionary <String, String> NewNodesInAxTypes          = xsdFile.getNewNodesInAxTypes();

            displayXsd(xsdFile.getXsdName(), xsdBody);
            confirmAndSaveXsdInXMLExchangeProjectDirectory(xsdFile.getXsdName(), xsdBody);

            displayMQBodyMessageModifications(MQBodyMessageModifications);
            confirmAndSaveMQBodyMessageModifications(MQBodyMessageModifications);

            displayNewNodesInAxTypes(NewNodesInAxTypes);
            confirmAndSaveNewNodesInAxTypes(NewNodesInAxTypes);

            Console.WriteLine("Готово! Для выхода нажмите ENTER...");
            Console.Read();
        }
Example #2
0
        public XsdFile(ExcelTypesTable types)
        {
            Dictionary <String, String> header = types.getNextRow();

            if (header == null)
            {
                throw new Exception("Таблица Excel пуста или не отформатирована должным образом");
            }
            this.xsdName        = header["name"];
            this.xsdDescription = header["description"];
            setTypes(types);
        }
Example #3
0
        private void setTypes(ExcelTypesTable types)
        {
            this.types = new List <Type>();
            Dictionary <String, String> row = types.getNextRow();

            while (row != null)
            {
                if (isComplexStringType(row))
                {
                    addComplexStringType(row);
                }
                else if (isComplexEnumType(row))
                {
                    addComplexEnumType(row);
                }
                else
                {
                    this.types.Add(new Type(row["name"], row["type"], row["type_axapta"], row["description"]));
                }
                row = types.getNextRow();
            }
        }