private void button1_Click_1(object sender, RoutedEventArgs e) { if (!HomeWindow.IsAdmin()) { MessageBox.Show("You must be logged in as administrator to perform this operation."); return; } if (customerCB.Text.Trim().Length != 11) { MessageBox.Show("Customer ID must be 11 characters"); return; } System.Diagnostics.Process.Start("http://instantofac.com/search.php?input_string=" + firstName.Text); //WebBrowser wb = new WebBrowser(); //wb.Document = new //MessageBox.Show("Customer not found in terrorist list"); }
private void flag_Click(object sender, RoutedEventArgs e) { if (!HomeWindow.IsAdmin()) { MessageBox.Show("You must be logged in as administrator to perform this operation."); return; } if (customerCB.Text.Trim().Length != 11) { MessageBox.Show("Customer ID must be 11 characters"); return; } string qry = ""; string cnt = flag.Content.ToString(); if ("Unflag" == cnt) { qry = "update customers set status=1 where id='" + customerCB.Text + "'"; } else { qry = "update customers set status=0 where id='" + customerCB.Text + "'"; } DB.getInstance().ExecuteNonQuery(qry); DB.getInstance().close(); if ("Unflag" == cnt) { this.Background = Brushes.White; flag.Content = "Flag As Bad"; } else { this.Background = Brushes.Red; flag.Content = "Unflag"; } }