示例#1
0
        public static void Main(string[] args)
        {
            SQLBussiness    sql  = new SQLBussiness();
            MySqlConnection conn = sql.connect();

            generateFiles(sql, conn);
        }
示例#2
0
        public static void generateFiles(SQLBussiness sql, MySqlConnection conn)
        {
            XMLBussiness xml = new XMLBussiness();

            try
            {
                Console.WriteLine("Connecting to MySQL...");
                conn.Open();

                MySqlDataReader rdr = sql.getQueryData("sociedades", conn);
                xml.generateEntity("sociedades", rdr);

                MySqlDataReader rdr2 = sql.getQueryData("clientes", conn);
                xml.generateEntity("clientes", rdr2);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }

            Console.WriteLine("Done.");
            Console.ReadLine();
            conn.Close();
        }