protected void Page_Load(object sender, EventArgs e) { Database db = new Database(); IList<Kind> list = db.getChildList(); foreach (Kind k in list) { ListBox1.Items.Add(new ListItem(k.ToString(), k.Id.ToString())); } }
protected void Button1_Click(object sender, EventArgs e) { Database db = new Database(); Kind k = new Kind { Vorname = TextBox1.Text, Nachname = TextBox2.Text, Geburtstag = DateTime.Parse(TextBox3.Text) }; db.addChild(k); }
void Application_Start(object sender, EventArgs e) { // Code, der beim Starten der Anwendung ausgeführt wird. myDB = new Database(); }