private void ESC_Click()
 {
     int ID1 = Convert.ToInt32(ID);
     Window_Data2_CoordinateData coorData = new Window_Data2_CoordinateData();
     coorData.Show();
     coorData.LV.SelectedIndex = ID1 - 1;
     coorData.LV.ScrollIntoView(coorData.LV.SelectedItem);
     coorData.Show();
     this.Close();//关闭当前窗口
 }
 private void ENT_Click()
 {
     //打开数据库
     OleDbConnection conn = new OleDbConnection(odbcConnStr);
     conn.Open();
     //定义sql语句操作数据库
     int ID1 = Convert.ToInt32(ID);
     string sql = "UPDATE Original_data SET D_NAME ='" + tbItemName.Text + "', N = '" + tbItemN.Text + "', E = '" + tbItemE.Text + "', Z = '" + tbItemZ.Text + "' Where ID=" + ID1;
     //  string sql = "Update Original_data set D_NAME='" + tbItemName.Text.Trim() + "' where ID= " + ID1 + " ";
     OleDbCommand cmd = new OleDbCommand(sql, conn);
     cmd.CommandText = sql;
     cmd.ExecuteNonQuery();
     MessageBox.Show("编辑成功!", "提示");
     Window_Data2_CoordinateData coordinateDate = new Window_Data2_CoordinateData();
     coordinateDate.LV.SelectedIndex = ID1 - 1;
     coordinateDate.LV.ScrollIntoView(coordinateDate.LV.SelectedItem);
     coordinateDate.Show();
     this.Close();//关闭当前窗口
 }
 private void Coordinate_Click(object sender, RoutedEventArgs e)
 {
     Window_Data2_CoordinateData window_Start1 = new Window_Data2_CoordinateData();
     window_Start1.Show();
     this.Close();//关闭当前窗口
 }