/// <reference path="../scripts/typings/jquery/jquery.d.ts" />

import GL = DemoKunden.GL;
import Modell = DemoKunden.GO;

// Module
module DemoKunden.UI {

    // Class
    export class KundenUI {

       static renderTable() {

            var liste = new GL.KundenManager().getAll("Berlin");

            //for (var k in liste) {
            //    document.write(k.);
            //}
                  
           $('#content').before(liste.length + " Kunden:<hr>");
            for (var i: number = 0; i < liste.length; i++) {
                var kunde: any = liste[i];
                $('#content').before("Objekt #" + i + ": " + kunde.getInfo() + "<br>");
            }
        }
    }
}

$(document).ready(function () {
    $('#headline').css("color", "red");
    $('#headline').text('Kundendemo');

    DemoKunden.UI.KundenUI.renderTable();

});