protected void ButtonContact_Click(object sender, EventArgs e) { ContactUtility con = new ContactUtility(); con.Name = TextBoxName.Text; con.Content = TextBoxContact.Text; con.insertLog(); LabelMessage.Text = "Sending Successful!"; ButtonContact.Visible = false; LabelMessage.Visible = true; }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); // Pre-populate with some random generated data var contactMainViewModel = new ContactMainViewModel(ContactUtility.GenerateContacts()); var contactMain = new ContactMain { DataContext = contactMainViewModel }; contactMain.Show(); }