private void BAddNew_Click(object sender, RoutedEventArgs e) { Transaction t = null; if (DGTranzs.SelectedItem == null) { return; } t = DGTranzs.SelectedItem as Transaction; if (t == null) { return; } Material m = null; using (var db = new Model1()) { m = db.Materials.FirstOrDefault(tt => tt.MatId == t.MatId); } TransactionW tw = new TransactionW(m); tw.Owner = this; tw.ShowDialog(); GO(); }
private void BAddTranz_Click(object sender, RoutedEventArgs e) { Material m = null; if (DGMaterials.SelectedItem == null) { return; } m = DGMaterials.SelectedItem as Material; if (m == null) { return; } TransactionW tw = new TransactionW(m); tw.Owner = this; tw.ShowDialog(); GO(); }
private void DGTranzs_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { Transaction t = null; if (DGTranzs.SelectedItem == null) { return; } t = DGTranzs.SelectedItem as Transaction; if (t == null) { return; } TransactionW mw = new TransactionW(t); mw.Owner = this; mw.ShowDialog(); GO(); }
private void OnHyperlinkClick(object sender, RoutedEventArgs e) { Transaction t = null; if (DGTranzs.SelectedItem == null) { return; } t = DGTranzs.SelectedItem as Transaction; if (t == null) { return; } TransactionW mw = new TransactionW(t); mw.Owner = this; mw.ShowDialog(); GO(); }