private void MenuItem_Click(object sender, RoutedEventArgs e) { MenuItem mi = sender as MenuItem; if (mi != null) { ContextMenu cm = mi.CommandParameter as ContextMenu; if (cm != null) { DataGrid dg = cm.PlacementTarget as DataGrid; if (dg != null) { SqlController.DeleteByID(dg); } } } }
private void sort_Click(object sender, RoutedEventArgs e) { SqlController.Sort(); }
private void setInfo_Click(object sender, RoutedEventArgs e) { SqlController.Write(disList, lectList); }
private void getInfo_Click(object sender, RoutedEventArgs e) { SqlController.Read(); }
private void closeConnection_Click(object sender, RoutedEventArgs e) { SqlController.CloseConnection(); }
private void openConnection_Click(object sender, RoutedEventArgs e) { SqlController.OpenConnection(); }