private void MenuItem_Click(object sender, RoutedEventArgs e) { label1.Content = curr_goldinfo.high; RecordEdit re = new RecordEdit(curr_goldinfo.date.ToShortDateString(), curr_goldinfo.open, curr_goldinfo.high, curr_goldinfo.low, curr_goldinfo.close); re.Show(); }
private void MenuItem_Record_Click(object sender, RoutedEventArgs e) { String title = ((System.Data.DataRowView)(dataGridShowInfo.CurrentCell.Item)).Row.ItemArray[0].ToString(); String date = Convert.ToDateTime((((System.Data.DataRowView)(dataGridShowInfo.CurrentCell.Item)).Row.ItemArray[2].ToString())).ToShortDateString(); String content = ((System.Data.DataRowView)(dataGridShowInfo.CurrentCell.Item)).Row.ItemArray[5].ToString(); RecordEdit re = new RecordEdit(date, title, content); re.Show(); }