private void Create_Click(object sender, RoutedEventArgs e) { var edt = new MoneyEdit(_connectionSettings, OpenType.New); edt.Owner = this; edt.ShowDialog(); UpdatePageCount(); UpdateGrid(); }
private void Edit_Click(object sender, RoutedEventArgs e) { if (UserGrid.SelectedItem != null) { DataRowView row = UserGrid.SelectedItem as DataRowView; var edt = new MoneyEdit(_connectionSettings, OpenType.Edit, Convert.ToInt32(row.Row.ItemArray[1])); edt.Owner = this; edt.ShowDialog(); UpdatePageCount(); UpdateGrid(); } }
public void Row_DoubleClick(object sender, MouseButtonEventArgs e) { if (sender is DataGridRow row) { if (fromOtherView) { TemporaryStorage.Holder.Add("ID", ((DataRowView)row.Item).Row.ItemArray[1].ToString()); this.Close(); return; } var edt = new MoneyEdit(_connectionSettings, OpenType.View, Convert.ToInt32(((DataRowView)row.Item).Row.ItemArray[1].ToString())); edt.Owner = this; edt.ShowDialog(); UpdatePageCount(); UpdateGrid(); } }