public BlackOps4() { InitializeComponent(); cleartextbox(); string connectionString = ConfigurationManager.ConnectionStrings["ZombiesRound.Properties.Settings.SQLZOOConnectionString"].ConnectionString; sqlConnection = new SqlConnection(connectionString); SqlConnect.ShowRound(listRounds, queryA, sqlConnection); SqlConnect.ShowRound(listAnicent, queryB, sqlConnection); SqlConnect.ShowRound(listIX, queryC, sqlConnection); SqlConnect.ShowRound(listV, queryD, sqlConnection); SqlConnect.ShowRound(listB, queryE, sqlConnection); SqlConnect.ShowRound(listC, queryF, sqlConnection); SqlConnect.ShowRound(listD, queryDE, sqlConnection); SqlConnect.ShowRound(listT, queryT, sqlConnection); }
private void AddRoundT_Click(object sender, RoutedEventArgs e) { string text; int round; string map = "Tag"; text = mytextboxT.Text; if (!int.TryParse(text, out round)) { MessageBox.Show("Not an integer"); } else { SqlConnect.AddRound(listT, queryT, sqlConnection, map, round); SqlConnect.ShowRound(listT, queryT, sqlConnection); } }
private void AddRoundAN_Click(object sender, RoutedEventArgs e) { string text; int round; string map = "Ancient"; text = myTextBoxA.Text; if (!int.TryParse(text, out round)) { MessageBox.Show("Not an integer"); } else { SqlConnect.AddRound(listAnicent, queryB, sqlConnection, map, round); SqlConnect.ShowRound(listAnicent, queryB, sqlConnection); } }