public static void UsunOperatora(OperatorzyView poz) { using (var db = new ecoplastolEntities()) { var list = (from w in db.operatorzy_maszyn where w.id == poz.id select w).ToList(); foreach (var detail in list) { db.operatorzy_maszyn.Remove(detail); } db.SaveChanges(); } }
private void GrdLista_SelectionChanged(object sender, SelectionChangedEventArgs e) { rowOperatorzy = grdLista.SelectedItem as OperatorzyView; grdPozycje.DataContext = rowOperatorzy; }