예제 #1
0
 private void Dg_trans_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (dg_trans.SelectedItem != null)
     {
         TransactList  item = dg_trans.SelectedItem as TransactList;
         string        sql  = "select description from transact_log where id = " + item.id + "";
         NpgsqlCommand comm = new NpgsqlCommand(sql, super.conn);
         super.conn.Open();
         var      a    = comm.ExecuteScalar().ToString();
         Read_win read = new Read_win(comm.ExecuteScalar().ToString());
         read.Show();
         super.conn.Close();
     }
 }
예제 #2
0
 private void Dg_log_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (dg_log.SelectedItem != null)
     {
         Dispatcher.BeginInvoke((Action)(() => tab_panel.SelectedItem = tab_transact));
         LogList selected = dg_log.SelectedItem as LogList;
         for (int i = 0; i < dg_trans.Items.Count; i++)
         {
             TransactList item = dg_trans.Items[i] as TransactList;
             if (item.id == selected.transact_id)
             {
                 dg_trans.SelectedIndex = i;
                 dg_trans.ScrollIntoView(dg_trans.Items[i]);
                 break;
             }
         }
     }
 }